From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BC51242D70 for ; Mon, 4 Aug 2025 15:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754323076; cv=none; b=s1+XlXUE1k8aqvufZWxvV0F5bJw1MujlwgFWXIpBXq5mzxW2sl7HEzJcyI23wAYf9QxpKRN18RzxdbhT41ahyjXZo3UmDLqTCauFYpnCsKqZotbP3Gp3L1aZYuyJ5iOUKCjvCUEqOE0zSCKiNUdkQzz7lLTmTYzqBcpXliTQDxc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754323076; c=relaxed/simple; bh=pDVC7rFBszGbUr0AQQyyEXmDE6L9VQjbDNm8JyUEdWU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o1s3B36G6LQ6lcfPSkeEEjGNkWqz2wzjeEemSl/NAY0CUyNm1m9iz479/KzmbUKejEQKckws5KWNAlnCcnvjBxqjlvjsRQ0I/OUSDxHBBNP1meg3urSuYeDUg0CTmebWf+W8gW/CuuPnCa8gKbYd+7srWZZxim4qn2ddWfZSt8w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=HFYrKFof; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HFYrKFof" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754323074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T9mUgdLRs3w5PT298F337vFTebghvsVRguazdU4qoq0=; b=HFYrKFofjQCOwor3NnBqL6C/AAFXn8hGBnVZtyZPqluonKVwqhUY8x0XaPhzhDVTnTebeg V6O6vj7f5/68Tc+b+Jc6zOw627ZyicajXPv60C6r44W+sEp6lW2aXrsUoGqyFt2XhOGpl9 pHMGhMwuGkT4gSnI+RtmPDzirQDljg4= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-230-6yxbU-PXMhS5dNM9jpta8g-1; Mon, 04 Aug 2025 11:57:51 -0400 X-MC-Unique: 6yxbU-PXMhS5dNM9jpta8g-1 X-Mimecast-MFC-AGG-ID: 6yxbU-PXMhS5dNM9jpta8g_1754323070 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-456267c79deso10201325e9.1 for ; Mon, 04 Aug 2025 08:57:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754323070; x=1754927870; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=T9mUgdLRs3w5PT298F337vFTebghvsVRguazdU4qoq0=; b=XLPSpBD2SkIkREdXgtkp1me7W3TrfaCjOp5LUR62vELuwYbHZ2oc5V98+PpUqHKipE 5NA5U/xMQo5otgQWErIRm77eDxfB0XnYqmhroZzVWg9oz0h5efCEUwdpLPmIdGfX4kzC plpgtsLHEqzTHt7RFCQDubMPlJOauSkq3EecOmg9OpLbPYgdbiEjRut51kNXIG4wl90Z LbpCVZpdLhZ+Tcj5GquZPXNHdRGCAFIlqf+jaMLZko35V0KjrAgAihMyRzjH0nDjlJQY Or7CjhT1Aq69fXNveN9AEGngI0XZAo4yu+HGEk3dP6bhcDOwaScKlqjU++AB92hq23fZ ratA== X-Forwarded-Encrypted: i=1; AJvYcCXQb+b6JOBQ6rDTkqVgKrI9WGo7ArRt8XmH/ZDO6ODewKvLkWZUhuHAEsMKqSqqzxTpcWk=@vger.kernel.org X-Gm-Message-State: AOJu0YzKMgQUKItsqzshMdVZUrY7adDtVXXBH5vwbbnL7o5c9PFkXrrj X/0Zjh5R5MCdv0cjDo+uz8FGilXd/4ZGGXIXBcFaKEZUCpJc1h3JQU9VWPi+gpcmOt8kMIAC0lM R/hDI615ZQzW0sbH5zgCCIIbvdEAnJ9ZjtTLpzl3TxBuNmzryC2vHIg== X-Gm-Gg: ASbGncunhD+dj8tUdew0rP2/XNewY44hzh8P3dIIB/M4vwcmnssmgZ+eSvB+w/roL41 xbt7xEdcKsyQ4JUGwD+Z+NaJYkUu/jQxMZk5kK03jtqOmEZAWo76+blN2ATBp26PWteAR+dxzVh cIibXs22CQc10/HU4kKU67hILw0Eu0pArPXjvvMhfDU8BWHGjOeN4u6qtjWEsinDR9b81hdVN9E c//YFM2s/tolunTOydhg0B8qn7o++EdpnacF+Ct/Kx61oQl0Dw3nNotc/lz6XPhHjQgRa8O1Akl JESIXvRPEpgtaUzroqftaxNsgQkf7NJZ X-Received: by 2002:a05:600c:19d4:b0:458:c059:7d86 with SMTP id 5b1f17b1804b1-458c0597ec7mr60423665e9.10.1754323069733; Mon, 04 Aug 2025 08:57:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvZfiMjphP3x3l4zUqhsolAK9PHooH9Tsp0BlG/3TnfFNZ2tCNNeobV4uf7R2ru3mb+8//yA== X-Received: by 2002:a05:600c:19d4:b0:458:c059:7d86 with SMTP id 5b1f17b1804b1-458c0597ec7mr60423395e9.10.1754323069333; Mon, 04 Aug 2025 08:57:49 -0700 (PDT) Received: from redhat.com ([2a0d:6fc0:1515:7300:62e6:253a:2a96:5e3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b8e054036bsm6166517f8f.31.2025.08.04.08.57.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Aug 2025 08:57:48 -0700 (PDT) Date: Mon, 4 Aug 2025 11:57:46 -0400 From: "Michael S. Tsirkin" To: Jason Wang Cc: eperezma@redhat.com, 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 , Breno Leitao Subject: Re: [PATCH] vhost: initialize vq->nheads properly Message-ID: <20250804115728-mutt-send-email-mst@kernel.org> References: <20250729073916.80647-1-jasowang@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 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. > > > > Reported-by: JAEHOON KIM > > Reported-by: Breno Leitao > > Fixes: 7918bb2d19c9 ("vhost: basic in order support") > > Signed-off-by: Jason Wang > > I didn't see this in your pull request. > > Thanks in next now. Will be in the next pull, thanks! -- MST