Return-Path: Received: from esa1.dell-outbound.iphmx.com (esa1.dell-outbound.iphmx.com. [68.232.153.90]) by gmr-mx.google.com with ESMTPS id x138si3637738ywx.6.2016.12.27.12.46.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 12:46:34 -0800 (PST) Received: from maildlpprd06.lss.emc.com (maildlpprd06.lss.emc.com [10.253.24.38]) by mailuogwprd05.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id uBRKkURC001868 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 27 Dec 2016 15:46:32 -0500 Received: from mailsyshubprd08.lss.emc.com (mailhub.lss.emc.com [10.253.24.64]) by maildlpprd06.lss.emc.com (RSA Interceptor) for ; Tue, 27 Dec 2016 15:46:10 -0500 Received: from USENHUBBEAL2C (USENHUBBEAL2C.corp.emc.com [10.97.40.74]) by mailsyshubprd08.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id uBRKkLU4009364 for ; Tue, 27 Dec 2016 15:46:22 -0500 From: "Allen Hubbe" Subject: crash unloading ntb_transport Date: Tue, 27 Dec 2016 15:46:21 -0500 Message-ID: <03f201d26082$484b8710$d8e29530$@dell.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_03F3_01D26058.5F7C83F0" Content-Language: en-us To: linux-ntb@googlegroups.com List-ID: This is a multipart message in MIME format. ------=_NextPart_000_03F3_01D26058.5F7C83F0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Test attempted using jonmason/ntb at dfb7d24c5ad5c986f2417f52784738b67cfedd4d. With latest, it crashes when removing the modules. [ 1494.330594] ntb_hw_intel 0000:80:03.0: qp 0: Send Link Down [ 1494.358126] ntb_hw_intel 0000:80:03.0: NTB Transport QP 0 freed [ 1494.364771] ntb_hw_intel 0000:00:03.0: qp 0: Send Link Down [ 1494.400171] ntb_hw_intel 0000:00:03.0: NTB Transport QP 0 freed [ 1494.431502] BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8 [ 1494.440267] IP: [] down_write+0x1f/0x40 [ 1494.446312] PGD ff3231067 [ 1494.449136] PUD ff5600067 PMD 0 [ 1494.452760] [ 1494.454430] Oops: 0002 [#1] SMP Entering kdb (current=0xffff880ff4ea2c00, pid 1297) on processor 1 Oops: (null) due to oops @ 0xffffffff816c3def CPU: 1 PID: 1297 Comm: rmmod Not tainted 4.9.0-ntb #25 Hardware name: EMC 900-565-027/110-325-102B-00, BIOS 23.27 12/10/2014 task: ffff880ff4ea2c00 task.stack: ffffc9000d784000 RIP: 0010:[] [] down_write+0x1f/0x40 RSP: 0018:ffffc9000d787d98 EFLAGS: 00010246 RAX: 00000000000000a8 RBX: 00000000000000a8 RCX: 0000000000000001 RDX: ffffffff00000001 RSI: ffff881ff5d49258 RDI: 00000000000000a8 RBP: ffffc9000d787da0 R08: ffffffffa01b2500 R09: 000000018022000f R10: 00000000f7f6f701 R11: ffff880ff7f6f4b0 R12: ffff880ff3e53d98 R13: ffff880ff3e53de0 R14: ffff880ff3e53d40 R15: ffff880ff3e53d40 FS: 00007f65381b3740(0000) GS:ffff880fffc40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000a8 CR3: 0000000ff69e9000 CR4: 00000000001406e0 Stack: ffff881ff5d49200 ffffc9000d787de0 ffffffff812ad0ed ffffffffa01390e0 ffff881ff5d49200 ffff881ff467cc00 0000000000000001 0000000000000000 ffff881ff4569800 ffffc9000d787e18 ffffffffa0135171 ffff881ff4569800 Call Trace: [] debugfs_remove_recursive+0x4d/0x190 [] ntb_transport_free+0x61/0x160 [ntb_transport] [] ntb_remove+0x25/0x40 [ntb] [] __device_release_driver+0x9a/0x140 [] driver_detach+0xb8/0xc0 [] bus_remove_driver+0x55/0xd0 [] driver_unregister+0x2c/0x50 [] ntb_unregister_client+0xe/0x10 [ntb] [] ntb_transport_exit+0x1c/0x66e [ntb_transport] [] SyS_delete_module+0x1ba/0x220 [] do_syscall_64+0x67/0x180 [] entry_SYSCALL64_slow_path+0x25/0x25 Code: 66 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb e8 3e e1 ff ff 48 ba 01 00 00 00 ff ff ff ff 48 89 d8 48 0f c1 10 85 d2 74 05 e8 53 2d c9 ff 65 48 8b 04 25 c0 d2 ------=_NextPart_000_03F3_01D26058.5F7C83F0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Test attempted using jonmason/ntb at = dfb7d24c5ad5c986f2417f52784738b67cfedd4d.

 

With latest, = it crashes when removing the modules.

 

[ 1494.330594] ntb_hw_intel 0000:80:03.0: qp 0: Send Link = Down

[ = 1494.358126] ntb_hw_intel = 0000:80:03.0: NTB Transport QP 0 freed

[ 1494.364771] ntb_hw_intel 0000:00:03.0: qp 0: Send Link = Down

[ = 1494.400171] ntb_hw_intel = 0000:00:03.0: NTB Transport QP 0 freed

[ 1494.431502] BUG: unable = to handle kernel NULL pointer dereference at = 00000000000000a8

[ 1494.440267] IP: [<ffffffff816c3def>] = down_write+0x1f/0x40

[ 1494.446312] PGD ff3231067 [ 1494.449136] PUD = ff5600067

PMD 0 [ = 1494.452760]

[ 1494.454430] Oops: 0002 [#1] SMP

 

Entering = kdb (current=3D0xffff880ff4ea2c00, pid 1297) on processor = 1 Oops: (null)

due to oops @ 0xffffffff816c3def

CPU: 1 PID: 1297 Comm: = rmmod Not tainted = 4.9.0-ntb #25

Hardware name: EMC = 900-565-027/110-325-102B-00, BIOS 23.27 = 12/10/2014

task: ffff880ff4ea2c00 task.stack: ffffc9000d784000

RIP: 0010:[<ffffffff816c3def>]=C2=A0 [<ffffffff816c3def>] = down_write+0x1f/0x40

RSP: 0018:ffffc9000d787d98=C2=A0 EFLAGS: = 00010246

RAX: 00000000000000a8 RBX: = 00000000000000a8 RCX: 0000000000000001

RDX: ffffffff00000001 RSI: ffff881ff5d49258 RDI: = 00000000000000a8

RBP: = ffffc9000d787da0 R08: ffffffffa01b2500 R09: = 000000018022000f

R10: = 00000000f7f6f701 R11: ffff880ff7f6f4b0 R12: = ffff880ff3e53d98

R13: = ffff880ff3e53de0 R14: ffff880ff3e53d40 R15: = ffff880ff3e53d40

FS:=C2=A0 00007f65381b3740(0000) GS:ffff880fffc40000(0000) = knlGS:0000000000000000

CS:=C2=A0 0010 DS: 0000 ES: 0000 CR0: = 0000000080050033

CR2: = 00000000000000a8 CR3: 0000000ff69e9000 CR4: = 00000000001406e0

Stack:

= ffff881ff5d49200 ffffc9000d787de0 ffffffff812ad0ed = ffffffffa01390e0

ffff881ff5d49200 = ffff881ff467cc00 0000000000000001 0000000000000000

ffff881ff4569800 ffffc9000d787e18 ffffffffa0135171 = ffff881ff4569800

Call = Trace:

[<ffffffff812ad0ed>] = debugfs_remove_recursive+0x4d/0x190

= [<ffffffffa0135171>] ntb_transport_free+0x61/0x160 [ntb_transport]

= [<ffffffffa0031115>] ntb_remove+0x25/0x40 [ntb]

[<ffffffff8147e81a>] = __device_release_driver+0x9a/0x140

= [<ffffffff8147e9c8>] driver_detach+0xb8/0xc0

[<ffffffff8147d7f5>] = bus_remove_driver+0x55/0xd0

= [<ffffffff8147f18c>] driver_unregister+0x2c/0x50

[<ffffffffa003117e>] = ntb_unregister_client+0xe/0x10 [ntb]

= [<ffffffffa01379ae>] ntb_transport_exit+0x1c/0x66e [ntb_transport]

= [<ffffffff8110d3ba>] = SyS_delete_module+0x1ba/0x220

= [<ffffffff81003a47>] do_syscall_64+0x67/0x180

[<ffffffff816c64ab>] = entry_SYSCALL64_slow_path+0x25/0x25

Code: 66 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 = 00 55 48 89 e5 53 48 89 fb e8 3e e1 ff ff 48 ba 01 00 00 00 = ff ff ff ff 48 89 d8 = <f0> 48 0f c1 10 85 d2 74 05 e8 53 2d c9 ff 65 48 8b 04 25 c0 = d2

------=_NextPart_000_03F3_01D26058.5F7C83F0--