From: Greg KH <gregkh@suse.de>
To: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix possible kobject reference counter leak in kobject_rename()
Date: Thu, 21 Aug 2008 08:58:45 -0700 [thread overview]
Message-ID: <20080821155845.GA2424@suse.de> (raw)
In-Reply-To: <48AD4414.6080604@jp.fujitsu.com>
On Thu, Aug 21, 2008 at 07:31:48PM +0900, Kenji Kaneshige wrote:
> Hi,
>
> I found a possible kobject reference counter leak problem in
> kobject_rename(). The following patch will fix it.
>
> Thanks,
> Kenji Kaneshige
>
>
> Fix possible kobject reference counter leak in kobject_rename().
>
> If kobject_rename() failed because of name collision, we must call
> kobject_put() for specified kobject before return.
>
> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
>
> ---
> lib/kobject.c | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: linux-2.6.27-rc4/lib/kobject.c
> ===================================================================
> --- linux-2.6.27-rc4.orig/lib/kobject.c
> +++ linux-2.6.27-rc4/lib/kobject.c
> @@ -411,6 +411,7 @@ int kobject_rename(struct kobject *kobj,
> "to '%s' as '%s' is already in existence.\n",
> kobject_name(kobj), new_name, new_name);
> kobject_put(temp_kobj);
> + kobject_put(kobj);
> return -EINVAL;
> }
> }
Thanks, but this is already fixed up with a patch from Eric in my tree
in a different way.
greg k-h
next prev parent reply other threads:[~2008-08-21 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 10:31 [PATCH] Fix possible kobject reference counter leak in kobject_rename() Kenji Kaneshige
2008-08-21 15:58 ` Greg KH [this message]
2008-08-22 2:31 ` Kenji Kaneshige
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=20080821155845.GA2424@suse.de \
--to=gregkh@suse.de \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-kernel@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