Bharat Potnuri
7350cdd025
RDMA/core: Save kernel caller name when creating CQ using ib_create_cq()
Few kernel applications like SCST-iSER create CQ using ib_create_cq(),
where accessing CQ structures using rdma restrack tool leads to below NULL
pointer dereference. This patch saves caller kernel module name similar to
ib_alloc_cq().
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<ffffffff8132ca70>] skip_spaces+0x30/0x30
PGD 738bac067 PUD 8533f0067 PMD 0
Oops: 0000 [#1] SMP
R10: ffff88017fc03300 R11: 0000000000000246 R12: 0000000000000000
R13: ffff88082fa5a668 R14: ffff88017475a000 R15: 0000000000000000
FS: 00002b32726582c0(0000) GS:ffff88087fc40000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000008491a1000 CR4: 00000000003607e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
[<ffffffffc05af69c>] ? fill_res_name_pid+0x7c/0x90 [ib_core]
[<ffffffffc05af79f>] fill_res_cq_entry+0xef/0x170 [ib_core]
[<ffffffffc05af4c4>] res_get_common_dumpit+0x3c4/0x480 [ib_core]
[<ffffffffc05af5d3>] nldev_res_get_cq_dumpit+0x13/0x20 [ib_core]
[<ffffffff815bc1e7>] netlink_dump+0x117/0x2e0
[<ffffffff815bcb8b>] __netlink_dump_start+0x1ab/0x230
[<ffffffffc059fead>] ibnl_rcv_msg+0x11d/0x1f0 [ib_core]
[<ffffffffc05af5c0>] ? nldev_res_get_mr_dumpit+0x20/0x20 [ib_core]
[<ffffffffc059fd90>] ? rdma_nl_multicast+0x30/0x30 [ib_core]
[<ffffffff815bea49>] netlink_rcv_skb+0xa9/0xc0
[<ffffffffc05a0018>] ibnl_rcv+0x98/0xb0 [ib_core]
[<ffffffff815be132>] netlink_unicast+0xf2/0x1b0
[<ffffffff815be50f>] netlink_sendmsg+0x31f/0x6a0
[<ffffffff8156b580>] sock_sendmsg+0xb0/0xf0
[<ffffffff816ace9e>] ? _raw_spin_unlock_bh+0x1e/0x20
[<ffffffff8156f998>] ? release_sock+0x118/0x170
[<ffffffff8156b731>] SYSC_sendto+0x121/0x1c0
[<ffffffff81568340>] ? sock_alloc_file+0xa0/0x140
[<ffffffff81221265>] ? __fd_install+0x25/0x60
[<ffffffff8156c2ce>] SyS_sendto+0xe/0x10
[<ffffffff816b6c2a>] system_call_fastpath+0x16/0x1b
RIP [<ffffffff8132ca70>] skip_spaces+0x30/0x30
RSP <ffff88072be97760>
CR2: 0000000000000000
Cc: <stable@vger.kernel.org>
Fixes: f66c8ba4c9 ("RDMA/core: Save kernel caller name when creating PD and CQ objects")
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-06-18 11:32:58 -06:00
..
2018-04-12 11:04:35 -07:00
2018-04-03 17:42:25 -07:00
2018-04-01 19:49:34 -04:00
2018-03-13 18:16:38 +01:00
2018-04-11 10:28:31 -07:00
2018-03-13 18:47:47 +02:00
2018-04-13 15:15:15 -07:00
2018-04-01 21:43:02 +03:00
2018-04-06 18:31:06 -07:00
2018-03-09 08:06:35 -07:00
2018-04-10 10:22:27 -07:00
2018-04-13 15:51:06 -07:00
2018-04-05 21:21:08 -07:00
2018-04-10 08:40:45 +02:00
2018-04-09 11:54:57 +02:00
2018-04-07 19:04:02 +09:00
2018-04-10 10:25:57 -07:00
2018-04-10 12:14:37 -07:00
2018-04-05 14:21:13 -07:00
2018-04-04 20:07:20 -07:00
2018-04-13 16:32:16 -07:00
2018-03-27 09:51:22 +02:00
2018-03-19 14:18:22 -05:00
2018-03-14 19:11:01 +01:00
2018-04-05 21:03:42 -07:00
2018-04-12 20:56:10 -07:00
2018-04-05 11:53:34 -07:00
2018-03-19 16:31:07 +01:00
2018-04-09 11:42:31 -07:00
2018-04-09 19:59:54 -07:00
2018-04-04 20:07:20 -07:00
2018-04-11 23:33:46 +02:00
2018-04-05 14:27:02 -07:00
2018-04-05 09:51:41 -07:00
2018-06-18 11:32:58 -06:00
2018-04-13 16:20:36 -07:00
2018-04-11 18:50:41 -07:00
2018-04-11 18:50:41 -07:00
2018-04-03 14:04:18 -07:00
2018-03-20 20:28:00 +01:00
2018-03-29 17:29:09 -06:00
2018-04-07 12:08:19 -07:00
2018-03-20 11:15:54 +08:00
2018-03-19 14:20:24 -05:00
2018-04-10 10:25:57 -07:00
2018-04-10 12:09:27 -07:00
2018-03-07 16:52:19 +01:00
2018-03-26 11:13:09 +02:00
2018-04-10 22:25:07 -07:00
2018-04-12 10:21:19 -07:00
2018-04-12 10:59:03 -07:00
2018-04-11 16:39:34 -07:00
2018-06-04 08:48:11 -06:00
2018-04-10 10:25:57 -07:00
2018-05-09 08:51:03 -04:00
2018-04-04 20:07:20 -07:00
2018-04-15 17:21:30 -07:00
2018-03-29 15:07:48 -04:00
2018-03-27 18:52:22 +02:00
2018-04-04 20:07:20 -07:00
2018-04-11 08:46:50 -05:00
2018-04-09 09:26:36 -07:00
2018-04-05 21:29:35 -07:00
2018-04-05 21:21:08 -07:00
2018-04-05 09:51:41 -07:00
2018-04-13 16:20:36 -07:00
2018-04-05 21:21:08 -07:00
2018-03-19 00:02:24 +01:00
2018-03-14 17:53:06 +01:00
2018-04-13 15:46:21 -07:00
2018-04-11 10:28:37 -07:00
2018-03-28 10:33:53 +08:00
2018-04-05 22:53:16 -07:00
2018-03-27 11:03:43 +02:00
2018-03-27 21:54:37 -07:00
2018-04-10 10:22:27 -07:00
2018-04-13 09:43:20 -07:00
2018-04-01 20:07:00 -04:00
2018-04-15 17:24:12 -07:00
2018-03-15 18:07:46 +01:00
2018-03-15 17:55:52 +01:00
2018-04-13 15:51:06 -07:00
2018-04-03 12:06:21 -07:00
2018-03-13 18:48:29 +02:00
2018-05-09 08:51:03 -04:00
2018-04-05 14:27:02 -07:00
2018-03-06 11:03:55 +01:00
2018-04-13 14:11:53 +08:00
2018-03-14 14:26:38 +03:00
2018-04-09 09:04:10 -07:00
2018-03-06 09:57:17 -08:00
2018-04-07 11:11:41 -07:00
2018-03-09 09:31:26 -08:00
2018-04-06 19:44:27 -07:00
2018-04-11 10:54:06 -04:00
2018-04-10 10:20:00 -07:00
2018-04-11 18:58:27 -07:00
2018-03-14 14:58:50 +01:00
2018-04-13 15:43:50 -07:00
2018-04-12 11:04:35 -07:00
2018-03-19 10:26:46 +01:00
2018-03-29 13:38:10 +03:00