RE: [PATCH v4] infiniband: i40iw: fix a potential NULL pointer dereference

From: Saleem, Shiraz
Date: Thu Jan 02 2020 - 11:09:45 EST


> Subject: [PATCH v4] infiniband: i40iw: fix a potential NULL pointer dereference
>
> 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")
> Signed-off-by: Xiyu Yang <xiyuyang19@xxxxxxxxxxxx>
> Signed-off-by: Xin Tan <tanxin.ctf@xxxxxxxxx>
> Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> ---
> Changes in v2:
> - Release rtnl lock when in_dev_get return NULL Changes in v3:
> - Continue the next loop when in_dev_get return NULL Changes in v4:
> - Change commit message
>

Thanks! Looks ok.

I believe Leon caught another issue in how rtnl locking scheme is done in this function.
Will fix.

Shiraz