Skip to content

Commit c8fcb93

Browse files
bosheng1sjshweta
authored andcommitted
drm/virtio: fix vqs_info memory allocation issue
fixed vq_info memory allocation issue to avoid crash. Tracked-On: OAM-131505 Signed-off-by: Xue, Bosheng <bosheng.xue@intel.com>
1 parent 6a37454 commit c8fcb93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/virtio/virtgpu_kms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int virtio_gpu_find_vqs(struct virtio_gpu_device *vgdev)
140140
callbacks = kmalloc_array(total_vqs, sizeof(vq_callback_t *),
141141
GFP_KERNEL);
142142
names = kmalloc_array(total_vqs, sizeof(char *), GFP_KERNEL);
143-
vqs_info = kmalloc_array(total_vqs, sizeof(struct virtqueue_info *),
143+
vqs_info = kmalloc_array(total_vqs, sizeof(struct virtqueue_info),
144144
GFP_KERNEL);
145145

146146
if (!callbacks || !vqs || !names || !vqs_info) {

0 commit comments

Comments
 (0)