linux_old1/fs/sysfs
Eric W. Biederman ce59791936 sysfs: Complain bitterly about attempts to remove files from nonexistent directories.
Recently an OOPS was observed from the usb serial io_ti driver when it tried to remove
sysfs directories.  Upon investigation it turns out this driver was always buggy
and that a recent sysfs change had stopped guarding itself against removing attributes
from sysfs directories that had already been removed. :(

Historically we have been silent about attempting to files from nonexistent sysfs
directories and have politely returned error codes.  That has resulted in people writing
broken code that ignores the error codes.

Issue a kernel WARNING and a stack backtrace to make it clear in no uncertain
terms that abusing sysfs is not ok, and the callers need to fix their code.

This change transforms the io_ti OOPS into a more comprehensible error message
and stack backtrace.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Wolfgang Frisch <wfpub@roembden.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:12:32 -08:00
..
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bin.c sysfs: only access bin file vm_ops with the active lock 2010-10-22 10:16:43 -07:00
dir.c sysfs: Make sysfs_rename safe with sysfs_dirents in rbtrees. 2011-11-01 09:16:14 -07:00
file.c sysfs: Complain bitterly about attempts to remove files from nonexistent directories. 2012-01-24 12:12:32 -08:00
group.c switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
inode.c sysfs: Complain bitterly about attempts to remove files from nonexistent directories. 2012-01-24 12:12:32 -08:00
mount.c Delay struct net freeing while there's a sysfs instance refering to it 2011-06-12 17:45:41 -04:00
symlink.c sysfs: allow creating symlinks from untagged to tagged directories 2010-07-26 12:02:41 -07:00
sysfs.h sysfs: propagate umode_t 2012-01-03 22:55:03 -05:00