OpenCloudOS-Kernel/drivers/i2c
Jean Delvare 1d66c64c3c [PATCH] I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers
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?

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-18 21:16:59 -07:00
..
algos Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
busses [PATCH] i2c-i801: I2C patch for Intel ESB2 2005-04-16 15:24:45 -07:00
chips [PATCH] I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers 2005-04-18 21:16:59 -07:00
Kconfig Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
i2c-core.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
i2c-dev.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
i2c-sensor-detect.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
i2c-sensor-vid.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00