aboutsummaryrefslogtreecommitdiffstats
path: root/fs/kernfs/kernfs-internal.h
diff options
context:
space:
mode:
authorTejun Heo <[email protected]>2013-12-11 21:02:56 +0000
committerGreg Kroah-Hartman <[email protected]>2013-12-17 16:59:15 +0000
commitd0ae3d4347ee025cf23b850d484fe8593f7dd0f2 (patch)
tree5d6e4464ab25022c840733b17be5d3480b1dea84 /fs/kernfs/kernfs-internal.h
parentkernfs: add @mode to kernfs_create_dir[_ns]() (diff)
downloadkernel-d0ae3d4347ee025cf23b850d484fe8593f7dd0f2.tar.gz
kernel-d0ae3d4347ee025cf23b850d484fe8593f7dd0f2.zip
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'fs/kernfs/kernfs-internal.h')
0 files changed, 0 insertions, 0 deletions