From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Greg KH <gregkh@suse.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix possible kobject reference counter leak in kobject_rename()
Date: Fri, 22 Aug 2008 11:31:17 +0900 [thread overview]
Message-ID: <48AE24F5.3010309@jp.fujitsu.com> (raw)
In-Reply-To: <20080821155845.GA2424@suse.de>
Greg KH wrote:
> 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
>
>
Ah, I see. I didn't notice that. Thank you for the information.
Thanks,
Kenji Kaneshige
prev parent reply other threads:[~2008-08-22 2:32 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
2008-08-22 2:31 ` Kenji Kaneshige [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=48AE24F5.3010309@jp.fujitsu.com \
--to=kaneshige.kenji@jp.fujitsu.com \
--cc=gregkh@suse.de \
--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