From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796106475; b=TMUHkgzQbtp36vVLK/tBALzGAXYSl+6SvObnQx+sbGkIudXu9yf4pqs4uJPFHYMdu5b2 AGYUzoitH0CKZqq/RUcxhxtXOwqf1gyRS20I3xrK12jwLdN2Uv+5G/phjXxfB7li0uzD9 QveZWspj+DfziFE853mJaFZjsBitSMsIRlOqMRluzAY0NbdYNuFd/oMXQr53rIyW+ct9f fswta8bAKnTR6Nm8Y1YKs41OZOO0lxp1NpEbm83yaGDphKeZBB8XUwKOmwzqulC8mKd7K 24c/GQaWI48bzukC7AhAK2KDqRWYbFeCugFRIfYGRkpgdRrr2oyacZYmtqLKo0LS1AQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796106475; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=3Zyn7FIt1/NxgRuUoR/3CPKk8Hw7f5J0tO0c04qaDXk=; b=kkw4JCOqzYnEfUoq1oOfyl9ccHt6l17id9gjLtPzb9T9ZD+wg1oC6+2kA1hx3kLZGRqR 2HIDguJ25cbX2tWnAwVAMLkExE2Uzk32zQ7pB/pemryuXSxMBMsuQiMgSg5LkPQcXs2mv JNDPDt5MDaAOwmBZepqufhceejbnC1g9BeOqqZALMWS5zrjj7aIcP7T6pXPO1zPLaQ5R1 YABlPdheRW5rGw14RzJg1b/tvE4oqZXem02pTPHDhUZXPFEMwnc7VsGlo2xSf9Jdm92jH /u+3t1UyGDePileIbutJ8W+r7soAu+jw5K6uuU3mrOIuIWxT4LTgpQrVTSrA27B+Hiw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gQLiQYvV; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E2C2606A33E for ; Tue, 1 Dec 2026 06:27:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gQLiQYvV Received: by smtp.kernel.org (Postfix) with ESMTPSA id D90A01F00893; Tue, 1 Dec 2026 06:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796106475; bh=3Zyn7FIt1/NxgRuUoR/3CPKk8Hw7f5J0tO0c04qaDXk=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=gQLiQYvVwfSRy3JzgPhzdqvx0EslGryXDcqAR0WtdR4tud7ikOpCygXw5MIOACvgm MX8IKNsR/WqST2icxkr7ApyGAFIbVpG88VTZ66vtz2/i2L/cpme1ek7SkyLPOcIh56 Ut7jzeAKJNjaxbWM4Z73XprVjveJRNRfmiNxzUKQ5wVv5mHwsu9JF+G8wwb4WFjGD5 nGtvLFbE7kpTCxiBUevpi3QTl4oHQoZ1Jx03SbGHyIStd/GuBDJnd1Y52BLlXFiBHU B03gpVnRIDvYiFiwnzUOgaXBx9DACFloFSBjAOoC1KeqH0gWf8l52FjCsfBSHXZ5Tr PsyPpAq2qeALw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] vduse: allocate anon inode file after domain initialization Reply-To: sashiko-reviews@lists.linux.dev To: "Xiang Lei" Cc: virtualization@lists.linux.dev, "Michael S. Tsirkin" , "Eugenio Perez" In-Reply-To: <20261201062510.75707-1-leixiang@kylinos.cn> References: <20261201062510.75707-1-leixiang@kylinos.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 06:27:54 +0000 X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > vduse_domain_create() creates the anon-inode file before initializing > stream_iovad and consistent_iovad. If rcache initialization fails, the > error path calls fput(file) and frees domain synchronously, while the > deferred __fput() later runs vduse_domain_release() on the freed domain, > causing a use-after-free and double-free. >=20 > Move anon_inode_getfile() after both IOVA domains are initialized so > failures clean up synchronously without calling fput(). >=20 > Fixes: 32e92d9f6f87 ("iommu/iova: Separate out rcache init") > Cc: stable@vger.kernel.org > Signed-off-by: Xiang Lei Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201062510.7570= 7-1-leixiang@kylinos.cn?part=3D1