lkml.org 
[lkml]   [2011]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] gigaset: call module_put before restart of if_open()
From
From: Pavel Shved <shved@ispras.ru>
Date: Fri, 17 Jun 2011 20:25:11 +0400

> 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>

Applied.


\
 
 \ /
  Last update: 2011-06-17 21:31    [W:2.932 / U:0.164 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site