]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/qedr: Fix NULL pointer dereference when running over iWARP without RDMA-CM
authorKalderon, Michal <Michal.Kalderon@cavium.com>
Mon, 11 Jun 2018 07:20:20 +0000 (10:20 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 11 Jun 2018 17:04:14 +0000 (11:04 -0600)
commit8abfb4b8d33235749ab62ba1a2e9b259a59392f3
tree8d85ae382262f908df66769511c4106268e80afd
parent4ef9c06f3e06b9cd37fdb4f6af17edbff4247850
RDMA/qedr: Fix NULL pointer dereference when running over iWARP without RDMA-CM

Some RoCE specific code in qedr_modify_qp was run over an iWARP device
when running perftest benchmarks without the -R option.

The commit fbcdead98b20 ("IB/providers: Avoid null netdev check for RoCE")
exposed this. Dropping the check for NULL pointer on ndev in
qedr_modify_qp lead to a null pointer dereference when running over
iWARP. Before the code would identify ndev as being NULL and return an
error.

Fixes: fbcdead98b20 ("IB/providers: Avoid null netdev check for RoCE")
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/qedr/verbs.c