From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A140A38F95F for ; Mon, 9 Mar 2026 10:28:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773052113; cv=none; b=gwefr5qt+U/w0R8m7VphHVD4Rae6K4Z0v0om9uLYvBXrmAzJYpgC9Gqq0wY3ouBtYRTlk/etPMRBwL5ni0nUGJFBZI/tGtRB4NS0A23nUbvgnJEcffIglYmjsHCofnn/vqa6pt/cqoy6BOIgWhLjP/9fnF6hu2jCAShH7mUJRQk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773052113; c=relaxed/simple; bh=rf3+VkM2RttRKDa6HlM4wUqh6hYbbSdi09CWUTraQt0=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=oEd+4qPtQ0z8ReQcSMYFLWT4kzKLDNnNivw7u38eZ2qdfJVUx7o9bZQcj7ckUfrsQ0EEtdOGQfC4pz4vHFyRBa8jaOA5S1reIxcLKYUiPSITi4JAPCojo0o3LtDDtRWecpItXKPoun+LnHRb0FQJ7mBmbBRcgy4y0oeZWv/CK5w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GUNjgBMD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="GUNjgBMD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E490C2BCAF; Mon, 9 Mar 2026 10:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773052113; bh=rf3+VkM2RttRKDa6HlM4wUqh6hYbbSdi09CWUTraQt0=; h=Subject:To:Cc:From:Date:From; b=GUNjgBMDsq06eHEAq6mSkeA2f1fiwmqW26/U1V2nd3vQ3cc5wgzDDd3yIyo+OssQS eJH4EgE32xYLA2NWdjVtwCWMwoXx75eNaaM2IC8rGRNd3bajIJMOiNzKuZpqxtCBQd rB/PH52IVaMes7DPtmg+31QuCZU+Kf8x/56V7OB0= Subject: FAILED: patch "[PATCH] scsi: core: Fix refcount leak for tagset_refcnt" failed to apply to 5.10-stable tree To: junxiao.bi@oracle.com,bvanassche@acm.org,martin.petersen@oracle.com,michael.christie@oracle.com Cc: From: Date: Mon, 09 Mar 2026 11:28:30 +0100 Message-ID: <2026030930-harness-footbath-ccba@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 1ac22c8eae81366101597d48360718dff9b9d980 # git commit -s git send-email --to '' --in-reply-to '2026030930-harness-footbath-ccba@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 1ac22c8eae81366101597d48360718dff9b9d980 Mon Sep 17 00:00:00 2001 From: Junxiao Bi Date: Mon, 23 Feb 2026 15:27:28 -0800 Subject: [PATCH] scsi: core: Fix refcount leak for tagset_refcnt This leak will cause a hang when tearing down the SCSI host. For example, iscsid hangs with the following call trace: [130120.652718] scsi_alloc_sdev: Allocation failure during SCSI scanning, some SCSI devices might not be configured PID: 2528 TASK: ffff9d0408974e00 CPU: 3 COMMAND: "iscsid" #0 [ffffb5b9c134b9e0] __schedule at ffffffff860657d4 #1 [ffffb5b9c134ba28] schedule at ffffffff86065c6f #2 [ffffb5b9c134ba40] schedule_timeout at ffffffff86069fb0 #3 [ffffb5b9c134bab0] __wait_for_common at ffffffff8606674f #4 [ffffb5b9c134bb10] scsi_remove_host at ffffffff85bfe84b #5 [ffffb5b9c134bb30] iscsi_sw_tcp_session_destroy at ffffffffc03031c4 [iscsi_tcp] #6 [ffffb5b9c134bb48] iscsi_if_recv_msg at ffffffffc0292692 [scsi_transport_iscsi] #7 [ffffb5b9c134bb98] iscsi_if_rx at ffffffffc02929c2 [scsi_transport_iscsi] #8 [ffffb5b9c134bbf0] netlink_unicast at ffffffff85e551d6 #9 [ffffb5b9c134bc38] netlink_sendmsg at ffffffff85e554ef Fixes: 8fe4ce5836e9 ("scsi: core: Fix a use-after-free") Cc: stable@vger.kernel.org Signed-off-by: Junxiao Bi Reviewed-by: Mike Christie Reviewed-by: Bart Van Assche Link: https://patch.msgid.link/20260223232728.93350-1-junxiao.bi@oracle.com Signed-off-by: Martin K. Petersen diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 60c06fa4ec32..2cfcf1f5d6a4 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -361,6 +361,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, * since we use this queue depth most of times. */ if (scsi_realloc_sdev_budget_map(sdev, depth)) { + kref_put(&sdev->host->tagset_refcnt, scsi_mq_free_tags); put_device(&starget->dev); kfree(sdev); goto out;