Pavel Shved 2f9381e984 gigaset: call module_put before restart of if_open()
if_open() calls try_module_get(), and after an attempt to lock a mutex
the if_open() function may return -ERESTARTSYS without
putting the module.  Then, when if_open() is executed again,
try_module_get() is called making the reference counter of THIS_MODULE
greater than one at successful exit from if_open().  The if_close()
function puts the module only once, and as a result it can't be
unloaded.

This patch adds module_put call before the return from if_open().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Pavel Shved <shved@ispras.ru>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
2011-06-17 15:27:32 -04:00
..
2010-10-04 11:00:55 +02:00
2010-09-06 18:29:18 -07:00
2011-03-31 11:26:23 -03:00
2010-10-08 10:21:22 -07:00
2010-02-22 15:45:53 -08:00
2008-08-02 16:28:20 +02:00