linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix ide unregister vs. driver model
Date: Mon, 25 Aug 2003 22:50:27 +0200	[thread overview]
Message-ID: <200308251317.37333.bzolnier@elka.pw.edu.pl> (raw)
In-Reply-To: <1061793253.779.27.camel@gaston>

On Monday 25 of August 2003 08:34, Benjamin Herrenschmidt wrote:
> On Mon, 2003-08-25 at 00:23, Bartlomiej Zolnierkiewicz wrote:
> > On Sunday 24 of August 2003 15:05, Benjamin Herrenschmidt wrote:
> > > Hi Bart !
> >
> > Hi,
> >
> > > This patch seem to have been lost, so here it is again. It fixes
> > > an Ooops on unregistering hwifs due to the device model now having
> > > mandatory release() functions. It also close the possible race we
> > > had on release if the entry was in use (by or /sys typically) by
> > > using a semaphore waiting for the release() to be called after
> > > doing an unregister.
> >
> > I can't see the race - all references to struct device should be dropped
> > by driver model before finally calling ->release() function...
>
> We have no race with the patch, that is we have no race when we wait
> for the semaphore after calling unregister(). We have a race if we
> don't as unregister() will drop a reference, but we may have pending
> ones from sysfs still... so if we don't wait for release() to be
> called, we may overwrite a struct device currently beeing used by
> sysfs.

Nope, I don't think struct device can be used by sysfs after execution
of device_unregister() (I've checked driver model and sysfs code).

--bartlomiej


  reply	other threads:[~2003-08-25 20:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-24 13:05 [PATCH] Fix ide unregister vs. driver model Benjamin Herrenschmidt
2003-08-24 22:23 ` Bartlomiej Zolnierkiewicz
2003-08-25  6:34   ` Benjamin Herrenschmidt
2003-08-25 20:50     ` Bartlomiej Zolnierkiewicz [this message]
2003-08-25 20:54       ` viro
2003-08-25 20:59       ` Patrick Mochel
2003-08-25 21:06         ` Bartlomiej Zolnierkiewicz
2003-08-25 10:01 ` insecure
2003-08-25 10:04   ` Benjamin Herrenschmidt

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=200308251317.37333.bzolnier@elka.pw.edu.pl \
    --to=b.zolnierkiewicz@elka.pw.edu.pl \
    --cc=benh@kernel.crashing.org \
    --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;
as well as URLs for NNTP newsgroup(s).