Message ID | 20170417173436.15555-5-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | Changes Requested, 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 37F6860326 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 17 Apr 2017 17:34:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A25A228C9 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 17 Apr 2017 17:34:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E43F2522B; Mon, 17 Apr 2017 17:34:57 +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 813C1223A6 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 17 Apr 2017 17:34:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754693AbdDQRey (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Mon, 17 Apr 2017 13:34:54 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:53161 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754627AbdDQRes (ORCPT <rfc822; linux-scsi@vger.kernel.org>); Mon, 17 Apr 2017 13:34:48 -0400 X-IronPort-AV: E=Sophos;i="5.37,215,1488816000"; d="scan'208";a="107609756" Received: from mail-dm3nam03lp0017.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.17]) by ob1.hgst.iphmx.com with ESMTP; 18 Apr 2017 01:49:13 +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=zK3xoyHEGDgM/74UCUD4qJGhZQ5daB8e/wCaSLUrshQ=; b=r8/4UtvjL5Qa/javjWwxZ4avOuSkfCOjI6K2ajGXYHrTg9Zc+UY7jMToCIrOmfkdZgPYgGSXRamYc4eNiArmXuX2N3tUL185W9ah6cIZe+moSaQfOUnZODHgTltkk2OCtNsZstBPFv3uAmbo+GtbA5uj0kFclPiSL93gxDuIcjM= Received: from BLUPR0401CA0010.namprd04.prod.outlook.com (10.162.114.148) by BLUPR04MB839.namprd04.prod.outlook.com (10.255.188.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Mon, 17 Apr 2017 17:34:44 +0000 Received: from SN1NAM04FT015.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::200) by BLUPR0401CA0010.outlook.office365.com (2a01:111:e400:525a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10 via Frontend Transport; Mon, 17 Apr 2017 17:34:44 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; oracle.com; dkim=none (message not signed) header.d=none;oracle.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by SN1NAM04FT015.mail.protection.outlook.com (10.152.88.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1019.14 via Frontend Transport; Mon, 17 Apr 2017 17:34:43 +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 CC.8B.29323.1BCF4F85; Mon, 17 Apr 2017 10:34:41 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Mon, 17 Apr 2017 10:34:39 -0700 X-AuditID: 0ac94369-548749800000728b-bd-58f4fcb19a2c Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 7D.7A.11415.FACF4F85; Mon, 17 Apr 2017 10:34:39 -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> Subject: [PATCH v3 4/4] Avoid that __scsi_remove_device() hangs Date: Mon, 17 Apr 2017 10:34:36 -0700 Message-ID: <20170417173436.15555-5-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417173436.15555-1-bart.vanassche@sandisk.com> References: <20170417173436.15555-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsXCddJ5ke7GP18iDK43qVrsWTSJyWJjP4dF 9/UdbBbLj/9jsjj96AC7A6vHtEmn2DyeTT/M5PHx6S0Wj82nqz0+b5ILYI3isklJzcksSy3S t0vgyjj5q5OtYIlgxedzT5gbGN/ydTFyckgImEg0zFv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YTa94FnbM6wrvnb9p18uCvn/fb l4TstZi7/OaCNXdeFener//x+MI5+0xtneh1LkfT33o67T5ts+dAatsb3fnrlf9KTfDm7XYt KbZ/ucmBXYmlOCPRUIu5qDgRADnZKszCAQAA 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.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39840400002)(39400400002)(39850400002)(39860400002)(39450400003)(2980300002)(438002)(199003)(189002)(9170700003)(81166006)(8936002)(50226002)(76176999)(189998001)(50986999)(36756003)(53936002)(50466002)(47776003)(8676002)(77096006)(4326008)(38730400002)(106466001)(54906002)(48376002)(5660300001)(2950100002)(33646002)(305945005)(356003)(2906002)(6666003)(86362001)(1076002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR04MB839; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT015; 1:QJuMMBUutRCaGAhXXprmWQo2gs1LMhLIWA64EbMomkXAmPeDwgHK282dh1tH+0ye4YLzhVm7IcKyoVQyoDQs0HSbMg2+7bl3r6rZn8JfGAbZuR8CPn6Th1X5jzMfbht4XuuDGvwA8QlmBhJGnNeFVD8hIUuIRDUYiogzvuN4qC71drWeHHNWUP5cP8z0pHdRuQNORdDMXuOhiYRehIqI4WhF0iQKLLk+W5ep5SAjgxWuf5ywDYguSswjyXvPPuriMK5Ns7SKPtlQQCkBrU5nQes1qebD82miDVOwOpI7S4YrpiJ+wBJfopwy6c/SeRm2LpGCsNl3p6MGN8K4fyGV2MgM3VhcEZiyIJ5cGmktbcatoR534+9m8V1pEuB0Dgy5mXRZQvx2bNVH6K7sM+ZewHHb8a4SKgOFm/2qJZBSxjPZj5eQmOQcdGHT6AnguylONa82uEK4jRFOxMwMcgDePV4p7+8mR06pRIgq2PkC4lEMHFpAizaThcyrGaw0lyOztk447VtJLNaqkfK8+DqKLQ== X-MS-Office365-Filtering-Correlation-Id: 6205a523-531e-40e9-b343-08d485b80935 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR04MB839; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB839; 3:FTpHXMr9M63zWpqHEbfeZ+GJTxiLWkgHRZAi1bHfk0N2mJkEyJgmaQwuTtGSeMK45B9Xi8IZ/OlQ13Z611nIWzxt4TL+Bn28Mah52mPmFiQPDWdH+n4wz4zpxMfWghswpDl2nt+40fFr4ml0zul/x+RgEzWkV6WFP6d+W38W8Kia0ApDvm1fVPO7/K4yy9vQX4ZCiLUIQeytLRGqoelXYV3PHDFjaoVm+Im7FKhqQoyOJSp9oaTHwBhicTTJdinwA7i6n/XM5cE0HrwnHrrYiLYM6WlkTbynh8nxCtYdYRcw3OIp5aY4pPcrBpEySkm9IJktULP6OEE/7znD4dKNs9eha2D98kxTS72UC8vzVLAcUfkBujQEzLuyfU+CZrUo8M3GcANZR9r3q+p+dNlTPgj6fokn8vbwoVdGgNhirWalEJf3VlKNMHrwcVcioupPkSenyITxiqeCKZyC/pKupt05iN9DNADDqRkz+XLzNgf2QqkCRpcWu2hRUvcvANib X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB839; 25:G9nQL6R7g5mt+A5bi4vOLK66fzDjnbA/s3QLf1TC0ejMyeBKyauomIX8G1cvoMXTNuwlnMgwEyBdPD2Rs0CaFX/wP4sAPgKWO0Eoo+KausxqW3bw/zMDJegZfZE9zysiiGEOLOoVEDsJ4hEbKZNv2pBghB3SgSkPBJXNvmIIbI6rkMAwktFdtqocB77+AUOZj8vrHt8vicowm4C48NCAkQABd5LdRoSgzVICiMMSJo814UReA/JuFMGAo07YrC4sMoAO8kPuEbAD1VcqGEG94+WpV5g6rcmokUyl860RezjXylYcKjvg/owf7cY71LZOPBj4vjt3SHmYbtqW4XKPM45YSe3cRmrShi3ynzLiFN7hpkydHOq3TEj21AVV/apFS96tZjjx9oZh/u+XpfZgMKk3LSm4qIIW969PDVdOfeSPwLrusU3t1VCSwxg1qs8Bf51baZkQUBAiBPzY4cggig==; 31:KO4VhvkDNRbBOWmpgcBVkxz9n2SWNtONsOlxXAMbyjhUop5myaeq74xOjNzIFOTn68gAQMdBTSvqBw5YGpSM2+Y8gzb4MFczg36SJkLTr4Xqtc1MXc6PpVnkadmlMjrfSJAYB1nTAacdbhw27UiJcrvVVcm0rpVMT02pQ9vyCOaf4DyW1OwTKK57pvzcn/cBd5RxObqxbyU0qU5aLa/IFCb9WewsqSBE6KZ2ZFfNWz+X0s1xkEBNqapTDyZEEgtF35ig4I/7itsq1kmwWytbuA== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB839; 20:h/k4I1xI3/66ypU9eBmOZpusVAfLbihTHguxNWfwuGE+w8eoQHz503FKdGhgAbRSces3o+sN6n7quNb6RWVi0C8TQfO4pmoFFj112HMC0IuwdntgzjOFp74lc7vqnwnNoTrw7V0uMM2bvnbAreISgVKfyvWCC1k6xLlJzCqTmKYdgRT2OtsU/134OSGU1GvmB/fBz1sLNhZVfU6R/eeCUhzlh8AWe2ARnlnGZBSLZKDrzVigQXsBf+zQ8TzCb/k7JuTYr1oFaLqOfUT0+lsEOXfAMeTLWKh15dfuA40zIQDn+/lvLqvKxgs2JTa9wSTbev80z3gwTkPdICAqQGGiFOgso0u0Kl+iGZWPoGa9CcOMXJ4x+mZ2+qlFeCQgkF/8uz5jOKL2nnemdzdlh0IupTMbrY2ZsvLtZzNdTn1LdFn4n9cb/2UOeTD2on/F9B5wnC0n4DWfYOA3foaVVWJcD3QVLm75+RRfFrGz8j+pHlIIovqtqV5GwjBryGPPxi0c X-Microsoft-Antispam-PRVS: <BLUPR04MB83912E5C2D994D8BF79386981060@BLUPR04MB839.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13016025)(5005006)(8121501046)(13018025)(10201501046)(3002001)(93006095)(93004095)(6055026)(6041248)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:BLUPR04MB839; BCL:0; PCL:0; RULEID:; SRVR:BLUPR04MB839; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB839; 4:sxTZ1jI84/SuVgYosTXF+LJM4bSb6ABWVut2iHlmNnA30auEA+uUL+k5osAJhbvIMl2mXRj1YkfA2GIZviJNrCggiwkp/vxFZKmmbG733XIioULEM32eQkopWroSim0ViRlog8XAQetybsVh6mUQHUP0Y6Ol6G/o/gYg7UDXukNZomEFP3KffbpDg4TFAtDE5qqLGcspdnZ9eokN1JU0eriMp5yu/u5hCvzWppG3n8WCz3pgbW7HkDbfd8Gffae/wZ5aQRE+sjIsKfv8TGBq2siX2dNMRJA8Vsw3f286cYvQUW6r3J+od0nol92f+6ijgMEz+LlBHzHor6/drSN8y9b4VIE1ykzDIwlZ9E7gGYWwa00kia5ganFs5ep6+b8wh3Kr4gd0/T5AtoUmAhmPlBVriXruu5jCgNVx7C9FKHn6n5My2hga9lQWQy4+nljY+sdRcrKzby1GWgR2ZvdBfqIqjikIdrmJSKZUZjjb6hpus9kYw0/uAVLAR7EhBCjnEwz151u+57d0GkNwk233rt1zUsH/m1eytWMyQkSyTMtu7yk4B0bTRBj/X6+/U7VTc7IAiplslSMZ/KtVQg/300GvirxMd8CvTxt8QgV90eNKJGek3ag3kNovd8DrgLZb8KyDqlLM2nWrDBERNSMk5l6477h37qTYEsC5T9VBQkvVqvivXknrIdUXTmGiwg2+/xNg0zRcqnS3q9c0Tmm7LfLmE6JPdW5V8XNHEkDCGP9EI2ePLD1YT05APjZQ15aPWnZ9/wziSebi94l9FzYTaB+0/cN2jImVUzU4ViF4s3MmM4kKolK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p6bIUrxxntET6OA/EI+t8WwC+dPb2k+jy6IVwwr7RGmYWYwO+qyXnVhtm8EqXeaa5+mDNydI+31vtFCw==; 20:7m919QKHjj4q4giVpFUgfkeywUbaHKsUnGeSsIf+LU7lrZznXgefWFUYLlgdtCXT0c2ddE6grpnTssTjN5F6ayemoZ812mAichDBaa0PXYQLPuiWUUgVQ2aG7eHS1sbrDkm2JnY12Jk5nNTW621w28JzOJRJ7Up/KRMHyT/gyl4= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2017 17:34:43.5604 (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.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR04MB839 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> --- drivers/scsi/scsi_sysfs.c | 9 +++++++++ 1 file changed, 9 insertions(+)