From: Pete Zaitcev <[EMAIL PROTECTED]>

Wait for the scheduled work to finish before freeing memory, prevent oops.
http://bugzilla.kernel.org/show_bug.cgi?id=6596

Signed-off-by: Pete Zaitcev <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/usb-serial.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 7a1cc1b..cbca340 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -162,6 +162,8 @@ static void destroy_serial(struct kref *
                }
        }
 
+       flush_scheduled_work();         /* port->work */
+
        usb_put_dev(serial->dev);
 
        /* free up any memory that we allocated */
-- 
1.4.0


All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to