lkml.org 
[lkml]   [2019]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v3] thunderbolt: Fix to check the return value of kmemdup
On Fri, Oct 11, 2019 at 03:00:13PM +0200, Markus Elfring wrote:
> > uuid in add_switch is allocted via kmemdup which can fail.
>
> I have tried another script for the semantic patch language out.
> This source code analysis approach points out that the implementation
> of the function “icm_handle_event” contains still an unchecked call
> of the function “kmemdup”.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/thunderbolt/icm.c?id=3cdb9446a117d5d63af823bde6fe6babc312e77b#n1627
> https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/thunderbolt/icm.c#L1627

Right it misses that.

> How do you think about to improve it?

Feel free to send a patch fixing it ;-) Or I can do that myself.

\
 
 \ /
  Last update: 2019-10-11 15:37    [W:0.077 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site