From nobody Tue Dec 2 00:46:07 2025 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) (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 DAD9423EAAB for ; Sun, 23 Nov 2025 17:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763920691; cv=none; b=M0hD/KAymPlkFrqv5AakBXdYfy1d5BecJxju7A6K8xPJ9cyAEGkyY3KoLZQ9luTFHc85HCpkoTTAOUtiTWC0pw5+hlmjcjlNQF+uD3p3R4LhoLjT1rQ5INFruxjaO4yELuKumT65S88cNRRYBOsuYOP3jpoXSp4b72KbObhZz30= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763920691; c=relaxed/simple; bh=IdrcSvJ1MGOPznQILO3f3sgw+rqgjbAlbWwbtIfCVl8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qi80hVMRphMOuIAc6up2/eMKQVRtBPLS7v+G92TmfAFz9P2MNtT91KtiY+4YujQdmot1Lxdoq0c+/MhLx9dCfe4FUT5epezzyB/sG+TPxcarcxry1ULap0ytrn5jLuKeR8cbmP2S9DpezicZvNdc65hw2gsHKf5sSZbauzYWpuo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=MPam6zo7; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=c4+aEApF; arc=none smtp.client-ip=80.241.56.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="MPam6zo7"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="c4+aEApF" Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4dDxWZ0LS2z9tsR; Sun, 23 Nov 2025 18:58:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1763920682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gseAWsYENWws/CLKiwf2oXz16cFfq2UYnVYd9WRaur8=; b=MPam6zo7/qr6BMxc9OMQjL5Cglv8IqrzeYNjs45Yqj5WXXVHmpknUNiRLXVLbNURGoaHgt jESGnxjPWnQv5Y84NzMgLEQM9w/n5/bQTJHz5+NWc2j4Wk3k7RyLbkgMxFmH+JbVgp7FJR SZxyn6U0MUeeooHoqCEmjdpXXDn3mAHumdfDyUcXTASnr/tG8h6guBaSpw0mgKRxTIUYHf 7utC/NL+Y/iRNC0tFW9IrFKoAzuUgm1f8+dPqwyiZmgJYJZzWdobU2Yfl/t237FvUn2aZZ Rhs8FMGf01pXsCqQTAEOzLr5SQ3KPzwzwi/jVLhNRDbfA0WtVH1aiLTmoqciag== From: Maurice Hieronymus DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1763920680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gseAWsYENWws/CLKiwf2oXz16cFfq2UYnVYd9WRaur8=; b=c4+aEApFS21CMWJ+YmxxXOkeNsWUeuetGiDarLoD3PKsIjMY1yOZQ2Hx16vkBVxQaGsP/Q qFAdhDCZIi2wRODSiK+CptoO1d9cVwlCYIIjPAGeMW0/qxGZ67R+K2s9SEd/FBjgwrdzfU NI/YSxoyBhqowiLtMe1Bmegt05bR3d1UtQ8PK6+/IdSduvcDWjQTkK1j+veQoXbD5hPXVI ZjCgz975aMtPsSVY4/oZYSc8REpuH/jslgr3dQ5/YbnL3AJwZeB4noSsRCt+T+OJ6/3m4v FKDvBmkn3BD+OftqIJfUO5iBHzOqH17lGdqVV13TtkvE2ZRpNr/RWEqwgwDpGQ== To: david@kernel.org, mst@redhat.com, jasowang@redhat.com Cc: virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, Maurice Hieronymus Subject: [PATCH 1/2] virtio-balloon: Destroy mutex before freeing virtio_balloon Date: Sun, 23 Nov 2025 18:57:48 +0100 Message-ID: <20251123175750.445461-2-mhi@mailbox.org> In-Reply-To: <20251123175750.445461-1-mhi@mailbox.org> References: <20251123175750.445461-1-mhi@mailbox.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MBO-RS-ID: e4f5e7ae7d1d6563d64 X-MBO-RS-META: rgghs7g74sp4h8wsoc98g7gej4kz7i97 Content-Type: text/plain; charset="utf-8" Add a call to mutex_destroy in the error code path as well as in the virtballoon_remove code path. Signed-off-by: Maurice Hieronymus Acked-by: David Hildenbrand (Red Hat) --- drivers/virtio/virtio_balloon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloo= n.c index 1b93d8c64361..078b87720a0d 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1094,6 +1094,7 @@ static int virtballoon_probe(struct virtio_device *vd= ev) out_del_vqs: vdev->config->del_vqs(vdev); out_free_vb: + mutex_destroy(&vb->balloon_lock); kfree(vb); out: return err; @@ -1138,6 +1139,7 @@ static void virtballoon_remove(struct virtio_device *= vdev) } =20 remove_common(vb); + mutex_destroy(&vb->balloon_lock); kfree(vb); } =20 --=20 2.50.1 From nobody Tue Dec 2 00:46:07 2025 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) (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 84B7113777E for ; Sun, 23 Nov 2025 17:58:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763920692; cv=none; b=kVNq297xmKELn04Ve26GTjan5xRqv//a1qMPVWR6l0ArjXbdSgDPa7htPK7IlR8t43rYAdrSEHo+0Cv9CB6peNErD0R991dV9/dR10QOAiXmx6iDxEjEWlpWgjejJ/IuE9oB4aAc+iHrH8pWQv3VyaYhfFwwMDMIrukpYcJoUH0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763920692; c=relaxed/simple; bh=y7J6v3zCvZlT+LHUAYO/2xbi8IRJtDPRAbPSVJZKoEE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uFvtKFnaO1pd4EOukBdEmh4E81SycwNBsihvStQbj1g+j4/WYe4YOhwgSg0KcB3yPTPM7TK0lk/JzyeOt13jpyIt/6ysG77b1NS9wnERRDxC+UjCSY7EuYmuULkbabG+bf89FV+ueihNu5EtP1H1i9Qxfe9aGrjvMWpiB/y0HW0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=J41rYG0s; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=YHZ0Y5Zf; arc=none smtp.client-ip=80.241.56.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="J41rYG0s"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="YHZ0Y5Zf" Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4dDxWb1LJxz9spL; Sun, 23 Nov 2025 18:58:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1763920683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xjc0aWNFNsV5l7EKzxLKf0zkHg2HPDKuuRPcOFmsQ14=; b=J41rYG0s+J0g/Qjm6wtWsA3zfqMOX7yl74vaULRJii9sk3TzBgFdx5cKkTVCgK5MjQn+QI MZi1Jg1DanSRhF3yDDjZUBhVrMSbhfi2roOdNdTSjQeob9dhw2B2cXDMDFsjpLkJ/qEhpc B79Kno4Dy5Uc3n5Q2yqz5AGQGfQzBmYknKEHPlGU0eKtl1mNZo9g5riBIoCbvQQR0EmYxo qJfLObp0MS4Y8fRz4xFt8KuKIZJIdabVkkW/9mpAJmYtXq2bQJbIoTnr2YPTPjmDJV3ZlL TiCf3r0LSqy1CmXzlIoI8cKr2XHg+1rUQQw3pft2pQXnISvwFNzH14FxkQvRlw== From: Maurice Hieronymus DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1763920681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xjc0aWNFNsV5l7EKzxLKf0zkHg2HPDKuuRPcOFmsQ14=; b=YHZ0Y5ZfxfvqAng3hdIzUC8FFdJt2Lh/RtuI3nvz7bV1nyzd4Nmyca8qj7dzo5WL/Qw6fj X9GqIDOl1fqFTnvv5wvRPcp32XaQLcfmUwhGIXhsjD6OXw0SXsQLTHBFjPmYKtfIfTFxKM 6rXBtQoBIlRK9zP8ofSj0zVpgqiUTMnH8NLDovtA4tLQ3LjIN3HoRprXZlAgZaE2FRxVzg qESM62vKsjUDkK40EU9KuOAvXX1QMcD/9oGCT9ZZhbCq5fRT61nrcinNzx65O3NXBCmwfO 2gDoFet54EMtWrhxnXCB9JPJzROvvAd+fI8sKjhhNDnngvi5QOtsiA4FImDq0g== To: david@kernel.org, mst@redhat.com, jasowang@redhat.com Cc: virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, Maurice Hieronymus Subject: [PATCH 2/2] virtio-mem: Destroy mutex before freeing virtio_mem Date: Sun, 23 Nov 2025 18:57:49 +0100 Message-ID: <20251123175750.445461-3-mhi@mailbox.org> In-Reply-To: <20251123175750.445461-1-mhi@mailbox.org> References: <20251123175750.445461-1-mhi@mailbox.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MBO-RS-ID: 4a276b6c63f95b4e1e4 X-MBO-RS-META: amaespxjkc9eokwnsiq8ta6z3fdr3rw1 Content-Type: text/plain; charset="utf-8" Add a call to mutex_destroy in the error code path as well as in the virtio_mem_remove code path. Signed-off-by: Maurice Hieronymus Acked-by: David Hildenbrand (Red Hat) --- drivers/virtio/virtio_mem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index 1688ecd69a04..8107988dcb05 100644 --- a/drivers/virtio/virtio_mem.c +++ b/drivers/virtio/virtio_mem.c @@ -2975,6 +2975,7 @@ static int virtio_mem_probe(struct virtio_device *vde= v) out_del_vq: vdev->config->del_vqs(vdev); out_free_vm: + mutex_destroy(&vm->hotplug_mutex); kfree(vm); vdev->priv =3D NULL; =20 @@ -3067,6 +3068,7 @@ static void virtio_mem_remove(struct virtio_device *v= dev) virtio_reset_device(vdev); vdev->config->del_vqs(vdev); =20 + mutex_destroy(&vm->hotplug_mutex); kfree(vm); vdev->priv =3D NULL; } --=20 2.50.1