lkml.org 
[lkml]   [2019]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] USB: move usb debugfs directory creation to the usb common core
On Tue, Jun 04, 2019 at 03:25:14PM +0300, Felipe Balbi wrote:
>
> Hi,
>
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> > diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
> > index 7fcb9f782931..f3d6b1ab80cb 100644
> > --- a/drivers/usb/core/usb.c
> > +++ b/drivers/usb/core/usb.c
> > @@ -1185,19 +1185,17 @@ static struct notifier_block usb_bus_nb = {
> > .notifier_call = usb_bus_notify,
> > };
> >
> > -struct dentry *usb_debug_root;
> > -EXPORT_SYMBOL_GPL(usb_debug_root);
> > +static struct dentry *usb_devices_root;
> >
> > static void usb_debugfs_init(void)
> > {
> > - usb_debug_root = debugfs_create_dir("usb", NULL);
> > - debugfs_create_file("devices", 0444, usb_debug_root, NULL,
> > - &usbfs_devices_fops);
> > + usb_devices_root = debugfs_create_file("devices", 0444, usb_debug_root,
>
> don't we have a race now? Can usbcore ever probe before usb common?

How can that happen if usb_debug_root is in usb common? The module
loader will not let that happen. Or it shouldn't :)

thanks,

greg k-h

\
 
 \ /
  Last update: 2019-06-04 14:44    [W:0.629 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site