浏览代码

[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 <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pete Zaitcev 19 年之前
父节点
当前提交
2f8ad9a1b9
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/usb/serial/usb-serial.c

+ 2 - 0
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);
 	usb_put_dev(serial->dev);
 
 
 	/* free up any memory that we allocated */
 	/* free up any memory that we allocated */