aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/core_priv.h
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2019-05-01 08:46:55 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-05-03 10:41:23 -0300
commiteb15c78b05bd9fbac45ee5b56aaf29b2570b5238 (patch)
tree5e22616df2a1a3d2601516e4ce7928b608270914 /drivers/infiniband/core/core_priv.h
parentIB/core: Set qp->real_qp before it may be accessed (diff)
downloadlinux-dev-eb15c78b05bd9fbac45ee5b56aaf29b2570b5238.tar.xz
linux-dev-eb15c78b05bd9fbac45ee5b56aaf29b2570b5238.zip
RDMA/core: Do not invoke init_port on compat devices
The driver interface cannot manipulate the sysfs of the compat device, only of the full device so we must avoid calling the driver sysfs APIs on compat devices. This prevents an oops: Call Trace: dump_stack+0x5a/0x73 kobject_init+0x74/0x80 kobject_init_and_add+0x35/0xb0 hfi1_create_port_files+0x6e/0x3c0 [hfi1] ib_setup_port_attrs+0x43b/0x560 [ib_core] add_one_compat_dev+0x16a/0x230 [ib_core] rdma_dev_init_net+0x110/0x160 [ib_core] ops_init+0x38/0xf0 setup_net+0xcf/0x1e0 copy_net_ns+0xb7/0x130 create_new_namespaces+0x11a/0x1b0 unshare_nsproxy_namespaces+0x55/0xa0 ksys_unshare+0x1a7/0x340 __x64_sys_unshare+0xe/0x20 do_syscall_64+0x5b/0x180 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 5417783eabb2 ("RDMA/core: Support core port attributes in non init_net") Reported-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Tested-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/core/core_priv.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h
index 2764647056d8..ff40a450b5d2 100644
--- a/drivers/infiniband/core/core_priv.h
+++ b/drivers/infiniband/core/core_priv.h
@@ -341,8 +341,7 @@ int roce_resolve_route_from_path(struct sa_path_rec *rec,
struct net_device *rdma_read_gid_attr_ndev_rcu(const struct ib_gid_attr *attr);
void ib_free_port_attrs(struct ib_core_device *coredev);
-int ib_setup_port_attrs(struct ib_core_device *coredev,
- bool alloc_hw_stats);
+int ib_setup_port_attrs(struct ib_core_device *coredev);
int rdma_compatdev_set(u8 enable);