lkml.org 
[lkml]   [2019]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] infiniband: i40iw: fix a potential NULL pointer dereference
On Thu, Dec 26, 2019 at 09:21:56PM +0800, xiyuyang19@fudan.edu.cn wrote:
> From: Xiyu Yang <xiyuyang19@fudan.edu.cn>
>
> in_dev_get may return a NULL object. The fix handles the situation
> by adding a check to avoid NULL pointer dereference on idev,
> as pick_local_ipaddrs does.
>
> Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
> ---
> 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
>
> drivers/infiniband/hw/i40iw/i40iw_main.c | 2 ++
> 1 file changed, 2 insertions(+)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

\
 
 \ /
  Last update: 2019-12-26 15:41    [W:0.032 / U:41.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site