patch-2.4.7 linux/drivers/usb/devices.c

Next file: linux/drivers/usb/devio.c
Previous file: linux/drivers/usb/bluetooth.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/drivers/usb/devices.c linux/drivers/usb/devices.c
@@ -475,6 +475,7 @@
 		return -EFAULT;
 
 	/* enumerate busses */
+	read_lock_irq (&usb_bus_list_lock);
 	for (buslist = usb_bus_list.next; buslist != &usb_bus_list; buslist = buslist->next) {
 		/* print devices for this bus */
 		bus = list_entry(buslist, struct usb_bus, bus_list);
@@ -484,6 +485,7 @@
 			return ret;
 		total_written += ret;
 	}
+	read_unlock_irq (&usb_bus_list_lock);
 	return total_written;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)