lkml.org 
[lkml]   [2003]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: PCI driver module unload race?
    On Sat, Mar 08, 2003 at 08:09:43PM +0000, Russell King wrote:
    > On Sat, Mar 08, 2003 at 11:12:37AM -0800, Greg KH wrote:
    > > On Sat, Mar 08, 2003 at 10:47:49AM +0000, Russell King wrote:
    > > > Hi,
    > > >
    > > > What prevents the following scenario from happening? It's purely
    > > > theoretical - I haven't seen this occuring.
    > > >
    > > > - Load PCI driver.
    > > >
    > > > - PCI driver registers using pci_module_init(), and adds itself to sysfs.
    > > >
    > > > - Hot-plugin a PCI device which uses this driver. sysfs matches the PCI
    > > > driver, and calls the PCI drivers probe function.
    > >
    > > Ugh, yes you are correct, I can't believe I missed this before.
    > >
    > > How does this patch look?
    >
    > Hrm, I'm wondering whether this should be part of the device model
    > infrastructure. After all, surely every subsystems device driver
    > which could be a module would need this to prevent unload races?

    Very good point, I can see myself duplicating this logic for every
    subsystem :)

    I'll look into moving this into the driver core later today.

    thanks,

    greg k-h
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:33    [W:0.020 / U:0.732 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site