From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=199.89.1.16 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796224062; b=M2uQExPWkYuG+UUh9eRTxTf/ogI66LY6H9i4sKWay+yCPlmkPdC30BLTQJTiKDiBfhaY kvLp4CdDepJNYQM3/fQioNIq6pkCP3mfP+pudpbTdWRdwE2uCfWByA2gupli6cZS8uSJ5 1gRa7cQl8A1wO8Lu2HaubNxbxXRMA8AOlxATHITdVt3jEwG/iL9H/B3JlquWBwJgIzjvA FNV7rQlkID7RSyiQnf655Ipis8Hw90YsjKFKl0GlVdwfwvfsJ+tZIfiu7Wg1I+oRDI+PD q6NvVWGoOFq6q1RJ97z6BBq4OOYBPY6nMuyi5gAPN9DRepRq+0A06bTPRpv3Zzv6tYQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796224062; h=DMARC-Filter:Received:DKIM-Signature:X-Virus-Scanned:Received: Received:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc: References:Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=PyT2NBN+ecjfnr3dn4Ak3iOC78oVKbt0z7dPLf4FbFE=; b=fiyXl/LxvtwHc3e5H7yvJ8s9/KMWcnqbzJskedZQqEEfIbguLp1niwMVXVlqgLsaQKRL PLLiCfx8kX6oZeJ+4sI7oc4uksTjpugWJ5xMf9nRd7++kj9P3JSAH+FGYCY7s3clp5rUC a64z2gruXCArT4D73dINCdVMzU+kwIKXVV+RzZ4yV4cPjIqyt8sezeF7Z+vZWvgHT46An xSCHf5IQxCWsh9HZUX+/tD6IoGzHBtmi0D//Dh0QkMbAYkYvOH9f4PU48lAoF/bILifgu Vl4yPrn5vfktRkP3ESjB9FkUDHyKVNSaMr5P3F6YDbsc0Bc4kk6S6ULBQAVVdh8nY4Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass header.d=acm.org header.i=@acm.org header.a=rsa-sha256 header.s=mr01 header.b=IRZSE814; arc=none smtp.remote-ip=199.89.1.16 Received: from 013.lax.mailroute.net (013.lax.mailroute.net [199.89.1.16]) (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 AEE1C606A31A; Wed, 2 Dec 2026 15:07:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AEE1C606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=acm.org header.i=@acm.org header.a=rsa-sha256 header.s=mr01 header.b=IRZSE814 Received: from localhost (localhost [127.0.0.1]) by 013.lax.mailroute.net (Postfix) with ESMTP id 4jfh2P1yKQzlfvpw; Wed, 2 Dec 2026 15:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :user-agent:mime-version:date:date:message-id:received:received; s=mr01; t=1796224059; x=1798816060; bh=PyT2NBN+ecjfnr3dn4Ak3iOC 78oVKbt0z7dPLf4FbFE=; b=IRZSE814/+2AieJb87yk8EanoF+m1Jhp0UKB6xEf 0jCK4Lpub5D1cQ4T06ATEAqdlxFbr+rtt6rQn/+Xlr4v8py45QiRKbAPIxFDMoO+ SGf1IJn0yF6BLHv82qcfEhEPHPiiXhn+4mjEIPMElTAbXH+sxxy9WVFZw3ou1apx gcHIA2Z2qUE2u5xCKR1pzruEt+XveU5U5vGbGTNN3erJgpDiRzObsT8RpQct4ppE RSJKDhDH+iJ3mPQKgw8gF7B4LahFQVuOhskpcDJoLSyX5y1rj8B/ynb0qk+40U/L Vi/L9BmO5HPQHA5hvo6qLiJQ4Q8/zcIDQytsJhKPZfdJPg== X-Virus-Scanned: by MailRoute Received: from 013.lax.mailroute.net ([127.0.0.1]) by localhost (013.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id BExevtafQz7k; Wed, 2 Dec 2026 15:07:39 +0000 (UTC) Received: from [192.168.0.215] (c-24-6-239-25.hsd1.ca.comcast.net [24.6.239.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 013.lax.mailroute.net (Postfix) with ESMTPSA id 4jfh2L6S8hzlfvpp; Wed, 2 Dec 2026 15:07:38 +0000 (UTC) Message-ID: Date: Wed, 2 Dec 2026 07:07:37 -0800 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] scsi: core: Protect host_busy reads against tag set teardown To: Shuo Qin <23159100078@stu.xidian.edu.cn>, "James E.J. Bottomley" , "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org, Ming Lei , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Bin Yu , Cheng Wen , XinCheng Wang <26031212453@stu.xidian.edu.cn> References: <20261202120443.15341-1-23159100078@stu.xidian.edu.cn> Content-Language: en-US From: Bart Van Assche In-Reply-To: <20261202120443.15341-1-23159100078@stu.xidian.edu.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/2/26 4:04 AM, Shuo Qin wrote: > show_host_busy() can race with SCSI host removal. scsi_remove_host() > drops the host's tagset_refcnt reference and waits for the tag set to > be freed before unregistering shost_dev. During this interval the > host_busy attribute is still accessible, but its callback does not > hold a tag set reference while calling scsi_host_busy(). Why has the approach of this patch been selected instead of adding a kref_get() call before scsi_remove_host() and a kref_put() call after shost_busy has been removed? Thanks, Bart.