Re: usbfs race while mounting/umounting

From: Wolfram Gloger (wg@malloc.de)
Date: Fri Oct 11 2002 - 07:34:36 EST


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/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:41 EST