From: Tejun Heo <tj@kernel.org>
To: Minchan Kim <minchan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jirka Hladky <jhladky@redhat.com>,
Thorsten Leemhuis <regressions@leemhuis.info>,
linux-kernel <linux-kernel@vger.kernel.org>,
regressions@lists.linux.dev,
Justin Forbes <jforbes@fedoraproject.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] kernfs: fix NULL dereferencing in kernfs_remove
Date: Wed, 27 Apr 2022 07:27:42 -1000 [thread overview]
Message-ID: <Yml9Djpe5HT0HqoN@slm.duckdns.org> (raw)
In-Reply-To: <20220427172152.3505364-1-minchan@kernel.org>
On Wed, Apr 27, 2022 at 10:21:51AM -0700, Minchan Kim wrote:
> kernfs_remove supported NULL kernfs_node param to bail out but revent
^
typo
> per-fs lock change introduced regression that dereferencing the
> param without NULL check so kernel goes crash.
>
> This patch checks the NULL kernfs_node in kernfs_remove and if so,
> just return.
...
> Cc: stable@vger.kernel.org
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=215696
> Link: https://lore.kernel.org/lkml/CAE4VaGDZr_4wzRn2___eDYRtmdPaGGJdzu_LCSkJYuY9BEO3cw@mail.gmail.com/
> Fixes: 393c3714081a (kernfs: switch global kernfs_rwsem lock to per-fs lock)
> Reported-by: Jirka Hladky <jhladky@redhat.com>
> Tested-by: Jirka Hladky <jhladky@redhat.com>
> Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
prev parent reply other threads:[~2022-04-27 17:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-27 17:21 [PATCH] kernfs: fix NULL dereferencing in kernfs_remove Minchan Kim
2022-04-27 17:27 ` Tejun Heo [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=Yml9Djpe5HT0HqoN@slm.duckdns.org \
--to=tj@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jforbes@fedoraproject.org \
--cc=jhladky@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=regressions@leemhuis.info \
--cc=regressions@lists.linux.dev \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).