diff options
author | Ming Lei | 2010-08-07 16:20:35 +0800 |
---|---|---|
committer | Greg Kroah-Hartman | 2010-08-23 20:50:15 -0700 |
commit | d92a3ca689257c6bec94e026538782c280afaaab (patch) | |
tree | 632adc518c4e76a343e4e975a925261e6b4ff525 /Documentation/circular-buffers.txt | |
parent | 0eee6a2b2a52e17066a572d30ad2805d3ebc7508 (diff) |
USB: serial: fix leak of usb serial module refrence count
The patch with title below makes reference count of usb serial module
always more than one after driver is bound.
USB-BKL: Remove BKL use for usb serial driver probing
In fact, the patch above only replaces lock_kernel() with try_module_get()
, and does not use module_put() to do what unlock_kernel() did, so casue leak
of reference count of usb serial module and the module can not be unloaded
after serial driver is bound with device.
This patch fixes the issue, also simplifies such things:
-only call try_module_get() once in the entry of usb_serial_probe()
-only call module_put() once in the exit of usb_serial_probe
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/circular-buffers.txt')
0 files changed, 0 insertions, 0 deletions