From: Greg KH <gregkh@linuxfoundation.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel@vger.kernel.org, rafael@kernel.org
Subject: Re: [PATCH] kobject: fix possible memory leak in kset_create_and_add()
Date: Mon, 17 Oct 2022 10:49:47 +0200 [thread overview]
Message-ID: <Y00XKw+Vs5Bo8jkZ@kroah.com> (raw)
In-Reply-To: <9c2e91e1-dd07-8a4b-999c-9a2d26ee5f07@huawei.com>
On Mon, Oct 17, 2022 at 04:13:03PM +0800, Yang Yingliang wrote:
> Hi,
>
> On 2022/10/17 12:51, Greg KH wrote:
> > On Mon, Oct 17, 2022 at 10:33:27AM +0800, Yang Yingliang wrote:
> > > If kset_register() fails in kset_create_and_add(), the name allocated
> > > in kset_create() will be leaked.
> > How is kset_create_and_add() failing? Is this in a real kernel, or
> > created with a fake fault injection?
> Inject fault while probing module qemu_fw_cfg, kset_create_and_add() may
> fail.
Ah good, it's never being hit in a real situation. The next time you
submit patches that are found like this, please include this type of
information.
thanks,
greg k-h
next prev parent reply other threads:[~2022-10-17 8:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 2:33 [PATCH] kobject: fix possible memory leak in kset_create_and_add() Yang Yingliang
2022-10-17 4:51 ` Greg KH
2022-10-17 8:13 ` Yang Yingliang
2022-10-17 8:49 ` Greg KH [this message]
2022-10-17 9:01 ` Yang Yingliang
2022-10-17 9:08 ` Greg KH
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=Y00XKw+Vs5Bo8jkZ@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=yangyingliang@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