Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2242418rdg; Sun, 15 Oct 2023 19:09:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEFrW/8TDNgCGuldouJ2AV2QqfceSTZ/WswBOSoZfqnyWc147MYsS6bEodn8oLYirj+5ULK X-Received: by 2002:a17:903:110e:b0:1ca:3c63:d5d3 with SMTP id n14-20020a170903110e00b001ca3c63d5d3mr5276481plh.2.1697422173205; Sun, 15 Oct 2023 19:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697422173; cv=none; d=google.com; s=arc-20160816; b=sGnvHsJnwOghNcSG4+EkCAqIJ3U9nI+sIv/zDRwINivy0EXjYZmvi1rjdo2LCNW75/ Cw9VaIr3XsbcskMbptfy8EIIBQMIkIsKmnfNBMGkazQBHW6sGz3ke+tWZEiCXvp6yo+3 1D6cv0PuiViVhzny3/R4IiTYcl8ylohw6dn7G/X/zli0TfX6eSYRlEi7LV7rN1aUj7jv 0835yk8sQEpVx3LFVzGMyLRA8T00OxjJBnnLaTk1w6geVd51sR5hz6O3Bzeoj0WWpBtW SCgknx/r6g6zJN/R7EhgLfv3stTCDPKQqjPaC4VZpPpyUKpl6r2szWikNlyW3N+vxQPy xaow== 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=nY8KtV7wXdBWkQRfXLiFodakR4N32TXn3VHZcWWjMT0=; fh=ZDcIlyYggP5K3GvQBQF3K/GzUnCJV+bQb/1GDPxM7E4=; b=R0sfkAGQIAdKca9DK46IAXC0sWEEx+F5a8Dj3V4rGRhIoYTfCU0WbOmnYAffW253XG 8kgzE6cGbczpySv+IvcQqqvwt8HcJYgg+VReXJzSDcIEnseH1faX59VpPX8btpG8DVCD S4kv6k8WMtXp42G+URorPwQBO+Z6tO8qgwNVNhefkOt5dI7i+w5OQ0JKKIBb9sZ4SPgA NaQlKDr+K1sxIlaxz9XIBh+QBcTzc1ye000xZaloAF3+xEkcS2yaRLdoaoARqV0n5AO/ AGKlvfoRXeliPGFgA8zFUH0nHFYZbMwrDyWJQiYGWlPrpoPQGZXRw5AfGc+LzcGkjRHK J9mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id i14-20020a170902c94e00b001c61bd7cee0si10558786pla.211.2023.10.15.19.09.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 19:09:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id E65B78066470; Sun, 15 Oct 2023 19:09:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231403AbjJPCJL (ORCPT + 99 others); Sun, 15 Oct 2023 22:09:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231253AbjJPCJH (ORCPT ); Sun, 15 Oct 2023 22:09:07 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99327AB; Sun, 15 Oct 2023 19:09:05 -0700 (PDT) Received: from kwepemm000012.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4S80m31nv5zvQ5n; Mon, 16 Oct 2023 10:04:19 +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; Mon, 16 Oct 2023 10:09:00 +0800 From: Wenchao Hao To: "James E . J . Bottomley" , "Martin K . Petersen" , CC: , , Wenchao Hao Subject: [PATCH v2 2/2] scsi: Add comment of target_destroy in scsi_host_template Date: Mon, 16 Oct 2023 10:08:47 +0800 Message-ID: <20231016020847.1270258-3-haowenchao2@huawei.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20231016020847.1270258-1-haowenchao2@huawei.com> References: <20231016020847.1270258-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: dggems703-chm.china.huawei.com (10.3.19.180) 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 howler.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 (howler.vger.email [0.0.0.0]); Sun, 15 Oct 2023 19:09:31 -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..2e8d77441064 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 shost->host_lock held, + * so donot call functions might cause schedule + * * Status: OPTIONAL */ void (* target_destroy)(struct scsi_target *); -- 2.32.0