From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Jinjie Ruan <ruanjinjie@huawei.com>,
linux-modules@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Luis Chamberlain <mcgrof@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] driver core: Fix a null-ptr-deref in module_add_driver()
Date: Mon, 12 Aug 2024 12:22:03 +0200 [thread overview]
Message-ID: <2024081255-yearly-unaligned-f2ed@gregkh> (raw)
In-Reply-To: <7ea59d03-701c-4555-a8e8-5d7272b9381c@web.de>
On Mon, Aug 12, 2024 at 12:18:17PM +0200, Markus Elfring wrote:
> > Inject fault while probing of-fpga-region, if kasprintf() fails in
> > module_add_driver(), the second sysfs_remove_link() in exit path will cause
> > null-ptr-deref as below because kernfs_name_hash() will call strlen() with
> > NULL driver_name.
> …
>
> How do you think about to use the term “null pointer dereference”
> for the commit message (and summary phrase)?
>
>
> …
> > +++ b/drivers/base/module.c
> > @@ -66,27 +66,31 @@ int module_add_driver(struct module *mod, const struct device_driver *drv)
> …
> > sysfs_remove_link(mk->drivers_dir, driver_name);
> > +
> > +out_free_driver_name:
> > kfree(driver_name);
> >
> > +out_remove_kobj:
> > + sysfs_remove_link(&drv->p->kobj, "module");
> …
>
> I suggest to omit two blank lines here.
Hi,
This is the semi-friendly patch-bot of Greg Kroah-Hartman.
Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list. I strongly suggest that you not do this anymore. Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.
Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all. The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback. Please feel free to also ignore emails
from them.
thanks,
greg k-h's patch email bot
prev parent reply other threads:[~2024-08-12 10:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 8:06 [PATCH] driver core: Fix a null-ptr-deref in module_add_driver() Jinjie Ruan
2024-08-12 10:18 ` Markus Elfring
2024-08-12 10:22 ` Greg Kroah-Hartman [this message]
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=2024081255-yearly-unaligned-f2ed@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Markus.Elfring@web.de \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=rafael@kernel.org \
--cc=ruanjinjie@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox