From zaitcev@redhat.com Wed May 24 11:04:22 2006 Date: Wed, 24 May 2006 11:04:04 -0700 From: Pete Zaitcev To: greg@kroah.com Cc: zaitcev@redhat.com Subject: USB: rmmod pl2303 after -28 Message-Id: <20060524110404.6f179ab8.zaitcev@redhat.com> 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 --- drivers/usb/serial/usb-serial.c | 2 ++ 1 file changed, 2 insertions(+) --- gregkh-2.6.orig/drivers/usb/serial/usb-serial.c +++ gregkh-2.6/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 */