Re: sysfs-related oops during module unload (2.6.16-rc2)

Greg KH
2006-02-21T06:13:39Z

On Mon, Feb 20, 2006 at 11:50:39PM -0600, Nathan Lynch wrote:
> Greg KH wrote:
> > On Sat, Feb 18, 2006 at 06:47:51PM -0600, Nathan Lynch wrote:
> > > Sorry for the delay.
> > >
> > > Tested against 2.6.16-rc4-ish, and it seems to do the right thing --
> > > modprobe -r says the module is busy while the refcnt attribute is
> > > open. The module is allowed to unload once the file is closed.
> >
> > Great, thanks for trying it out and letting me know.
>
> Sure -- do you plan to push this for 2.6.16?

No.

> The reason I ask is that the refcnt attribute is world-readable, so a
> malicious or silly user can keep the file open until an unwitting
> superuser unloads a module...
>
> Far-fetched, I suppose, but I just wanted to make this scenario clear.

It's been like this for a number of kernel versions now, and module
unloading is a rare thing to happen (no tools do it automatically.) So
I don't think it's worth 2.6.16 material. Let it sit in -mm for a bit
to verify that I didn't break anything else, and I'll send it in for
2.6.17.

thanks,

greg k-h