Thread (7 messages) 7 messages, 6 authors, 2025-08-04

Re: [PATCH] vhost: initialize vq->nheads properly

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2025-08-04 15:57:53
Also in: kvm, lkml, virtualization

On Mon, Aug 04, 2025 at 05:05:57PM +0800, Jason Wang wrote:
Hi Michael:

On Tue, Jul 29, 2025 at 3:39 PM Jason Wang [off-list ref] wrote:
quoted
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 <redacted>
Reported-by: Breno Leitao <leitao@debian.org>
Fixes: 7918bb2d19c9 ("vhost: basic in order support")
Signed-off-by: Jason Wang <redacted>
I didn't see this in your pull request.

Thanks
in next now. Will be in the next pull, thanks!

-- 
MST
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help