From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com>
Cc: Greg KH <greg@kroah.com>,
Hotplug List <linux-hotplug-devel@lists.sourceforge.net>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kobject: fix double kobject_put in kobject_unregister()
Date: Wed, 10 Nov 2004 22:30:16 +0000 [thread overview]
Message-ID: <20041110223016.C26346@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20041110141923.A13668@unix-os.sc.intel.com>; from anil.s.keshavamurthy@intel.com on Wed, Nov 10, 2004 at 02:19:23PM -0800
On Wed, Nov 10, 2004 at 02:19:23PM -0800, Keshavamurthy Anil S wrote:
> Hi Greg,
>
> This patch fixes the problem where in kobject resources were getting
> freed when those kobject were still in use due to double kobject_put()
> getting called in the kobject_unregister() code path.
Isn't it intended that, after an sysfs/kobject/device object is
unregistered that the thread doing the unregistering must not
dereference the memory associated with that object?
IOW, the sequence:
allocate
register (refcount >= 2 after this completes)
unregister
will automatically free the object once the last user has gone.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
WARNING: multiple messages have this Message-ID (diff)
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com>
Cc: Greg KH <greg@kroah.com>,
Hotplug List <linux-hotplug-devel@lists.sourceforge.net>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kobject: fix double kobject_put in kobject_unregister()
Date: Wed, 10 Nov 2004 22:30:16 +0000 [thread overview]
Message-ID: <20041110223016.C26346@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20041110141923.A13668@unix-os.sc.intel.com>; from anil.s.keshavamurthy@intel.com on Wed, Nov 10, 2004 at 02:19:23PM -0800
On Wed, Nov 10, 2004 at 02:19:23PM -0800, Keshavamurthy Anil S wrote:
> Hi Greg,
>
> This patch fixes the problem where in kobject resources were getting
> freed when those kobject were still in use due to double kobject_put()
> getting called in the kobject_unregister() code path.
Isn't it intended that, after an sysfs/kobject/device object is
unregistered that the thread doing the unregistering must not
dereference the memory associated with that object?
IOW, the sequence:
allocate
register (refcount >= 2 after this completes)
unregister
will automatically free the object once the last user has gone.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
next prev parent reply other threads:[~2004-11-10 22:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-10 22:19 [PATCH] kobject: fix double kobject_put in kobject_unregister() Keshavamurthy Anil S
2004-11-10 22:19 ` Keshavamurthy Anil S
2004-11-10 22:30 ` Russell King [this message]
2004-11-10 22:30 ` Russell King
2004-11-10 22:39 ` Keshavamurthy Anil S
2004-11-10 22:39 ` Keshavamurthy Anil S
2004-11-10 22:54 ` Greg KH
2004-11-10 22:54 ` Greg KH
2004-11-10 23:04 ` Keshavamurthy Anil S
2004-11-10 23:04 ` Keshavamurthy Anil S
2004-11-11 2:03 ` Keiichiro Tokunaga
2004-11-11 2:03 ` Keiichiro Tokunaga
2004-11-11 1:54 ` Keshavamurthy Anil S
2004-11-11 1:54 ` Keshavamurthy Anil S
2004-11-11 1:54 ` Keshavamurthy Anil S
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=20041110223016.C26346@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=anil.s.keshavamurthy@intel.com \
--cc=greg@kroah.com \
--cc=linux-hotplug-devel@lists.sourceforge.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.