From: Greg KH <greg@kroah.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Question about (or bug in?) the kobject implementation
Date: Wed, 3 Mar 2004 14:16:46 -0800 [thread overview]
Message-ID: <20040303221646.GA425@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0403031702200.890-100000@ida.rowland.org>
On Wed, Mar 03, 2004 at 05:11:02PM -0500, Alan Stern wrote:
> On Wed, 3 Mar 2004, Greg KH wrote:
>
> > On Fri, Feb 27, 2004 at 11:02:34PM -0500, Alan Stern wrote:
> > > We're actually discussing two different questions here.
> > >
> > > A. Is it okay to call kobject_add() after calling kobject_del() --
> > > this was my original question.
> >
> > No, this is not ok. It might happen to work, but it is not valid.
>
> I want to understand _why_ it is not valid. Can you explain please?
>
> From what you said earlier, I got the impression that calling _add() after
> _del() is illegal because it runs the risk that the refcount may be 0 and
> the object may be gone.
Yes, that is the risk.
> But if you have a separate valid reference, that can't happen. Would
> it be legal then, or is there more to it?
Hm, it probably would work, hence the current working USB code :)
But I really don't want to "special case" anything here. So it's easier
to say, "just don't do that".
thanks,
greg k-h
next prev parent reply other threads:[~2004-03-03 22:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-28 4:02 Question about (or bug in?) the kobject implementation Alan Stern
2004-02-28 7:38 ` Michael Frank
2004-02-28 17:09 ` Alan Stern
2004-03-03 21:44 ` Greg KH
2004-03-03 22:11 ` Alan Stern
2004-03-03 22:16 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-25 15:05 Alan Stern
2004-02-27 19:48 ` Greg KH
2004-02-27 20:06 ` Alan Stern
2004-02-27 20:17 ` 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=20040303221646.GA425@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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