From: Pete Zaitcev Date: Wed, 24 May 2006 18:04:04 +0000 (-0700) Subject: [PATCH] USB: rmmod pl2303 after -28 X-Git-Tag: MMI-PSA29.97-13-9~49228^2~60 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2f8ad9a1b91bc6856860a2fea8b07e0c82c0ad0a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] USB: rmmod pl2303 after -28 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 7a1cc1b04979..cbca3402d6cd 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 *kref) } } + flush_scheduled_work(); /* port->work */ + usb_put_dev(serial->dev); /* free up any memory that we allocated */