aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/ucma.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-03-07 08:07:41 +0200
committerDoug Ledford <dledford@redhat.com>2018-03-07 15:15:40 -0500
commitbb7f8f199c354c4cf155b1d6d55f86eaaed7fa5a (patch)
treee422de5ac9356ee58a3a097c8645569c1e33c98a /drivers/infiniband/core/ucma.c
parentRDMA/bnxt_re: Avoid Hard lockup during error CQE processing (diff)
downloadlinux-dev-bb7f8f199c354c4cf155b1d6d55f86eaaed7fa5a.tar.xz
linux-dev-bb7f8f199c354c4cf155b1d6d55f86eaaed7fa5a.zip
IB/core: Fix possible crash to access NULL netdev
resolved_dev returned might be NULL as ifindex is transient number. Ignoring NULL check of resolved_dev might crash the kernel. Therefore perform NULL check before accessing resolved_dev. Additionally rdma_resolve_ip_route() invokes addr_resolve() which performs check and address translation for loopback ifindex. Therefore, checking it again in rdma_resolve_ip_route() is not helpful. Therefore, the code is simplified to avoid IFF_LOOPBACK check. Fixes: 200298326b27 ("IB/core: Validate route when we init ah") Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/ucma.c')
0 files changed, 0 insertions, 0 deletions