lkml.org 
[lkml]   [2012]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4][Trivial] lib/kobject.c : check parameter in kobject_init_and_add
On Sat, Apr 21, 2012 at 06:17:49PM +0800, yan wrote:
> If user turns to the simple interface kobject_init_and_add
> and gives a null kobject, kobject_init can detect it but
> just dumps the stack. Then there is:
> -->kobject_add_varg
> -->kobject_set_name_vargs
> In the end, it will reference kobj->name and we have an oops.
>
> Check whether we have a valid kobject in kobject_init_and_add.

Why would anyone ever call this function without a valid kobject?

Again, sorry, this patch isn't ok.

greg k-h


\
 
 \ /
  Last update: 2012-04-23 22:43    [W:0.083 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site