Re: usbfs race while mounting/umounting

Wolfram Gloger (wg@malloc.de)
Fri, 11 Oct 2002 14:34:36 +0200


Oliver Neukum made me look more closely and I think the
usb_bus_list_lock needs to stay, appended is a corrected patch for
2.4.x.

Regards,
Wolfram.

--- drivers/usb/inode.c.orig Sat Aug 3 02:39:45 2002
+++ drivers/usb/inode.c Fri Oct 11 14:33:34 2002
@@ -628,6 +628,7 @@
s->s_root = d_alloc_root(root_inode);
if (!s->s_root)
goto out_no_root;
+ lock_kernel();
list_add_tail(&s->u.usbdevfs_sb.slist, &superlist);
for (i = 0; i < NRSPECIAL; i++) {
if (!(inode = iget(s, IROOT+1+i)))
@@ -646,6 +647,7 @@
recurse_new_dev_inode(bus->root_hub, s);
}
up (&usb_bus_list_lock);
+ unlock_kernel();
return s;

out_no_root:

-
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/