From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.6 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796151395; b=D4uJvD9xYXsW2VBdPVPcge/0ZUYoWhFJh9h4cYenWndgWXpMVWgTXHcmEzHKrMpeoVEc /FEdQfeF1935eQLSa2DXCUT4/RV7up7AjBg1t+LSb4ciFtk29iUIP+2+kVHYdbfUMWb5c ZhGRIl3CqEMnqkHvUKw0xF4OgEAek2REKTeSM5y3BuSIJ+ZGzZ/kqwCr+EVyPG/10Y1hH /Z3GvgnCN9aV0r10Ep5hXFQZveIr/SN1eGryleDtwp/XZXFz0Ch1A81udm4Y1fwHKGBOR DmNUNGWKs/++s13UDm1mhE+u/FBrKfZpQDOG7z0Z1QHXp4f7E5/iqA37uIPFoIl7lOQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796151395; h=DMARC-Filter:DKIM-Signature:From:To:Cc:Subject:In-Reply-To: References:Date:Message-ID:Content-Type:Content-Transfer-Encoding: MIME-Version:X-CM-TRANSID:X-Coremail-Antispam:X-CM-SenderInfo; bh=ITe4imbg68kWfYLpemSuzNI1jnWDB6yw9HDZoncBhpE=; b=QgYgPgDTw1CdPrItbz0MQlGuxk3rUQCUbaIUutOuzMt71F+0PL1M3lD3bs3zEydHx4xv jwXsNHWoxuqJposREvN+iPprHQXLWu8qb1EbbVPCpgwJUJCymJUuLnAhvU3vVAJUpmD7o GpYCjCqn6LXpD2CJsy0riyoS5KSrbYU8kZNSWocuZdeGCPF/AdxX3sqfOjmZ16eV2OY6w oqmUORoFMf3PB8t1JkRheChteqxIV8PXYt81/yhTpwNiLOrpdQsRdO4lw3vE5HSg/RMDs IuSIcTp8IZeen+Tlz1vo2yarRenT7miWGiv8n3QwhTxdvYdfu4xmkX5w7S2FnOCPi2Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=126.com; spf=pass smtp.mailfrom=126.com; dkim=pass header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=lBthwkmc; arc=none smtp.remote-ip=220.197.31.6 Received: from m16.mail.126.com (m16.mail.126.com [220.197.31.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32321606A31A; Tue, 1 Dec 2026 18:56:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 32321606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=126.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=126.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=lBthwkmc DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:To:Subject:Date:Message-ID:Content-Type: MIME-Version; bh=ITe4imbg68kWfYLpemSuzNI1jnWDB6yw9HDZoncBhpE=; b=lBthwkmcUIfG/+YjQV37Z8CCH2tTH6JkXu+zIRus+cV6J3kYENGiGqdxBnoI6r Wh6whywtpjdV5yXbkcKRdnoRYlB+Sq0JzWRao126VYgtEy7R2oaticTvph7BfDdE +nLhY4TEjNVJnCj+6AuTIHLalwj/0TXHvCRt+GzSQwPoM= From: Bilal Hashim To: Damien Le Moal , Christoph Hellwig , Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] zloop: fix double-free and use-after-free in zloop_ctl_add() In-Reply-To: <179614753959.27176.11073306063101756949@126.com> References: <179614753959.27176.11073306063101756949@126.com> Date: Wed, 02 Dec 2026 02:55:21 +0800 Message-ID: <179615132146.19728.10165410146895918485@126.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-CM-TRANSID:PikvCgB33+weGA9riCkoEg--.44977S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU1eOpDUUUU X-CM-SenderInfo: 5dhh2vbf6rjloofrz/xtbBrB6zTmsPGD52EQAA3q Please disregard v1. On closer verification, disk_release() only invokes fops->free_disk() when GD_ADDED is set (at the end of add_disk_final()). Therefore, on blk_revalidate_disk_zones() or add_disk() failure, put_disk() does not call zloop_free_disk(), the fall-through cleanup in zloop_ctl_add() is required, and jumping to out in v1 would leak resources. The pr_info() read use-after-free after transitioning zlo->state to Zlo_live is still real. I will send a clean v2 in a new thread that only moves the pr_info() calls before setting Zlo_live. Sorry for the noise. Best regards, Bilal