OpenCloudOS-Kernel/drivers/infiniband
Hangbin Liu 0d68fc4f12 infiniband: make sure the src net is infiniband when create new link
When we create a new infiniband link with uninfiniband device, e.g. `ip link
add link em1 type ipoib pkey 0x8001`. We will get a NULL pointer dereference
cause other dev like Ethernet don't have struct ib_device.

The code path is:
rtnl_newlink
  |-- ipoib_new_child_link
        |-- __ipoib_vlan_add
              |-- ipoib_set_dev_features
                    |-- ib_query_device

Fix this bug by make sure the src net is infiniband when create new link.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-03 20:38:56 -05:00
..
core Merge branches 'cxgb4', 'flowsteer' and 'misc' into for-linus 2013-12-23 09:19:02 -08:00
hw Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-12-30 09:33:30 -08:00
ulp infiniband: make sure the src net is infiniband when create new link 2014-01-03 20:38:56 -05:00
Kconfig IB/core: Re-enable create_flow/destroy_flow uverbs 2013-11-17 08:22:09 -08:00
Makefile mlx5: Add driver for Mellanox Connect-IB adapters 2013-07-08 10:32:24 -07:00