Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp517836rdh; Sat, 23 Sep 2023 23:29:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6/7CNkek6jwllVYbrXa8nJLHwyC7tnBXakQ4s2Bu96dPD28/vHCV48aKg9VpngYBTLzZ5 X-Received: by 2002:a05:6a00:b56:b0:690:3b59:cc7a with SMTP id p22-20020a056a000b5600b006903b59cc7amr5485689pfo.23.1695536998800; Sat, 23 Sep 2023 23:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695536998; cv=none; d=google.com; s=arc-20160816; b=v3Gck1sWakMQ0vXNC4BRWK3mwOMCrDGjHnT8fguW2ntV28q4fZsp3XuNYwinpAV6HE QJxm5ukTUaP3RaSFhvyZaDeYlkjrpZfnzyFMc0qvTWTCDXJeKejk1JxthS54rOSzXqjs 8uo2B+rGc5Y02EM5YGGcIrMWLuZ1rlsDltsAHv0O0NbVn8tKuokk0fVzoo3avyNs7OiW K4AUyj2E6WQSJIkgYQ5tZo4ICQkF0589+RMyYa5Fo6J/y2nMMzC271sNSom4TNaLihr2 3eigN9D+jjBFrGm87+e6MTGOngU2F/KoqFDxUCEsYrmLsL69VrSyPODTLKj60oHcwA/t rbZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=zSgdMaJfzr0qDUoJeeutc7/ZWkiPJxpX0c+YkFR5SW4=; fh=n00bzXvYqWHbtjkIDKieqpuBrZ70iAF2ySxOhP4S88c=; b=wSnCeSyj5oa4iplyt6iU1nWPpgTYPoKMM9rGijxEcmIuukm0RfWDj48QbT2iazSGEm 26VjSO+oeBSteQ1FwxmGcFoKfVCwHEPmb4KXxqa+uuTy7xmLE4zvr3yzP1O4g7N+hfsN D0ydFDJtqBwX/QbAE52eavl1zymv0+A9wLj55SAZFu1RsxXADUyznRAgfRwwgkxWm2J3 zBRWtmwhm47/XGTu2V3ruM2kMj/MBcSk0Cfp3vBOy0ZfpK8dl0H9Rh+A2maBNppGAK5b WvgxF+uks/3crYWG+sVS6A/8h92+TPM6nz4mn17I92jkcadVU7pAy6DWb1gkO+D0l60G 3arg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id x19-20020aa793b3000000b0068e4704fd5bsi6885685pff.346.2023.09.23.23.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 23:29:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 40C0580EA7B9; Sat, 23 Sep 2023 23:29:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229808AbjIXG3Y (ORCPT + 99 others); Sun, 24 Sep 2023 02:29:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjIXG3X (ORCPT ); Sun, 24 Sep 2023 02:29:23 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B426107; Sat, 23 Sep 2023 23:29:16 -0700 (PDT) Received: from kwepemm000012.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Rtbbg0lrXzMlfk; Sun, 24 Sep 2023 14:25:35 +0800 (CST) Received: from [10.174.178.220] (10.174.178.220) by kwepemm000012.china.huawei.com (7.193.23.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Sun, 24 Sep 2023 14:29:13 +0800 Message-ID: Date: Sun, 24 Sep 2023 14:29:12 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 2/2] scsi: Add comment of target_destroy in scsi_host_template Content-Language: en-US To: Bart Van Assche , "James E . J . Bottomley" , "Martin K . Petersen" , , CC: , References: <20230922093842.2646157-1-haowenchao2@huawei.com> <20230922093842.2646157-3-haowenchao2@huawei.com> <9567a78a-baf8-432b-b279-cfc56d370a1d@acm.org> From: Wenchao Hao In-Reply-To: <9567a78a-baf8-432b-b279-cfc56d370a1d@acm.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.178.220] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm000012.china.huawei.com (7.193.23.142) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 23 Sep 2023 23:29:52 -0700 (PDT) On 2023/9/22 22:53, Bart Van Assche wrote: > On 9/22/23 02:38, Wenchao Hao wrote: >> Add comment to tell callback function target_destroy of >> scsi_host_template is called in atomic context. >> >> Signed-off-by: Wenchao Hao >> --- >>   include/scsi/scsi_host.h | 3 +++ >>   1 file changed, 3 insertions(+) >> >> diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h >> index 49f768d0ff37..a72248fa5adf 100644 >> --- a/include/scsi/scsi_host.h >> +++ b/include/scsi/scsi_host.h >> @@ -245,6 +245,9 @@ struct scsi_host_template { >>        * midlayer calls this point so that the driver may deallocate >>        * and terminate any references to the target. >>        * >> +     * Note: this callback in called with spin_lock held, so donot >> +     * call functions might cause schedule >> +     * > > This comment should mention which spinlock is held. > Would update, thanks for your review suggestion. > Thanks, > > Bart. > >