From: Pavel Shved Date: Fri, 17 Jun 2011 06:25:11 +0000 (+0000) Subject: gigaset: call module_put before restart of if_open() X-Git-Tag: v3.0-rc4~5^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f9381e98471837b631743270de988e78aad1f96;p=pandora-kernel.git 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 Signed-off-by: David S. Miller --- Reading git-diff-tree failed