[lkml]   [2003]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Flaw in the driver-model implementation of attributes
On Sun, 2003-06-15 at 09:42, Alan Stern wrote:
> If you're already aware of this, please forgive the intrusion.
> There's a general problem in the driver model's implementation of
> attribute files, in connection with loadable kernel modules. The
> sysfs_ops structure stores function pointers with no means for identifying
> the module that contains the corresponding code. As a result, it's
> possible to call through one of these pointers even after the module has
> been unloaded, causing an oops.
> It's not hard to provoke this sort of situation. A user process can
> open a sysfs device file, for instance, and delay trying to read it until
> the module containing the device driver has been removed. When the read
> does occur, it runs into trouble.

I've seen this oops when a program has its cwd in a /sys directory
corresponding to a removed (or replaced) module. I think active
references to a part of the /sys namespace corresponding to a module
should just pin the module. But I haven't looked into it really.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:36    [W:0.043 / U:3.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site