linux/fs/kernfs
Tejun Heo d0ae3d4347 kernfs: add REMOVED check to create and rename paths
kernfs currently assumes that the caller doesn't try to create a new
node under a removed parent, rename a removed node, or move a node
under a removed node.  While this works fine for sysfs, it'd be nice
to have protection against such cases especially given that kernfs is
planned to add support for mkdir, rmdir and rename requsts from
userland which may make race conditions more likely.

This patch updates create and rename paths to check REMOVED and fail
the operation with -ENOENT if performed on or towards removed nodes.
Note that remove path already has such check.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17 08:59:15 -08:00
..
dir.c kernfs: add REMOVED check to create and rename paths 2013-12-17 08:59:15 -08:00
file.c kernfs: s/sysfs/kernfs/ in internal functions and whatever is left 2013-12-11 17:39:20 -08:00
inode.c kernfs: s/sysfs/kernfs/ in internal functions and whatever is left 2013-12-11 17:39:20 -08:00
kernfs-internal.h kernfs: s/sysfs/kernfs/ in internal functions and whatever is left 2013-12-11 17:39:20 -08:00
Makefile sysfs, kernfs: add skeletons for kernfs 2013-11-27 13:28:24 -08:00
mount.c kernfs: s/sysfs/kernfs/ in internal functions and whatever is left 2013-12-11 17:39:20 -08:00
symlink.c kernfs: s/sysfs/kernfs/ in internal functions and whatever is left 2013-12-11 17:39:20 -08:00