From: Oliver Neukum <oliver@neukum.name>
To: Greg KH <greg@kroah.com>, Roman Zippel <zippel@linux-m68k.org>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
Patrick Mochel <mochel@osdl.org>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Jeff Garzik <jgarzik@pobox.com>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: PCI driver module unload race?
Date: Tue, 11 Mar 2003 10:00:40 +0100 [thread overview]
Message-ID: <200303111000.40387.oliver@neukum.name> (raw)
In-Reply-To: <20030311011532.GH13145@kroah.com>
Am Dienstag, 11. März 2003 02:15 schrieb Greg KH:
> On Tue, Mar 11, 2003 at 02:04:20AM +0100, Roman Zippel wrote:
> > On Mon, 10 Mar 2003, Greg KH wrote:
> > > > It seems that the semaphore in bus_add_device() makes this
> > > > unnecessary.
> > >
> > > Hm, yes. I think you are correct.
> > >
> > > So this patch is not needed, and the struct module * can be ripped out
> > > of struct usb_driver too :)
> >
> > I think it's not easy. I haven't studied the code completely yet, but
> > e.g. when you attach a device to a driver you also have to get a
> > reference to the driver.
>
> You get a link to the driver, but you can't increment the module count
> of the driver at that time, as we have to be able to remove a module
> somehow :)
That is simple. Export a generic way to disconnect a driver from a device.
> > I think there are more interesting races, e.g. when you create a sysfs
> > symlink, that symlink might also have references to a module.
>
> Yeah, I still think there are some nasty issues with regards to being in
> a sysfs directory, with a open file handle, and the module is removed.
> But I haven't checked stuff like that in a while.
>
> CONFIG_MODULE_UNLOAD, just say no.
That is taking the easy way out.
Regards
Oliver
next prev parent reply other threads:[~2003-03-11 8:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-08 10:47 Russell King
2003-03-08 19:12 ` Greg KH
2003-03-08 19:47 ` Petr Vandrovec
2003-03-08 19:51 ` Greg KH
2003-03-09 2:33 ` Petr Vandrovec
2003-03-08 20:03 ` Russell King
2003-03-08 20:09 ` Russell King
2003-03-08 20:21 ` Greg KH
2003-03-10 21:44 ` Greg KH
2003-03-10 23:48 ` Oliver Neukum
2003-03-10 23:51 ` Greg KH
2003-03-11 1:04 ` Roman Zippel
2003-03-11 1:15 ` Greg KH
2003-03-11 9:00 ` Oliver Neukum [this message]
2003-03-11 15:06 ` Patrick Mochel
2003-03-11 16:07 ` Oliver Neukum
2003-03-16 13:13 ` Rusty Russell
2003-03-11 11:05 ` Roman Zippel
2003-03-11 15:27 ` Patrick Mochel
2003-03-11 20:09 ` Roman Zippel
2003-03-11 19:15 ` Patrick Mochel
2003-03-12 2:28 ` Roman Zippel
2003-03-16 13:05 ` Rusty Russell
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=200303111000.40387.oliver@neukum.name \
--to=oliver@neukum.name \
--cc=greg@kroah.com \
--cc=ink@jurassic.park.msu.ru \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=rusty@rustcorp.com.au \
--cc=zippel@linux-m68k.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
all inboxes | Powered by JetHome®