2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-21 00:58:28 +08:00
linux-next/fs/configfs
Louis Rilling 4768e9b18d [PATCH] configfs: Fix symlink() to a removing item
The rule for configfs symlinks is that symlinks always point to valid
config_items, and prevent the target from being removed. However,
configfs_symlink() only checks that it can grab a reference on the target item,
without ensuring that it remains alive until the symlink is correctly attached.

This patch makes configfs_symlink() fail whenever the target is being removed,
using the CONFIGFS_USET_DROPPING flag set by configfs_detach_prep() and
protected by configfs_dirent_lock.

This patch introduces a similar (weird?) behavior as with mkdir failures making
rmdir fail: if symlink() races with rmdir() of the parent directory (or its
youngest user-created ancestor if parent is a default group) or rmdir() of the
target directory, and then fails in configfs_create(), this can make the racing
rmdir() fail despite the concerned directory having no user-created entry (resp.
no symlink pointing to it or one of its default groups) in the end.
This behavior is fixed in later patches.

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31 16:21:12 -07:00
..
configfs_internal.h configfs: Fix failing mkdir() making racing rmdir() fail 2008-07-14 13:57:16 -07:00
dir.c [PATCH] configfs: Fix symlink() to a removing item 2008-07-31 16:21:12 -07:00
file.c fs: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:54 -07:00
inode.c configfs: Introduce configfs_dirent_lock 2008-07-14 13:57:15 -07:00
item.c [PATCH] configfs+dlm: Rename config_group_find_obj and state semantics clearly 2007-07-10 17:02:31 -07:00
Makefile [PATCH] configfs: User-driven configuration filesystem 2006-01-03 11:45:28 -08:00
mount.c fs: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:54 -07:00
symlink.c [PATCH] configfs: Fix symlink() to a removing item 2008-07-31 16:21:12 -07:00