public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
To: Jason Wang <jasowang@redhat.com>, mst@redhat.com, eperezma@redhat.com
Cc: kvm@vger.kernel.org, virtualization@lists.linux.dev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	sgarzare@redhat.com, will@kernel.org,
	JAEHOON KIM <jhkim@linux.ibm.com>,
	Breno Leitao <leitao@debian.org>
Subject: Re: [PATCH] vhost: initialize vq->nheads properly
Date: Tue, 29 Jul 2025 10:09:21 +0200	[thread overview]
Message-ID: <c236b8ef-b899-4c23-bded-cf411c5b5ad1@linux.intel.com> (raw)
In-Reply-To: <20250729073916.80647-1-jasowang@redhat.com>

On 2025-07-29 9:39 AM, Jason Wang wrote:
> 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.

nit: as someone who is not familiar with vhost code, it took me a while 
to figure out you meant VHOST_SET_OWNER and the corresponding 
vhost_dev_set_owner()

> 
> Reported-by: JAEHOON KIM <jhkim@linux.ibm.com>
> Reported-by: Breno Leitao <leitao@debian.org>
> Fixes: 7918bb2d19c9 ("vhost: basic in order support")
> Signed-off-by: Jason Wang <jasowang@redhat.com>

Reviewed-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>

Thanks,
Dawid

  reply	other threads:[~2025-07-29  8:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29  7:39 [PATCH] vhost: initialize vq->nheads properly Jason Wang
2025-07-29  8:09 ` Dawid Osuchowski [this message]
2025-07-29  9:11 ` Breno Leitao
2025-07-29  9:56 ` Stefano Garzarella
2025-07-29 13:51 ` JAEHOON KIM
2025-08-04  9:05 ` Jason Wang
2025-08-04 15:57   ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c236b8ef-b899-4c23-bded-cf411c5b5ad1@linux.intel.com \
    --to=dawid.osuchowski@linux.intel.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jhkim@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=virtualization@lists.linux.dev \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox