[lkml]   [2003]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Fix ide unregister vs. driver model
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


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:48    [W:0.087 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site