lkml.org 
[lkml]   [2022]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] thunderbolt: Check for null pointer after calling kmemdup in icm_handle_event
On Wed, Jan 05, 2022 at 04:26:34PM +0800, Jiasheng Jiang wrote:
> As the possible failure of the allocation, kmemdup() may return NULL
> pointer.
> Like alloc_switch(), it might be better to check it.
> Therefore, icm_handle_event() should also check the return value of
> kmemdup().
> If fails, just free 'n' and directly return is enough, same as the way
> to handle the failure of kmalloc().

I can not understand this changelog text at all, sorry. Please read the
documentation for how to write a good changelog text.

And most importantly, how did you test this change?

thanks,

greg k-h

\
 
 \ /
  Last update: 2022-01-05 11:22    [W:0.036 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site