From patchwork Fri Mar 25 15:33:16 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: 8672201 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9D3E59F36E for ; Fri, 25 Mar 2016 15:33:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D1F1201F4 for ; Fri, 25 Mar 2016 15:33:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6EC27202E5 for ; Fri, 25 Mar 2016 15:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752709AbcCYPdZ (ORCPT ); Fri, 25 Mar 2016 11:33:25 -0400 Received: from mail-bn1on0098.outbound.protection.outlook.com ([157.56.110.98]:65184 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751908AbcCYPdX (ORCPT ); Fri, 25 Mar 2016 11:33:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=7xr1n7M4YBQzfzhJ/UwVZBQJMPEwm2WJaEJL/kvSAIc=; b=Ul/Di83+MPlHnc2iYaycR0CqAXXEbe6d1pSCKKarxcvQ2LGCy/wBzUTN5rOTAgSnw9TrZfUKvdkyLDL/heMo9eYLQSMAVNWXbIx+3urLPAjao9H2w4lpeOuNHX+EikQVMqjW5GdtTdxJmXYd2qaKaf59zDfMYJ1y/6XA+wkLpvw= Received: from BY1PR0201CA0001.namprd02.prod.outlook.com (10.160.191.139) by BLUPR0201MB1507.namprd02.prod.outlook.com (10.163.119.18) with Microsoft SMTP Server (TLS) id 15.1.443.12; Fri, 25 Mar 2016 15:33:19 +0000 Received: from BN1AFFO11FD007.protection.gbl (2a01:111:f400:7c10::159) by BY1PR0201CA0001.outlook.office365.com (2a01:111:e400:4814::11) with Microsoft SMTP Server (TLS) id 15.1.447.15 via Frontend Transport; Fri, 25 Mar 2016 15:33:19 +0000 Authentication-Results: spf=fail (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=none action=none header.from=sandisk.com; Received-SPF: Fail (protection.outlook.com: domain of sandisk.com does not designate 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 BN1AFFO11FD007.mail.protection.outlook.com (10.58.52.67) with Microsoft SMTP Server (TLS) id 15.1.443.6 via Frontend Transport; Fri, 25 Mar 2016 15:33:17 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [172.22.12.162]) by (Symantec Messaging Gateway) with SMTP id F4.E6.20659.53A55F65; Fri, 25 Mar 2016 08:33:09 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.248.2; Fri, 25 Mar 2016 08:33:16 -0700 X-AuditID: ac160c69-8c3ff700000050b3-cc-56f55a35539b Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 42.54.02566.C3A55F65; Fri, 25 Mar 2016 08:33:16 -0700 (PDT) To: Doug Ledford CC: Erez Shitrit , Sean Hefty , Nikolay Borisov , "linux-rdma@vger.kernel.org" From: Bart Van Assche Subject: [PATCH] IB/cm: Fix a recently introduced locking bug Message-ID: <56F55A3C.2080608@sandisk.com> Date: Fri, 25 Mar 2016 08:33:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHLMWRmVeSWpSXmKPExsWyRoxnka5p1Ncwg3mLrCxenv/AanFg8SVG ixWtj9gtnh3qZbFoXr+BxYHVY/Gel0wec7+1sXk8m36YyeP9vqtsHp83yQWwRnHZpKTmZJal FunbJXBlvJ55nLHgkljF6f0P2RoYfwt3MXJySAiYSEzd2MjcxcjFISRwgFHi1+pXbBDODkaJ gw27GWGqujvOsIDYQgJLGSWOTJQHsUUE1CQ2vVrEDtLALLCaUaK95ztYEZuAkcS39zOBbA4O YQFbiRWL1EHCvAJaEjO3LgYrYRFQldjc8JENxBYViJBoffCUHaJGUOLkzCdgrcwCmhLrd+mD hJkF5CW2v50DdqiEwCJWiWkXjjND3KMucXLJfKYJjIKzkLTPQmifhaR9ASPzKkax3Myc4tz0 1AJDU73ixLyUzOJsveT83E2MkFDP3MF494n3IUYBDkYlHt61d76ECbEmlhVX5h5ilOBgVhLh dYv8GibEm5JYWZValB9fVJqTWnyIUZqDRUmc1+0eULVAemJJanZqakFqEUyWiYNTqoGxMbSX 4X+jdFR9wo/YqP+p6fMkb9S1xrxODo6+8ufxWr4XvPqLi5S+GD+bveSNrXXnro+Ga34HMXE1 Gj9pYjB86PRgxbqpM1fLz9nxMnmb1qlUiZNXnrqsPvz05LHa2RWxRmtk0sxLk+XuvRFT8zbe PJ37dEm71hqD94WBO6cdFDn8xn5PqtFZJZbijERDLeai4kQAqFB0J3ECAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGJMWRmVeSWpSXmKPExsXCtZEjRdcm6muYQfMvUYuX5z+wWhxYfInR YkXrI3aLZ4d6WSya129gcWD1WLznJZPH3G9tbB7Pph9m8ni/7yqbx+dNcgGsUVw2Kak5mWWp Rfp2CVwZr2ceZyy4JFZxev9DtgbG38JdjJwcEgImEt0dZ1i6GLk4hAQWM0rMeX6MDSQhIqAm senVInaQBLPAakaJb0ufMYMk2ASMJL69nwnUwcEhLGArsWKROkiYV0BLYubWxSwgNouAqsTm ho9gc0QFIiRaHzxlh6gRlDg58wlYDbOAusSfeZeYIWx5ie1v5zBPYOSZhaRsFpKyWUjKFjAy r2IUy83MKc5NzywwNNQrTsxLySzO1kvOz93ECA45zsgdjE8nmh9iZOLglGpgXH/+3v1fPcJy e1YG2C7vmyAordNdpZKzW/ib/LwPZXt6Nhi63T/7iF1Y/kqMj4cCz8IFRV9Ztpe8qRG6tjB9 bcKDhUJvrZzmmKWJeOZ1ueaZfUzgKY4qfrBZ/FFUaKzRlR9um8/x8OStqj6aPeVfvBXnav89 /OqnX27V9HQWdW0O43NN6Z+oxFKckWioxVxUnAgADVIM3ekBAAA= X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(54356999)(65816999)(50986999)(87266999)(19580405001)(53416004)(2906002)(5003600100002)(81166005)(4001350100001)(5002050100002)(19580395003)(6806005)(230700001)(36756003)(189998001)(106466001)(83506001)(105606002)(59896002)(69596002)(5008740100001)(23676002)(80316001)(2270400002)(47776003)(65806001)(85426001)(86362001)(65956001)(4326007)(575784001)(11100500001)(64126003)(229853001)(1220700001)(50466002)(77096005)(110136002)(92566002)(586003)(33656002)(1096002)(87936001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0201MB1507; H:milsmgep15.sandisk.com; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD007; 1:PkOo6iha1vWnZSs7fHehJl50vLVIyq7pIATEV17FLbQYSchHpcIUDJVkOcxR1Vz/aYgL7CJ1m1/zlIXhnPEPYbWgAipwS2GmoJJtUnsDzn9L4jl4fmmhffN8wIp/dSodt2hQZj634Sle5KbrMZuhu4IKu8nszn5ZtHb+DXn5Q4uNnzlCY773vDYBx0sR0sLIl/KtyQldpzfQoq5OU59MumLQBeiD/+JFO09B46Dr1Vu0lsAG4i0PkvgJ7Eno3gZfDbUMlN39l38WYB9nszSy9bH0jBrYvKcxDcLpVhrABHpey2HkHt0Rfi8fgBCEls1ObH4owgsdWLM3vEcW9F8Y1m0H+Xyg+UGRX6J/v8GOF+64Zz17i/2wBz+TSWsl2hKWuV0RmuF83q9orIJg5/RAcnxgPh28WdEoSSzoeDAWGREW5PcaqXZ7RVs9Kj/vwKpHlUNHfXCj0mgpJe1BvsVQRcPmFFFSlmL5DmMlrVxV9kG3woWBTJmzCtZo+DN4RSK0 X-MS-Office365-Filtering-Correlation-Id: 5edbaf78-c44f-4032-de77-08d354c2ca10 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1507; 2:ZoNQF6s2PePjCkEHNRK6xMLEKKF/GLxVyaJGia5zqvIPdMilJ+sd/Oa/1aDT7QJ3wYEaGM+ywZI6XgYerLn7Eej/ea71XBYHa9lVEh2U6ZAou7pXm2EaLTGrVyhr4wLVllT3fJJRT2/ZxHW3CNoZKx5+f79IEC2YR5NZtBr0QMmLKiSYX7p825do6yd+mYcZ; 3:HCzSRk9940VYclFKuXgcY+Nht8Px6R/qHMot5F3PMdezBw722e8J2k7xnowb2TdPKZQ7GET/xxeDGa06kh3dq4vp544uCfx5BEcAtmoN+TBcfsrPiiKQ9k/GrstpcENvcVHK5mLQx+UZxN6oxtjUiNucTlx/Xw2LQOMh+HNcEQ9C8b24gg0zbPOnYgWETdxtKe245yAro7oyy0c4qKfYo/PrAS6wOgVnEdWgFkLVL+I= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0201MB1507; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1507; 25:fSLj1k77sTR27uYjWtdWipzPtOrPLVM+E+KD2GHTVyE9g2Y0fw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O3o9tx9xvTf6oJt7Tz+pftd67ats0MwQ9O0gE2vlW2eZ1hv3xHFdPOrQXuolZ/w; 4:fam5PBzHAn7XyVeybLg/YyM6lyW2eO3ajIzUekX3orwxQC1nsQ8Ycz+xOaLy4xsmIa6DzmZeMfnxbo9WE9kUWLOoiMD1GSI1dQC9+o+Gixc+Lgu7rXAAM+kl7sjrJyqTXwGHpham2gpYbQ5186um4eg5ZjhpYTrbVnK+gbYPRwt+T3q7qvCg1vnMycuVCjStMyqmjmc78Sn4ki7fJr99gfzGRf8VkE8RHC/d9Ht31ZB9ck/iRkPxaCppAwBSJLfR9t7knm9SMcNnvD06oY0knllYEeupHLCkk4xN48+0ub2VcLifhTGS36E4likPWfCHYJvtc3XXUaGDQH32hEnw/cvYmRq3kT9Qv4y0u7sDDoIzfVdTt4SeeWSRqkuDlzOnS/j/B3N6qcGBHsw9cy05egGYTEWlko1Zv5mE V7e5jI8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13016025)(8121501046)(13018025)(5005006)(3002001)(10201501046); SRVR:BLUPR0201MB1507; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0201MB1507; X-Forefront-PRVS: 0892FA9A88 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjAyMDFNQjE1MDc7MjM6NTl3cGhhb0NBYzkxeCtpRlppZ0wydC9j?= =?utf-8?B?VHQxWGJCMDl2VkNIRlBNWmVpQUR1NW9IK1NUdndEUDE2eExyc2VnUjVEQkJF?= =?utf-8?B?NXFKZ21oUktRQlhkWjkwbzYyNjgyVUdsRXZCQ2l3T0h4NHRHbTl4eTZJdkpS?= =?utf-8?B?RklLVTZWUkZ5Rm1UY0JLcWF2Ri9ySUNab00yQmtPSkZhNEVDMHE5VGYxWURl?= =?utf-8?B?UkpIVlRIaW15a1JYQUlLSjV2N21pQjBVRXRnS3Q2Uy81R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KuUrmHyPFF5tDFv2Bh8kEFi4NUIcpoROGLl+kUuN5X4MDSGsQ1g1BJv5L8+0hOJfFs5oUQ2TAIZ4O9PuLIHhzxQBeGGFzayWR4HzxMsy6lqZBvmTJOQaB5gzeHGht8MvTQduNFfBegTJFqzdXKjugY0eVN3Fmo3YGMlaGkyUBEju0TXyc1RIpINtY4xo7F4P+xaWVnk3exUdKH2oEpi7fHIuQqOQQ7xF7/SoKbTZ2FM SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2016 15:33:17.4715 (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: BLUPR0201MB1507 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ib_cm_notify() can be called from interrupt context. Hence do not reenable interrupts unconditionally in cm_establish(). This patch avoids that lockdep reports the following warning: WARNING: CPU: 0 PID: 23317 at kernel/locking/lockdep.c:2624 trace _hardirqs_on_caller+0x112/0x1b0 DEBUG_LOCKS_WARN_ON(current->hardirq_context) Call Trace: [] dump_stack+0x67/0x92 [] __warn+0xc1/0xe0 [] warn_slowpath_fmt+0x4a/0x50 [] trace_hardirqs_on_caller+0x112/0x1b0 [] trace_hardirqs_on+0xd/0x10 [] _raw_spin_unlock_irq+0x27/0x40 [] ib_cm_notify+0x25c/0x290 [ib_cm] [] srpt_qp_event+0xa1/0xf0 [ib_srpt] [] mlx4_ib_qp_event+0x67/0xd0 [mlx4_ib] [] mlx4_qp_event+0x5a/0xc0 [mlx4_core] [] mlx4_eq_int+0x3d8/0xcf0 [mlx4_core] [] mlx4_msi_x_interrupt+0xc/0x20 [mlx4_core] [] handle_irq_event_percpu+0x64/0x100 [] handle_irq_event+0x34/0x60 [] handle_edge_irq+0x6a/0x150 [] handle_irq+0x15/0x20 [] do_IRQ+0x5c/0x110 [] common_interrupt+0x89/0x89 [] blk_run_queue_async+0x37/0x40 [] rq_completed+0x43/0x70 [dm_mod] [] dm_softirq_done+0x176/0x280 [dm_mod] [] blk_done_softirq+0x52/0x90 [] __do_softirq+0x10f/0x230 [] irq_exit+0xa8/0xb0 [] smp_trace_call_function_single_interrupt+0x2e/0x30 [] smp_call_function_single_interrupt+0x9/0x10 [] call_function_single_interrupt+0x89/0x90 Fixes: commit be4b499323bf (IB/cm: Do not queue work to a device that's going away) Signed-off-by: Bart Van Assche Cc: Erez Shitrit Cc: Sean Hefty Cc: Nikolay Borisov Cc: stable # v4.2+ Acked-by: Erez Shitrit --- drivers/infiniband/core/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 1d92e09..c995255 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -3452,14 +3452,14 @@ static int cm_establish(struct ib_cm_id *cm_id) work->cm_event.event = IB_CM_USER_ESTABLISHED; /* Check if the device started its remove_one */ - spin_lock_irq(&cm.lock); + spin_lock_irqsave(&cm.lock, flags); if (!cm_dev->going_down) { queue_delayed_work(cm.wq, &work->work, 0); } else { kfree(work); ret = -ENODEV; } - spin_unlock_irq(&cm.lock); + spin_unlock_irqrestore(&cm.lock, flags); out: return ret;