mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Maneesh Soni <maneesh@in.ibm.com>, Greg KH <greg@kroah.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [OOPS] sysfs_hash_and_remove (was Re: What protection ....)
Date: Sat, 26 Nov 2005 17:26:04 -0500	[thread overview]
Message-ID: <1133043964.3418.17.camel@mulgrave> (raw)
In-Reply-To: <20051124143401.GB1060@elte.hu>

On Thu, 2005-11-24 at 15:34 +0100, Ingo Molnar wrote:
> * Maneesh Soni <maneesh@in.ibm.com> wrote:
> 
> > So, IMO, it is necessary to explicitly remove links before 
> > unregistering the kobject in case of bidirectional cross symlinks.
> > 
> > The patch from James, is working, because it is not creating the cross 
> > symlink itself.
> 
> so, what is your suggestion, what should be done to fix the problem? The 
> patch below:
> isnt fit for upstream inclusion :-)

Well, the patch was just intended to confirm the problem diagnosis.

The solution Maneesh appears to be advocating to the issue is imposing
del ordering, the issue being that device_del is the call that actually
removes the directories and symlinks, so all callers have to make sure
they've called class_device_del for every class on the device before
calling device_del.  Since this trigger point happens regardless of
references, we can't expect references to get us out of this one, so
we'll have to audit the failing code manually.  I did find and fix one
of these issues in SCSI, but there may be more lurking around ...

James



  reply	other threads:[~2005-11-26 22:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-22 21:33 What protection does sysfs_readdir have with SMP/Preemption? Steven Rostedt
2005-11-22 21:39 ` Greg KH
2005-11-23  4:50   ` Maneesh Soni
2005-11-23  8:18     ` Ingo Molnar
2005-11-23 12:35       ` Steven Rostedt
2005-11-23 12:54         ` Maneesh Soni
2005-11-23 12:50       ` Maneesh Soni
2005-11-23 12:52       ` [OOPS] sysfs_hash_and_remove (was Re: What protection ....) Maneesh Soni
2005-11-24 12:26         ` Maneesh Soni
2005-11-24 14:34           ` Ingo Molnar
2005-11-26 22:26             ` James Bottomley [this message]
2006-02-11  0:33         ` Greg KH
2006-02-11 15:46           ` Steven Rostedt
2006-02-24  1:04             ` Greg KH
2005-11-23 12:56     ` What protection does sysfs_readdir have with SMP/Preemption? Steven Rostedt
2005-11-23 13:58       ` Maneesh Soni
2005-11-23 14:15         ` Steven Rostedt
2005-11-23 14:20           ` Steven Rostedt
2005-11-23 15:24             ` kobject_register needs return value checks (was: What protection does sysfs_readdir have with SMP/Preemption?) Steven Rostedt
2005-11-24  4:16           ` What protection does sysfs_readdir have with SMP/Preemption? Maneesh Soni
2005-11-24 14:32             ` Ingo Molnar

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=1133043964.3418.17.camel@mulgrave \
    --to=james.bottomley@hansenpartnership.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maneesh@in.ibm.com \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.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

Powered by JetHome