lkml.org 
[lkml]   [2008]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ibmphp: Fix module ref count underflow
On Wed, Dec 10, 2008 at 02:43:34PM -0500, Neil Horman wrote:
> Hey-
> I happened to notice that the ibmphp hotplug driver does something
> rather silly in its init routine. It purposely calls module_put so as to
> underflow its module ref count to avoid being removed from the kernel. This is
> bad practice, and wrong, since it provides a window for subsequent module_gets
> to reset the refcount to zero, allowing an unload to race in and cause all sorts
> of mysterious panics. If the module is unsafe to load, it should inform the
> kernel as such with a call to __unsafe. The patch below does that.
>
> Regards
> Neil
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

Jesse is the PCI maintainer now, you should send this to him to verify
that it goes in.

Feel free to add my:
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>

to this, nice job.

thanks,

greg k-h


\
 
 \ /
  Last update: 2008-12-10 23:37    [W:0.064 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site