diff options
author | khali@linux-fr.org <khali@linux-fr.org> | 2005-04-29 18:00:04 -0700 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-05-12 10:00:21 -0700 |
commit | 64ffae4fd89885a42a39ce91348e008a9f92166a (patch) | |
tree | f5c1038b3f4f240c654fefdf8ebda36b14fd6871 /arch/um/include/sysdep-i386/syscalls.h | |
parent | 0c726347c8ae1a81d1461e9c02ca45f5629f4714 (diff) | |
download | linux-stable-64ffae4fd89885a42a39ce91348e008a9f92166a.tar.gz linux-stable-64ffae4fd89885a42a39ce91348e008a9f92166a.tar.bz2 linux-stable-64ffae4fd89885a42a39ce91348e008a9f92166a.zip |
[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>
Diffstat (limited to 'arch/um/include/sysdep-i386/syscalls.h')
0 files changed, 0 insertions, 0 deletions