Honggang Li
8c490669de
RDMA/IPoIB: Replace netdev_priv with ipoib_priv for ipoib_get_link_ksettings
ipoib_dev_init accesses the wrong private data for the IPoIB device.
Commit cd565b4b51 (IB/IPoIB: Support acceleration options callbacks)
changed ipoib_priv from being identical to netdev_priv to being an
area inside of, but not the same pointer as, the netdev_priv pointer.
As such, the struct we want is the ipoib_priv area, not the netdev_priv
area, so use the right accessor, otherwise we kernel panic.
[ 27.271938] IPv6: ADDRCONF(NETDEV_CHANGE): mlx5_ib0.8006: link becomes ready
[ 28.156790] BUG: unable to handle kernel NULL pointer dereference at 000000000000067c
[ 28.166309] IP: ib_query_port+0x30/0x180 [ib_core]
...
[ 28.306282] RIP: 0010:ib_query_port+0x30/0x180 [ib_core]
...
[ 28.393337] Call Trace:
[ 28.397594] ipoib_get_link_ksettings+0x66/0xe0 [ib_ipoib]
[ 28.405274] __ethtool_get_link_ksettings+0xa0/0x1c0
[ 28.412353] speed_show+0x74/0xa0
[ 28.417503] dev_attr_show+0x20/0x50
[ 28.422922] ? mutex_lock+0x12/0x40
[ 28.428179] sysfs_kf_seq_show+0xbf/0x1a0
[ 28.434002] kernfs_seq_show+0x21/0x30
[ 28.439470] seq_read+0x116/0x3b0
[ 28.444445] ? do_filp_open+0xa5/0x100
[ 28.449774] kernfs_fop_read+0xff/0x180
[ 28.455220] __vfs_read+0x37/0x150
[ 28.460167] ? security_file_permission+0x9d/0xc0
[ 28.466560] vfs_read+0x8c/0x130
[ 28.471318] SyS_read+0x55/0xc0
[ 28.475950] do_syscall_64+0x67/0x150
[ 28.481163] entry_SYSCALL64_slow_path+0x25/0x25
...
[ 28.584493] ---[ end trace 3549968a4bf0aa5d ]---
Fixes: cd565b4b51 (IB/IPoIB: Support acceleration options callbacks)
Fixes: 0d7e2d2166 (IB/ipoib: add get_link_ksettings in ethtool)
Signed-off-by: Honggang Li <honli@redhat.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-06-01 17:20:09 -04:00
..
2017-05-27 09:06:43 -07:00
2017-05-09 10:01:15 -07:00
2017-05-22 20:32:05 +02:00
2017-05-20 16:12:30 -07:00
2017-04-30 12:22:14 +02:00
2017-05-18 16:53:55 +02:00
2017-05-10 13:38:18 -07:00
2017-05-12 10:43:25 -07:00
2017-05-22 20:28:22 +02:00
2017-05-09 23:21:46 +02:00
2017-05-10 11:33:08 -07:00
2017-05-13 16:18:21 -07:00
2017-05-09 15:40:28 -07:00
2017-05-03 16:27:36 +02:00
2017-05-22 19:31:07 -07:00
2017-04-26 11:38:56 +02:00
2017-05-10 19:13:03 -07:00
2017-05-26 11:51:55 +10:00
2017-05-02 19:09:35 -07:00
2017-05-04 19:15:35 -07:00
2017-05-14 07:49:32 -07:00
2017-05-08 17:15:14 -07:00
2017-05-22 19:22:19 -07:00
2017-05-08 17:36:39 -04:00
2017-05-01 23:17:37 +02:00
2017-05-10 19:13:03 -07:00
2017-06-01 17:20:09 -04:00
2017-05-26 16:45:13 -07:00
2017-05-17 14:51:54 +02:00
2017-05-21 11:45:26 -07:00
2017-05-10 19:13:03 -07:00
2017-05-22 21:12:44 +02:00
2017-05-04 07:53:04 -06:00
2017-05-05 19:33:07 -07:00
2017-04-27 16:20:04 +05:30
2017-05-18 12:04:41 -07:00
2017-05-10 19:13:03 -07:00
2017-05-16 08:12:47 -07:00
2017-04-24 18:21:17 -04:00
2017-04-27 11:54:49 +01:00
2017-05-16 23:05:40 +02:00
2017-05-26 09:05:35 -07:00
2017-05-13 10:23:12 -07:00
2017-05-26 14:55:38 -04:00
2017-05-12 15:43:10 -07:00
2017-05-26 11:53:02 +03:00
2017-05-09 10:01:15 -07:00
2017-05-24 08:21:56 -07:00
2017-05-23 14:18:17 -05:00
2017-05-10 19:13:03 -07:00
2017-05-02 19:09:35 -07:00
2017-05-04 19:15:35 -07:00
2017-05-12 12:02:21 -07:00
2017-05-14 13:30:05 +02:00
2017-05-01 16:15:18 -07:00
2017-05-04 19:15:35 -07:00
2017-04-30 22:17:44 +09:00
2017-05-10 11:33:08 -07:00
2017-05-09 10:01:15 -07:00
2017-05-10 11:33:08 -07:00
2017-05-22 20:32:05 +02:00
2017-05-16 09:24:44 -07:00
2017-05-24 20:29:53 -07:00
2017-05-19 13:36:56 -07:00
2017-04-26 15:58:22 +01:00
2017-05-16 14:23:31 +02:00
2017-05-12 11:44:13 -07:00
2017-05-18 23:54:47 -07:00
2017-05-23 20:09:34 -07:00
2017-05-25 14:36:37 +02:00
2017-05-16 23:06:41 +02:00
2017-05-19 10:10:07 +02:00
2017-05-17 11:27:41 +02:00
2017-05-05 11:36:44 -07:00
2017-05-08 17:15:12 -07:00
2017-05-11 11:12:26 -07:00
2017-05-08 17:15:10 -07:00
2017-05-02 23:41:43 +03:00
2017-05-19 10:42:25 +02:00
2017-05-09 09:12:53 -07:00
2017-05-10 21:03:31 +02:00