linux/drivers/vhost
Jason Wang 6a20f9fca3 vhost: initialize vq->nheads properly
Commit 7918bb2d19c9 ("vhost: basic in order support") introduces
vq->nheads to store the number of batched used buffers per used elem
but it forgets to initialize the vq->nheads to NULL in
vhost_dev_init() this will cause kfree() that would try to free it
without be allocated if SET_OWNER is not called.

Reported-by: JAEHOON KIM <jhkim@linux.ibm.com>
Reported-by: Breno Leitao <leitao@debian.org>
Fixes: 45347e79b5 ("vhost: basic in order support")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20250729073916.80647-1-jasowang@redhat.com>
Reviewed-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
Tested-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Tested-by: Jaehoon Kim <jhkim@linux.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-08-05 05:57:40 -04:00
..
iotlb.c
Kconfig vhost: Reintroduce kthread API and add mode selection 2025-08-01 09:11:09 -04:00
Makefile
net.c virtio, vhost: features, fixes 2025-08-01 14:17:48 -07:00
scsi.c vhost-scsi: Fix check for inline_sg_cnt exceeding preallocated limit 2025-08-01 09:11:08 -04:00
test.c
test.h
vdpa.c irqbypass: Require producers to pass in Linux IRQ number during registration 2025-06-20 13:52:41 -07:00
vhost.c vhost: initialize vq->nheads properly 2025-08-05 05:57:40 -04:00
vhost.h virtio, vhost: features, fixes 2025-08-01 14:17:48 -07:00
vringh.c vhost: vringh: Remove unused functions 2025-08-01 09:11:08 -04:00
vsock.c vsock/virtio: Rename virtio_vsock_skb_rx_put() 2025-08-01 09:11:09 -04:00