From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"David S . Miller" <davem@davemloft.net>
Subject: Re: [PATCH] kobject: Access kobject name with caution if state is not initialized
Date: Mon, 20 Aug 2018 21:22:47 +0200 [thread overview]
Message-ID: <20180820192247.GA20101@kroah.com> (raw)
In-Reply-To: <1534784987-16107-1-git-send-email-srikar@linux.vnet.ibm.com>
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
next prev parent reply other threads:[~2018-08-20 19:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-20 17:09 [PATCH] kobject: Access kobject name with caution if state is not initialized Srikar Dronamraju
2018-08-20 19:22 ` Greg Kroah-Hartman [this message]
2018-08-20 19:33 ` Dmitry Torokhov
2018-08-21 6:46 ` Srikar Dronamraju
2018-08-21 4:58 ` Srikar Dronamraju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180820192247.GA20101@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.