Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2578568rdb; Fri, 22 Sep 2023 02:51:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHU0dNHDNS60h5JLjxAhfNlFM5/sNez2D7FXWExP7mdhsrAxubxHGNbKjxhWbBJN/5Fugen X-Received: by 2002:a17:90b:1002:b0:25d:eca9:1621 with SMTP id gm2-20020a17090b100200b0025deca91621mr7455541pjb.6.1695376288577; Fri, 22 Sep 2023 02:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695376288; cv=none; d=google.com; s=arc-20160816; b=sDsiqxI+WrdXfRSYZYhWPexhFCzdmS57FAzVkcj/CQqmpGryearivwg8ovw3wCkbOv CRWc+HXAFU+7pWQ3npMaQW6juxpbV6DGjRPVSW76O1D3jKojxT4UMYAt0v3mJaAWN7ei Sb1NtUnh2oekPixinS+anwGtNYA4avjxrbJhkQFt/ZsBPwPcuuXE7dpZs8rcDB9Il2iO TdnRrVDaWzsUmpQTFzrSs5FGJ9rzonfBGhbVy3EiVmee+CmfLFkMqDToMXM0Ll3zlzyP vUObl30PuDjb9sk0Xn6fIXpXFkqNhtxk1e95Tctrx4e5opzoGllTTYvt7TyrPBUUCAtI oWcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rPA8MSMJ8Ho8H+VmpnWrqcLPduKaYRFcpo3eauznfsA=; fh=czI/RuS43lIcejQG7heSpqlilKbUywFjC/3GVjzlias=; b=c/8oNaNUyml2qYRCLdGKihUAZt30Vk8q94sUK0fu9ya0MUFlPYqf/zs3/z4zStkjFL oOxdMQegb66QJwU79bxbOxOwG+h99fSk3e4U7HmP17aCWPMDxPMGtPeqzzuCdAtcWLxJ rFoCLyUOF/o+HS4ew0KdrPczTJJS9UGuTh+nQUIrasei+aFZgiOmJ5Jv6zwCHmKtyeKQ SqcjZ3TyCqFac5cKVGv9ahIDmDnIGUGq4T6/90nD4fIzKiBg2vMhcej6pP4RmINdTQhk /zDT3ZwbTUkgEkxkDLJFQYyX97e+44ONA0WXLCG91LbZg/ZJTgd+sfF+LFP8kWN4y4jj hETw== 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 lt12-20020a17090b354c00b00276c28cdd4fsi3539278pjb.31.2023.09.22.02.51.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 02:51:28 -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 91F38838CF9B; Fri, 22 Sep 2023 02:39:23 -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 S233172AbjIVJjW (ORCPT + 99 others); Fri, 22 Sep 2023 05:39:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233236AbjIVJjO (ORCPT ); Fri, 22 Sep 2023 05:39:14 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A91D1A8; Fri, 22 Sep 2023 02:39:08 -0700 (PDT) Received: from kwepemm000012.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4RsRvj2s01zMlmt; Fri, 22 Sep 2023 17:35:29 +0800 (CST) Received: from build.huawei.com (10.175.101.6) 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; Fri, 22 Sep 2023 17:39:06 +0800 From: Wenchao Hao To: "James E . J . Bottomley" , "Martin K . Petersen" , , CC: , , Wenchao Hao Subject: [PATCH 2/2] scsi: Add comment of target_destroy in scsi_host_template Date: Fri, 22 Sep 2023 17:38:42 +0800 Message-ID: <20230922093842.2646157-3-haowenchao2@huawei.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230922093842.2646157-1-haowenchao2@huawei.com> References: <20230922093842.2646157-1-haowenchao2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm000012.china.huawei.com (7.193.23.142) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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]); Fri, 22 Sep 2023 02:39:23 -0700 (PDT) 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 + * * Status: OPTIONAL */ void (* target_destroy)(struct scsi_target *); -- 2.32.0