From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE85642B300 for ; Wed, 12 Aug 2026 10:55:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786532113; cv=none; b=FTb6UJfJ1zq0sSTiL9eFoe8Ign7jedvLcC/mfBzHIC05rHbEAU3yDHV9Yp+59E/TtAdpjtqqLG9gA/lY4MTCdcj2vDiA4yVQTno+1NWckA08LkdjqhyUWH/Yjjcg7sJCZG0PjlCKiVC0KXeG411xq60Aug2fw3OjFni+5XFFaJw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786532113; c=relaxed/simple; bh=RAYL+HImpy2MxY1r4xQwqPshEhKI6Z/GM/3pC/Um+P4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mKN9lnerVvigqb5i1mEktz/VPF7gBw8dz99kwyLAxJhENlHizO9qLAPRSiGhKgzURekqBsp4wsk+rrfDaIF2Nm1TDozI7+FT92GJtVmnEtzKHol1RhbUsNHY5xZeUs0PylqDLIeZl/esUoIC8BjCbVSglZEH/LIOrvo2a+uU5Cg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bZPdNm+0; arc=none smtp.client-ip=209.85.216.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bZPdNm+0" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-38a0c7e841fso1191096a91.2 for ; Wed, 12 Aug 2026 03:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786532111; x=1787136911; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=v1giYEEFDAdDWhpqNCDj5Oim4DUh+IAW8TxGs1lj9Po=; b=bZPdNm+0CihV9O8OxAGQ5LR0+jv5sq0oSfo+C2jeo0l1WeCi4xem+7db7zdIcCWfcI lD17VPem/LojIKB6gF4/6v1X66CEOPBcfGarfDwnwECq6YzCWcnlFx1DSI96eiCTgeB7 wZ1hTZQmGqP6OLCysKxgukbMaDTFI40ihvuWJXPX+OGPeBUbaA5p8/NitiEPZhlEoaiI 3gCjklaD7imFJ50o87U2yyWSMOuUJngMOdqwwn1Uai7Y3jt2u553x+ulV02Dxijg0zQt BBR9HJQMrzbzxV9BfzVInvPZw1WtQn++QukYWpM7Mj17lNNFoPbla3aVrXXF8+Z40AMg xJHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786532111; x=1787136911; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=v1giYEEFDAdDWhpqNCDj5Oim4DUh+IAW8TxGs1lj9Po=; b=RECPnW+7stGBwRVxSRKgQeGh9trQdX312FUnWSb+lYkMqKtKrrl1Z3MtNSUF4NChbM Nmx4WnfTq5ZbUQRGQ61paBPulcMb3UqhfM58gsnaVCVvkQkFWhG60VqhoiqKh//VeSIg cuLIvco1BUA1xt2WB52eoSB66QL/SLBatY72RfZn/FOVmAz1/xry+fvkVP8pmIxPvJKX HWPCjnZio19vO8zNouUGT2O1rUKdy1pk4XYtOEtHMNqsVvRnJ7/3cKzw0IrHCf1qObWR ykjpesAsW7g0DuFe/SqFXZJy1wuACiIOXIXN42wNd/L4mah8GeeKLYziuLG4UFx2aa+1 w4XQ== X-Forwarded-Encrypted: i=1; AHgh+RqGEegv+Rwpi3dt8T9gR0slNgCw68z1n3q2jzhj824cRK9i1FUujySBhg2PDMDRpqqdmVXdpdrxPCo6bk8=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0xYyBCyni519xn9MUijtPgOMSLET0xsXE9BHUJ3LFl+UM3KKt kTxeJAfB6Gf9JA20NiQT2VnWFAJVjGz6I8uBitoh2eDIbbDlV6TWkibs X-Gm-Gg: AR+sD12aWS43sNw4Nc5sLwwi6pxtYkn+YI+yLTrD6pYalgy0oB9xHr6h/dznrGVt10J Qg8fNJgd93w8dcL5dP0DSAUEct8T5lOW80CPC2Iz9HItrW+L5BAFL69r5Uh/OBoC+aY/Y1560tG Jbc31tGl4KWDkaVVwGY8WwrN65wXvrYh1Yy4vSXS3aXbuOPHxM43KKu6FWuBlKEW3BNSTa375Dq mUeldMlZLcwvFfoKXTg64LiqM667cUC3OLCl0q1XumnoNbWTTSG4AL96r7co+sFOe+XUwi80Lo7 593a1l2rKKf4FW0R4N3DVqwNakE/U+5HVDenJergVYfBfIGuLYCcb24AiK7zWRqVzyFj7bAVJw+ WqyAxZpRpFoVqn/254RDABzvVqOOKV9iVuQsBMpir6SDq5D9afqCNVPVUGZ2rBJyhbFnIRmo+HC tK1toTM8gZN4d9vlXd3r2YhOAMa04FILpXTn6EXHHHmPyxKhmeFt0chAHpxAiN X-Received: by 2002:a17:90b:1c91:b0:38e:49c0:75a7 with SMTP id 98e67ed59e1d1-3930125aa9dmr4302769a91.8.1786532110400; Wed, 12 Aug 2026 03:55:10 -0700 (PDT) Received: from ubuntu.. ([219.241.133.184]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-392f8cffe2csm3215244a91.10.2026.08.12.03.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 03:55:09 -0700 (PDT) From: Rihyeon Kim To: kbusch@kernel.org Cc: hch@lst.de, sagi@grimberg.me, axboe@kernel.dk, justin.tee@broadcom.com, nareshgottumukkala83@gmail.com, paul.ely@broadcom.com, kch@nvidia.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails Date: Wed, 12 Aug 2026 19:55:04 +0900 Message-ID: <20260812105504.53711-1-rihyeon8648@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello, Thanks for the review. > Can't you move the setting from the "fail_ctrl:" label to the > "out_put_ctrl:" one instead of duplicating it for both? Yes. I had kept both because I was not sure the put inside nvme_uninit_ctrl() could not be the last one, which would run nvme_fc_ctrl_free() before out_put_ctrl: cleared the pointer. As far as I could tell nvme-tcp and nvme-rdma use the same uninit-then-put ladder, and testing does not show it either. I swept fail-nth 1..200 over the connect write with fcloop and failslab: unpatched hits the report at 17, and with the clear moved all 200 pass, 21 of the injections landing in nvme_alloc_admin_tag_set(), so fail_ctrl: is covered as well. It also looks like moving it drops the window where opts is already NULL while the fabrics sysfs attributes, which do not check it, are still there. v2 on the way. Thanks, Rihyeon