linux-stable/fs/configfs
Joel Becker 70526b6744 [PATCH] configfs: Pin configfs subsystems separately from new config_items.
configfs_mkdir() creates a new item by calling its parent's
->make_item/group() functions.  Once that object is created,
configfs_mkdir() calls try_module_get() on the new item's module.  If it
succeeds, the module owning the new item cannot be unloaded, and
configfs is safe to reference the item.

If the item and the subsystem it belongs to are part of the same module,
the subsystem is also pinned.  This is the common case.

However, if the subsystem is made up of multiple modules, this may not
pin the subsystem.  Thus, it would be possible to unload the toplevel
subsystem module while there is still a child item.  Thus, we now
try_module_get() the subsystem's module.  This only really affects
children of the toplevel subsystem group.  Deeper children already have
their parents pinned.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31 16:21:13 -07:00
..
Makefile
configfs_internal.h [PATCH] configfs: Prevent userspace from creating new entries under attaching directories 2008-07-31 16:21:13 -07:00
dir.c [PATCH] configfs: Pin configfs subsystems separately from new config_items. 2008-07-31 16:21:13 -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
mount.c fs: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:54 -07:00
symlink.c [PATCH] configfs: Prevent userspace from creating new entries under attaching directories 2008-07-31 16:21:13 -07:00