lkml.org 
[lkml]   [2020]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2] clk: vc5: Add memory check to prevent oops
From
Date
Hi Adam,

On 06/07/20 22:37, Adam Ford wrote:
> When getting the names of the child nodes, kasprintf is used to
> allocate memory which is used to create the string for the node
> name. Unfortunately, there is no memory check to determine
> if this allocation fails, it may cause an error when trying
> to get child node name.
>
> This patch will check if the memory allocation fails, and returns
> and -NOMEM error instead of blindly moving on.

s/-NOMEM/-ENOMEM/

With this possibly fixed:
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>

--
Luca

\
 
 \ /
  Last update: 2020-07-07 23:39    [W:0.198 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site