Messages in this thread | | | Date | Wed, 17 Sep 2014 13:36:26 -0400 (EDT) | From | Alan Stern <> | Subject | Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments |
| |
On Wed, 17 Sep 2014, Petr Mladek wrote:
> USB hub has started to use a workqueue instead of kthread. Let's update > the documentation and comments here and there. > > This patch mostly just replaces "khubd" with "hub_wq". There are only few > exceptions where the whole sentence was updated. These more complicated > changes can be found in the following files: > > Documentation/usb/hotplug.txt > drivers/net/usb/usbnet.c > drivers/usb/core/hcd.c > drivers/usb/host/ohci-hcd.c > drivers/usb/host/xhci.c
Okay, here's a real issue.
> @@ -2042,7 +2042,7 @@ static void choose_devnum(struct usb_device *udev) > int devnum; > struct usb_bus *bus = udev->bus; > > - /* If khubd ever becomes multithreaded, this will need a lock */ > + /* If hub_wq ever becomes multithreaded, this will need a lock */ > if (udev->wusb) { > devnum = udev->portnum + 1; > BUG_ON(test_bit(devnum, bus->devmap.devicemap));
You probably didn't notice when changing this comment. But in fact, workqueues _are_ multithreaded. Therefore you need to add a lock to this routine.
Still, apart from these relatively minor issues, the series looks good.
Alan Stern
| |