]> www.infradead.org Git - users/dwmw2/linux.git/commit
RDMA/i40iw: fix a potential NULL pointer dereference
authorXiyu Yang <xiyuyang19@fudan.edu.cn>
Mon, 30 Dec 2019 02:24:28 +0000 (10:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:52:56 +0000 (16:52 -0500)
commita273bbb82fbe56c64c2a0dc0348a637adaf3d7a4
tree3a0ecc3cd26ed6f8cd3ba382df7eb856b16fc275
parent860c0e0cf379afa25f7fb1292eb2ca539b345acb
RDMA/i40iw: fix a potential NULL pointer dereference

commit 04db1580b5e48a79e24aa51ecae0cd4b2296ec23 upstream.

A NULL pointer can be returned by in_dev_get(). Thus add a corresponding
check so that a NULL pointer dereference will be avoided at this place.

Fixes: 8e06af711bf2 ("i40iw: add main, hdr, status")
Link: https://lore.kernel.org/r/1577672668-46499-1-git-send-email-xiyuyang19@fudan.edu.cn
Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/i40iw/i40iw_main.c