From patchwork Mon Nov 21 21:58:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9440165 Return-Path: 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 D903F60235 for ; Mon, 21 Nov 2016 21:58:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAE4E28ACF for ; Mon, 21 Nov 2016 21:58:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEEBC28AD2; Mon, 21 Nov 2016 21:58:29 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 98DD328ACF for ; Mon, 21 Nov 2016 21:58:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932213AbcKUV61 (ORCPT ); Mon, 21 Nov 2016 16:58:27 -0500 Received: from mail-bl2nam02on0086.outbound.protection.outlook.com ([104.47.38.86]:28112 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932185AbcKUV60 (ORCPT ); Mon, 21 Nov 2016 16:58:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XRctf1skszdIunQeI8POhTJ1n1NspsV2cDvkrI3sJI0=; b=fLMrmQmlxuUw7pzNtPw4GTy6abKHMbj+ixVFlRZpNlKIN1DWSTheKVfIm/I/0Z2J1W0GPVmrvSaVKCY4rtV5O8bpKRB5Q4BYLRAMfraHn2Xe7ZPi9u2Tlx5/7hpeDH79dlzb0gzFHYGzy1BgoyQSdiVr1GS31VIH3CKNn2T56BE= Received: from BY1PR0201CA0036.namprd02.prod.outlook.com (10.160.191.174) by BN6PR02MB2849.namprd02.prod.outlook.com (10.175.96.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.8; Mon, 21 Nov 2016 21:58:23 +0000 Received: from BN1BFFO11FD029.protection.gbl (2a01:111:f400:7c10::1:132) by BY1PR0201CA0036.outlook.office365.com (2a01:111:e400:4814::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.8 via Frontend Transport; Mon, 21 Nov 2016 21:58:23 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; 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 BN1BFFO11FD029.mail.protection.outlook.com (10.58.144.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.4 via Frontend Transport; Mon, 21 Nov 2016 21:58:20 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:3008; Count:19 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 36.AA.02899.7EB63385; Mon, 21 Nov 2016 13:49:27 -0800 (PST) Received: from milsmgip12.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, 21 Nov 2016 13:58:18 -0800 X-AuditID: 0ac94369-9793798000000b53-19-58336be77d15 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 27.56.03661.AFD63385; Mon, 21 Nov 2016 13:58:18 -0800 (PST) Subject: [PATCH 5/5] IB/srp: Make writing into the add_target sysfs attribute interruptible To: Doug Ledford References: CC: Max Gurtovoy , Christoph Hellwig , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: Date: Mon, 21 Nov 2016 13:58:18 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrNLMWRmVeSWpSXmKPExsXCddJ5ke7zbOMIgysXZSxenv/AarFy9VEm i2eHelksTj86wO7A4rH7ZgObx7Pph5k83u+7yubxeZNcAEsUl01Kak5mWWqRvl0CV8aabzeY C36yV7w+3MbSwHiLrYuRk0NCwETi0953LF2MXBxCAkuZJJqfTGYCSQgJbGOU2HvTH6bo5Ivb bFBFjBIPG76zgCSEBWIlnl14zwhiiwioSWx6tYi9i5EDqMhOovcZD0g9s0Ajo8TqxTeZQWrY BIwkvr2fCdbLC1TTsOsy2BUsAqoS95/8ZwexRQUiJDZ9nQNVIyhxcuYTFpCZnAL2Eg231UFM ZgFNifW79EEqmAXkJba/ncMMskpCYBWrxJZ/exkh7leXOLlkPtMERuFZSCbNQmifhaR9ASPz Kkax3Myc4tz01AJDU73ixLyUzOJsveT83E2MkCjI3MF494n3IUYBDkYlHt4P3MYRQqyJZcWV uYcYJTiYlUR4H2UAhXhTEiurUovy44tKc1KLDzFKc7AoifO63fsSJiSQnliSmp2aWpBaBJNl 4uCUamDsX2MlvGKl251a7sXF0w1dHc/UyPxdavD84/2Ow1fkgrw/xbg/0U3g3BP6cx5j4cXd xSv+6W09dldh9S2/+yZntjzd+EdF8euGzh9fL20PP7NDv72X8/uLF/yTLm7wSE7P2FFfE3lB 7UyuRM7nF1Zqy/s/7ma4POVI5J43388pcgfuTjtWtmL1RyWW4oxEQy3mouJEAAtb6S5+AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsXCtZEjRfdXrnGEwebPAhYvz39gtVi5+iiT xbNDvSwWpx8dYHdg8dh9s4HN49n0w0we7/ddZfP4vEkugCWKyyYlNSezLLVI3y6BK2PNtxvM BT/ZK14fbmNpYLzF1sXIySEhYCJx8sVtIJuLQ0hgMaPEgje/WUASwgKxEs8uvGcEsUUE1CQ2 vVrE3sXIAVRkJ9H7jAeknlmgkVHiz63XTCA1bAJGEt/ezwTr5QWqadh1GWwBi4CqxP0n/9lB bFGBCIlNX+dA1QhKnJz5hAVkJqeAvUTDbXWQMLOAusSfeZeYIWx5ie1v5zBPYOSbhaRjFpKy WUjKFjAyr2IUy83MKc5NzywwNNIrTsxLySzO1kvOz93ECA5GzqgdjNcnmh9iZOLglGpgFDjQ +sh9X5aCW9g1nfVa7K5XhewWOSxYxPFENdJ9P4tU7WuL4MU+m77GcUXaijyf5iORvT3N6WXN zKjVEUo/Fu3NMXZ7yF7V+/pkTai8u4TcNx7R3efn9hpVzBCcMC1zu/6Bq89lwh+tcApNOR7y vIfJpVFz6+ePO9Z/azx0YrE0t+DENeHNSizFGYmGWsxFxYkAltdQnPYBAAA= X-IncomingHeaderCount: 19 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:(10009020)(6009001)(7916002)(2980300002)(438002)(189002)(199003)(6916009)(50986999)(54356999)(76176999)(2950100002)(305945005)(189998001)(7846002)(356003)(23676002)(31686004)(33646002)(4001350100001)(8676002)(38730400001)(53416004)(230700001)(69596002)(86362001)(31696002)(64126003)(81156014)(81166006)(106466001)(87936001)(92566002)(4326007)(50466002)(5660300001)(47776003)(2270400002)(68736007)(65826007)(97736004)(2906002)(626004)(65806001)(36756003)(65956001)(83506001)(8936002)(77096005)(110136003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR02MB2849; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD029; 1:mWoL0GDrza0WcelZ0uJ/rvPuN3Yaz9vCNvtWRIkm27mxRYexmxlJZ/NNxKlelkn5j9ODXFqKWoimMr/H6RxlMwBVyq+W4BzMuedcQcEs3WNwhMrVol2xdgk+36RF1/M2So6zttZ1Mrcwsv4qMsBPuPKXnY/EM0jL4H4GcIR4PC8Tax+c34SExvVChRJGt19X+ZhcDNwcQgLuZclgBkOu4CzpqktJ4UdH4q4K5+r+DLHaFCnnx/B8ZkyxZFLcIq0EoaacGj56wflay5ck/UkiE5M44uhI9YZQ9SYR9lG26G7j+8UFgBAHG74natKHscBOOVZqx/9IY4OY8xNXLTfvJ2nDtQlTJUfeq5ZIS1BzrD3u0dRimtnV+n24kRyZcTZ63AKjkuhpYo3ZvpUitkD9lnbbibjqJ7CDX/Gt+gDS5kMdsdIxYSNvhZDjQAbOu5POJ60Hc8xDwRn9O3AZn9pTssDo8foEoj6iTIdtTruh0biRrOl1XqfDKG/lZ4UwdYaEBuFz4eaqYWa04V2Vi8gH8hp6P/PYudR+APrVgPdwPKo= X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2849; 2:hsioVkTf42LcICYZ6CoqjjHqSSIth2SWCB0CEA/bhghB6zlnVCCb7I8xo9q0LvgbFblObOntkP/BazT+N+gHUuDDZOxAsnpXhyCbsBypEWlah3Gnz0dNMzBZDAwSDtKH63jBdEjOVAZKOSYOWAalA/MgAc8V7rtMob/XAB+cFTA=; 3:MrL0XpURM+p2mRAEeyy5d5w0HKWkKf9+H/OEtc3xph8lURIeztnAaPs5DQXqhMAhdxjIsTSkzAYvalsAQIBF1/TC+MjTrCgVEu3CnvtInMGFCfIwncuNwgH+u4iKI9vdOr8B36k6709MgKl75DdeCESFj5IAa1U4NjTd0Qk7tuDbAEPzpHbXYQXGhIVL5aSQiBbzSD5XGqh5MM7nFsSqSwt9kk5/bzCoxCM+uZRYE8wMGEF6Apx3H2H/IRAmgv+3WEM3EWXT8QZkhUJ78OWfWk1QxxamFmDgC75/mSQ2hFI= X-MS-Office365-Filtering-Correlation-Id: c6807812-6cb8-4f24-0af6-08d412598310 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BN6PR02MB2849; X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2849; 25:TiJpPGJQh1T3oCCnvtfh1cveCrWZTADYYDtB/OGOIpsKt9v2bA4c7RrzUr2T7RhBcFpUJKq6O50WKCH2v07EiJGWfQG4Vc5K/IXBM6qWtWmnulb3iog9UxI3hkmUlTY3l2prli7HbEAuAAQLmEbBb6PJP8cux9xBRwC56SKM8+ajTD0f2mKnirE4UHUE8wAC2vQIkUnP7W63Hbq4wMd3OM+Ka/D0BLUagcHC6RtgMw28/j+XfO3M+nTy6A4QhPaeOgO0zXqLY+fetr7MrcKLIB3nZsp2yfBiplch1OYHVa9NRlkzhjBB7UwBwDjJMLT8fyhlx/OOCNYrLUJJvHX40TkRpqv+pmsZ4XuG2dMtazB1DGUaVhwlcBcmW28tI3Q0J8CuUUBgcJpYHn4lIEBMkZ416g0G6yYR0UR8tnLNNuf6GJ8TtIfTuZLEY1e4o7fehxRry+h4Ox5e/9oCc4PSqA==; 31:SunZKilK5f6C/ZM41etLmaHHezZByvD2BhwxJ1ohSliZ5paROv4RStV728re+ysIi56GlnjVCzUA6BP6CQ3AAUkCp8F+6/WTcKQzf3mX+mZbIWITsBKL8vchj/ICWEdZO8QZp8A9dTmLSd/FlAtdiuvW4sMUb409dGkJPw0NsKVp/GauIzEi3cJvyQBFbYOGTwcufIf9NbdMKDlfjWJVcQIzIgH9Sz0A0Rnk//Ulp/PxHGhAgxXBg8qnxL39RjGGtc20tOaXpIZK9yaXqUFJ9A== X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2849; 20:zRQKrdrLfmUox5eqqFbtcsPJ/WR79gpGExlValrQfecDOX7St7kVvvDMMpV7CGnH5TV/ENNH2UUeF7kiHR8lMd+1xZNV+bbWMEN2JliAGRzZoZru77doRSACpdlMUgMr+ybxFowF10IYXuA8+eO0H0SIzKB0qm6cSxrtukU8L+qikMUBhNkEfurCi4nR/ZyaKIyYxBXC5A1TL4hZfjbi5DW1Yt23wg07Qn1o6iJX/XY5grgc0koMuRb2u+0srVD8R7eVMqMlGC5EqBB3WVQMgzlwGXUXDiYfmtzLNisYKUjDGoJQPIjnsm+2DQzeQliz/4BFf6zxv0xP2+m6/E3NUc+lWHA6OlNCZQx3LB1pUua/zMTAAPdkMDBc7m2YxVp1ssYfFSTPlpLUQZYBANqWQ6DAggRU1kSiM94sawuuGeCi8A9K3r1GVI+G3nJX1mNmDoPJ6rqYkq3zwoEzOaFjGc4v2TMqW5bzMwtZAgVO5Ke1qMgGNaE8/E0D8kP9dIZz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6060326)(6040307)(6045199)(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(10201501046)(3002001)(6055026)(6041248)(6061324)(6042181)(6072148); SRVR:BN6PR02MB2849; BCL:0; PCL:0; RULEID:; SRVR:BN6PR02MB2849; X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2849; 4:39pw8Sh8pGjsonOegAKP2TiCbXLSmR9yorMz6O1zJ5dFlhdjXiF3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tB9YucMM9XoBTyyhcQSIYLdO6uAAEX9ZU2/Rs14Q4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2849; 7:2TbYzxIWUrTmMbWU9h66BQWug8cvtDsoYpv1PRQbAG+Fh8UpXHmRc0IkNDhyi8AF7m1QQp0gfc+DewfVpLYslubtow7v/V+BdrrrlEqXrweZvJ2+KSGmN6F8s5SyJDHUqmzXCLZjFSiYmQKWo4nrpodda9yv09vEcX5syXdnMy1PCSvxEmyR0uHs7DmyYtm6dvLzg4UyLY0X29jI9VEHtVgdcAZVN+epTVAjtAwo0wJCTgJ2942FOoxbXelesxQxngmMFJZxBf23f6uZOYz2tHk3qPxM3SZUinagD809vuNkRr5Eut5coP50lt+haUNkT5+3RAZpRLIzC7Cdza/KTMowQDQIWLhNkVsJVwnjgbo=; 20:5rZm8bG+pPGtnk4w7L7OvXFldwFbkoPfRA8bdB3f5Eg+6y5JOZrpXSD09LNbanCBVZmLd1LPDaTfdWHajCAHwuBpV9ywrhmXX6VEKXWibQ7e3s6cfMvqhYRl8zWF62NK150o05agEUwvXCS+5hZInRcPMw6mZVu13WEaaH8CDLdE9QPILxX3B4g9kJz5Km7KgjBmHsqaRlRHMrfUX1wR88SvP+EuLVfo6lzpyikxAKq30wTv1Cywv9XZvOzLsXMf X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2016 21:58:20.7930 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB2849 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Avoid that shutdown of srp_daemon is delayed if add_target_mutex is held by another process. Signed-off-by: Bart Van Assche --- drivers/infiniband/ulp/srp/ib_srp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index bb9d73d..8ddc071 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -3299,7 +3299,9 @@ static ssize_t srp_create_target(struct device *dev, */ scsi_host_get(target->scsi_host); - mutex_lock(&host->add_target_mutex); + ret = mutex_lock_interruptible(&host->add_target_mutex); + if (ret < 0) + goto put; ret = srp_parse_options(buf, target); if (ret) @@ -3455,6 +3457,7 @@ static ssize_t srp_create_target(struct device *dev, out: mutex_unlock(&host->add_target_mutex); +put: scsi_host_put(target->scsi_host); if (ret < 0) scsi_host_put(target->scsi_host);