lkml.org 
[lkml]   [2023]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup
On Wed, Oct 11, 2023 at 09:03:50PM +0800, Wenchao Hao wrote:
> fc_lport_ptp_setup() did not check the return value of fc_rport_create()
> which is possible to return NULL which would cause a NULL pointer
> dereference. Address this issue by checking return value of
> fc_rport_create() and log error message on fc_rport_create() failed.
>
> Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>

Thanks,

I verified that fc_lport_ptp_setup can return NULL (if kzalloc fails).

Reviewed-by: Simon Horman <horms@kernel.org>

\
 
 \ /
  Last update: 2023-10-13 17:42    [W:0.114 / U:1.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site