Message ID | 20170425205354.21181-5-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C641660245 for <patchwork-linux-scsi@patchwork.kernel.org>; Tue, 25 Apr 2017 20:54:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B596628484 for <patchwork-linux-scsi@patchwork.kernel.org>; Tue, 25 Apr 2017 20:54:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA7E72848F; Tue, 25 Apr 2017 20:54:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30EB828484 for <patchwork-linux-scsi@patchwork.kernel.org>; Tue, 25 Apr 2017 20:54:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1954555AbdDYUyQ (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Tue, 25 Apr 2017 16:54:16 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:3120 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1954474AbdDYUyM (ORCPT <rfc822; linux-scsi@vger.kernel.org>); Tue, 25 Apr 2017 16:54:12 -0400 X-IronPort-AV: E=Sophos;i="5.37,251,1488816000"; d="scan'208";a="13850812" Received: from mail-bl2nam02lp0085.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) ([207.46.163.85]) by ob1.hgst.iphmx.com with ESMTP; 26 Apr 2017 04:54:06 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Ne3zDLGDXe3YTO9pJSgOmimdC7cZ4lYAsAWZ8c0I5gk=; b=t3C/a94zf1ZZ7xRQwRTIf9n5sQEqHDdCTfD54Q4n22M/PuNrpRICuAx0PtLHzns/OuMYNNmFszZsg2uGWu2C4CBNWikDPGBHvBA733maL8rJ21m/6W1dRA6dHU1FG/NT8moqeiqFutOZ5eC02HhIKtp07hsXJ0dvXsESuaVH4j8= Received: from CO2PR04CA022.namprd04.prod.outlook.com (10.141.240.150) by BLUPR04MB884.namprd04.prod.outlook.com (10.141.204.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13; Tue, 25 Apr 2017 20:54:02 +0000 Received: from CO1NAM04FT015.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::204) by CO2PR04CA022.outlook.office365.com (2a01:111:e400:1428::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13 via Frontend Transport; Tue, 25 Apr 2017 20:54:02 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; HansenPartnership.com; dkim=none (message not signed) header.d=none; HansenPartnership.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by CO1NAM04FT015.mail.protection.outlook.com (10.152.90.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1047.9 via Frontend Transport; Tue, 25 Apr 2017 20:54:01 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 1D.55.19026.867BFF85; Tue, 25 Apr 2017 13:54:00 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Tue, 25 Apr 2017 13:53:56 -0700 X-AuditID: 0ac94371-41ba798000004a52-b8-58ffb768754c Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id DC.8A.18148.467BFF85; Tue, 25 Apr 2017 13:53:56 -0700 (PDT) From: Bart Van Assche <bart.vanassche@sandisk.com> To: "Martin K . Petersen" <martin.petersen@oracle.com>, James Bottomley <James.Bottomley@HansenPartnership.com> CC: <linux-scsi@vger.kernel.org>, Bart Van Assche <bart.vanassche@sandisk.com>, Max Gurtovoy <maxg@mellanox.com>, "Hannes Reinecke" <hare@suse.de>, Song Liu <songliubraving@fb.com> Subject: [PATCH v5 4/4] Avoid that __scsi_remove_device() hangs Date: Tue, 25 Apr 2017 13:53:54 -0700 Message-ID: <20170425205354.21181-5-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170425205354.21181-1-bart.vanassche@sandisk.com> References: <20170425205354.21181-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBLMWRmVeSWpSXmKPExsXCddJ5kW7G9v8RBovWy1vsWTSJyWJjP4dF 9/UdbBbLj/9jsjj96AC7xc/DZ5gd2DwmNr9j95g26RSbx7Pph5k8Pj69xeKx+XS1x+dNcgFs UVw2Kak5mWWpRfp2CVwZv67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wQIxMHp1QD407PJucfuuY2 3TZb1hot/PN11pql5X8ik7lWn3uRtiE2awdHJ5cvm27WmQ/N2zuNf25NnKV71bVrz/vcpJW9 q4TS54WHJeSziBws2GMU6/99ibL8gzMPd0gsqm9RjjlQ6qMhf0u75uVHg9hvs3/vXHFmsl+M Y+Xc53nbPWyE6m+n7lo3pyApVYmlOCPRUIu5qDgRAB4tj5XLAQAA MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39400400002)(39840400002)(39860400002)(39450400003)(39850400002)(39410400002)(2980300002)(438002)(199003)(189002)(9170700003)(47776003)(5660300001)(106466001)(8936002)(189998001)(86362001)(305945005)(50226002)(1076002)(33646002)(5003940100001)(81166006)(54906002)(53936002)(356003)(50466002)(48376002)(8676002)(2950100002)(2906002)(77096006)(76176999)(4326008)(38730400002)(36756003)(50986999); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR04MB884; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT015; 1:6QDZmTAWJGH/EdVcTzQsPilcl2WU1iE40Lay9Gdm0cG/oSC3jq4b1BfQXoTxNTIBHDIEYq6o/F6Nzdx6lp01AMrwK3jVeQBKtY2qrtbgkRhB4Enyf6sbgAYrPjoqYv9j3s3Xnq6XnE/B6VNyurnKGCGE2Hbg4m8vtVBWlRC8yCxhWTZn5ITUYGqzsCQNgeHmJrnGW9YWFAjXmFZYtdE+xFMKzjEgeYNcBmPWVDtZ50hWgCIgzXAKaMnBANhOhPTD4+OkoGvZsl2IKGRZUDBooHE53lH82+OEyRcmfgJXmWRf91sXILEG+TqG5xcngKKhPWwwtIw242w/oOvzaHRgg2xN34e1LYrQmnyjs+O+0qPPKxIv1iVoRhg5nBTvDjZF4QWV1oYK5VnawZTF4AHv6B5KPUz4xV2FYSmfTXTmZEW78NDCbeoPKHFprjYIU3u5Q5nYdpQMr0Bq58Rjn6gk4XhtodAwsGC3813l+eE9p7F7bQ4WjgFFdcxMzryhkM0Lk4GETD4f9B6UZ9Vkf3cddmiJQAmWmh0w7Oci8KkwoEo3XQuMdki9aNVqX/DwhS3c X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2b955f2f-57fe-47c5-28ef-08d48c1d3400 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR04MB884; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB884; 3:/umubg7Ea/O/Qg+CarWMIn2tv9V7Kvb6QOKymyYygqV6o3EzG+CTcDWWQ2YK6c01JvBlFjXFFLFp7rRfzT+ligwwLRQ5zgXCzMcmo/CsIvP55W2p3IWAkbeYHr2KmvOzpsc8ctTdUMbKS4t+BXzJ1c6vp3AOTDLJoun+E547Ct5lbMRK8hPhx+tW12nBrLLlW2YGLSTnZGhiSCSuHxJWs1pfCJ4pZnTMxgwT2x38GL3cfOMWegtCEgo4IyCBTEM0Y2k/uttvwKckRLdhML+vj0Qwf/z8iMSra+DLzV7wdqmbMWVHe69sWhJTKshWfXZoCH925PPrlBOCSoRCtj/i+tlRRIkpmoyv6ubB2gOMpHDfgiuvr6GkhkSNgLOfePjFsk0x62HC+Gjy1LrXJ4q5S7JWkLzHJprn4BlcBnnplerIwukliqTCN8bDIkFpW5JMnjV7MGPHodb/Vx/nEmunpXd+602BRndl96eUrXkpBtzOS3VzXmNefV2Wmya2Uz1E X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB884; 25:LQ8m/5EjiTqHBJ7Ko+sxn1h0CsCHr3mXB23Vgf55WZKem66E7VGIglpxfkArelsqdhcJYkyKSaaGCvD8/ptSsLC384vFjuoi+epTD9Uv7/c8onkQ5C0UILDP5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dxMEpfpam5A2ODaWkBypIEQqZNdoHp7VIXnK/BMP9eqd75JIVIiZzEwHWB14g8l/OCSfLp4m+WretqDfW5f0pHZCxwErm2FZB0MsfsXfrqVFwlF/F X-Microsoft-Antispam-PRVS: <BLUPR04MB8845CBF55752F4EB09F47D3811E0@BLUPR04MB884.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(3002001)(10201501046)(93006095)(93004095)(6055026)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:BLUPR04MB884; BCL:0; PCL:0; RULEID:; SRVR:BLUPR04MB884; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB884; 4:0C65h/eZS26LURANRwcG6L7PWCgi6c2XbgY6LgMl/veagiD80ZXYES2iphw+Nmna3b3xNXeO1FvXiA01U63ojbLlU6SWCMgI3sM5x2DZsT+xyiA5AK9pZP288yLArnEcvSHb+58/GD8FEUdYNzr8NdA5x5Hir1Cj/VrdhEwK+K1No9X8StH9gLoconA1sTAZ1jvIiM8Hwi3FanRhaXQoWNdjylSL2gjC1zLxy7HBIBBlOdCqy3toVJlguvybHYNbFurFXn3nm+eC67lZx1Z22W7DZVR2Ys5hWNatJy9tXGNUVNvziNXc1qw/GlOE6piTNTAayX0qezbQcoXkhJ20+mY3v7DtwuWCjUDwBrbwpxiPzCLKBSRnWZ71hNtoEmkbiQxpYTr5Q9n9HkdqDK8UheWFLnubIGkzgh0ooZhsu4obe+GbuxVLnsd1QmfpgvXwbc5SMQArrPMq9PmqJNwFAMILyZ8G6wtCMjWZxIX8s0UdQ53qYKoNxjFerbm2SCLNkPg7dDPSnG4izFiMby2g6to04+CmJgy4cRp7X3Ciz/yef/uWjx0DCQtN+G5vbhVULt8MabdO9qE1VB7rX3P0PJnW7pg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nofRBBXhvnOIk/Je/h6kOrxQBsw=; 5:at+X62qlN4grN5n4UoGw49n9Cry3AtiubJZB7a8G04sI/735rpxNSzHA8whRVxJZkngsrw1/zYE+i55mv92jp3l9u3tcktGtx/4AHFan28ij2OxZHVatMfQFulyIqRB886wEO9JqWA3+lyCvvC5yNw==; 24:mQG/2R8s0zhhQkDUDNaRsTLnk9KttYQr0EPrB71ju9liPZMZIkAknAgF4MY+jP3uEUs39vqft4EUFj4+ZAm8e4Tz+7OYyzguT7k9xqLS0V4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB884; 7:sHPsvoECaXjovhrP3zzvAY84T1/rOaxWyXCj3OTQ2Rv4yhMNvVQYSuJp0tVCwwvHx5IAo8lv16AlRVwbogk50HWJQ0ZqbaKb0Meit10C3+a3xSvutiayfi1oSpxJxXVEu7y37A5ehse1wcvfvefq3hqs3e2MDr4I6bCnVIJ8Bn1QQUjgb+eb02KOpDumhDWO9G9CNGWfMROu84Ul2sfvLr+LTZJvYb9N2lw+9sMa/LRzmXol7IW96lEqTBq0HtoJY0CTpOd/GCpqmrIFHPgAryo8bUl0y7bXa0r7KwIU30/6CrX5p8wR54dZZUxfDsXhuvNmw/gb9/IDlFI6eqogIw==; 20:zmJ2FgzEQ+GonBJmrzMmYJRyM8nekVnxsQHNbKFhXYsbiL/6pzFHTa6V6AGxsdLErlYX/1p/5bfxF39ktTH5yoeuiI/70vd2NUsuFSGEP/Lr7NnYOTA1xGavembxl/kNua3avWJIgf8zh2mzpf+sB7xK8S16hUBRtqCM7UaSTMU= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2017 20:54:01.6698 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR04MB884 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 82dfe07b1d47..e090c35ba6ee 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -1299,6 +1299,15 @@ void __scsi_remove_device(struct scsi_device *sdev) * device. */ scsi_device_set_state(sdev, SDEV_DEL); + /* + * Since scsi_target_unblock() is a no-op after unloading of the SCSI + * LLD has started, explicitly restart the queue. Do this after the + * device state has been changed into SDEV_DEL because + * scsi_prep_state_check() returns BLKPREP_KILL for the SDEV_DEL state + * Do this before calling blk_cleanup_queue() to avoid that that + * function encounters a stopped queue. + */ + scsi_start_queue(sdev); blk_cleanup_queue(sdev->request_queue); cancel_work_sync(&sdev->requeue_work);
Since scsi_target_unblock() uses starget_for_each_device(), since starget_for_each_device() uses scsi_device_get(), since scsi_device_get() fails after unloading of the LLD kernel module has been started scsi_target_unblock() may skip devices that were affected by scsi_target_block(). Ensure that __scsi_remove_device() does not hang for blocked SCSI devices. This patch avoids that unloading the ib_srp kernel module can trigger the following hang: Call Trace: schedule+0x35/0x80 schedule_timeout+0x237/0x2d0 io_schedule_timeout+0xa6/0x110 wait_for_completion_io+0xa3/0x110 blk_execute_rq+0xdf/0x120 scsi_execute+0xce/0x150 [scsi_mod] scsi_execute_req_flags+0x8f/0xf0 [scsi_mod] sd_sync_cache+0xa9/0x190 [sd_mod] sd_shutdown+0x6a/0x100 [sd_mod] sd_remove+0x64/0xc0 [sd_mod] __device_release_driver+0x8d/0x120 device_release_driver+0x1e/0x30 bus_remove_device+0xf9/0x170 device_del+0x127/0x240 __scsi_remove_device+0xc1/0xd0 [scsi_mod] scsi_forget_host+0x57/0x60 [scsi_mod] scsi_remove_host+0x72/0x110 [scsi_mod] srp_remove_work+0x8b/0x200 [ib_srp] Reported-by: Israel Rukshin <israelr@mellanox.com> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Max Gurtovoy <maxg@mellanox.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Song Liu <songliubraving@fb.com> --- drivers/scsi/scsi_sysfs.c | 9 +++++++++ 1 file changed, 9 insertions(+)