From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Chunyan Zhang <chunyan.zhang@unisoc.com>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Jing Xia <jing.xia@unisoc.com>,
Jing Xia <jing.xia.mail@gmail.com>,
Xuewen Yan <xuewen.yan@unisoc.com>, Ke Wang <ke.wang@unisoc.com>,
Chunyan Zhang <zhang.lyra@gmail.com>
Subject: Re: [PATCH] class: fix use-after-free in class_register()
Date: Mon, 18 Dec 2023 07:53:13 +0100 [thread overview]
Message-ID: <2023121858-slider-trustful-44a4@gregkh> (raw)
In-Reply-To: <2023121830-proxy-washed-ae4d@gregkh>
On Mon, Dec 18, 2023 at 07:52:18AM +0100, Greg Kroah-Hartman wrote:
> On Mon, Dec 18, 2023 at 10:44:03AM +0800, Chunyan Zhang wrote:
> > From: Jing Xia <jing.xia@unisoc.com>
> >
> > The lock_class_key is still registered and can be found in
> > lock_keys_hash hlist after subsys_private is freed in error
> > handler path.A task who iterate over the lock_keys_hash
> > later may cause use-after-free.So fix that up and unregister
> > the lock_class_key before kfree(cp).
>
> What task iterates over all hashes?
>
> And can you put ' ' after your '.'?
>
> And how was this found?
And more importantly, how was this tested?
thanks,
greg k-h
next prev parent reply other threads:[~2023-12-18 6:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 2:44 Chunyan Zhang
2023-12-18 6:52 ` Greg Kroah-Hartman
2023-12-18 6:53 ` Greg Kroah-Hartman [this message]
2023-12-18 10:41 ` jing xia
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=2023121858-slider-trustful-44a4@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=chunyan.zhang@unisoc.com \
--cc=jing.xia.mail@gmail.com \
--cc=jing.xia@unisoc.com \
--cc=ke.wang@unisoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=xuewen.yan@unisoc.com \
--cc=zhang.lyra@gmail.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
all inboxes | Powered by JetHome®