lkml.org 
[lkml]   [2018]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kobject: Access kobject name with caution if state is not initialized
On Mon, Aug 20, 2018 at 10:39:47PM +0530, Srikar Dronamraju wrote:
> If kobject state is not initialized, then its not even certain that
> kobject'name is initialized. Hence when accessing the kobject's name
> tread carefully.
>
> A stupid module test like
> https://github.com/srikard/tests/blob/master/modules/kobject_test.c
> can panic the system.

Lots of stupid modules can do dumb things. Just don't do that. The
kernel is not built to keep you from doing stupid things in kernel code
:)

So I fail to see why this patch is needed. What in-kernel code path is
trying to print a kobject's name before it is initialized? Why not fix
that obvious bug instead of forcing the kernel core to protect from
stupid code?

thanks,

greg k-h

\
 
 \ /
  Last update: 2018-08-20 21:23    [W:0.062 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site