USB: rtl8150_disconnect() needs tasklet_kill()
authorAndrew Morton <akpm@osdl.org>
Tue, 15 Aug 2006 06:11:09 +0000 (23:11 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Sep 2006 01:04:30 +0000 (18:04 -0700)
We need to wait until any currently-running handler has completed.  Fixes an
unplug-time oops reported by "Miles Lane" <miles.lane@gmail.com>.

Cc: "Petko Manolov" <petkan@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/net/rtl8150.c

index bd09232ce13c5fc5052d708a18315bf6498a08a4..a72685b96061dfb862a85aa8368e7758ce227089 100644 (file)
@@ -972,6 +972,7 @@ static void rtl8150_disconnect(struct usb_interface *intf)
        if (dev) {
                set_bit(RTL8150_UNPLUG, &dev->flags);
                tasklet_disable(&dev->tl);
+               tasklet_kill(&dev->tl);
                unregister_netdev(dev->netdev);
                unlink_all_urbs(dev);
                free_all_urbs(dev);