[PATCH 2.6] I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers

Greg KH greg at kroah.com
Wed Apr 6 21:01:34 CEST 2005

On Sat, Apr 02, 2005 at 09:26:31PM +0200, Jean Delvare wrote:
> Hi Greg,
> The it87 and via686a hardware monitoring drivers each create a sysfs
> file named "alarms" in R/W mode, while they should really create it in
> read-only mode. Since we don't provide a store function for these files,
> write attempts to these files will do something undefined (I guess) and
> bad (I am sure). My own try resulted in a locked terminal (where I
> attempted the write) and a 100% CPU load until next reboot.
> As a side note, wouldn't it make sense to check, when creating sysfs
> files, that readable files have a non-NULL show method, and writable
> files have a non-NULL store method? I know drivers are not supposed to
> do stupid things, but there is already a BUG_ON for several conditions
> in sysfs_create_file, so maybe we could add two more?
> Please apply,
> thanks.
> (I leave it to you to decide whether this is a candidate for -stable.)

I will queue it up for the next round of patches for -stable.  In the
future, please just send stuff like this to the stable at kernel.org email
address, it will get picked up sooner and easier that way.


greg k-h

More information about the lm-sensors mailing list