linux/fs/sysfs
Tejun Heo a7560a0132 sysfs: fix use-after-free in sysfs_kill_sb()
While restructuring the [u]mount path, 4b93dc9b1c ("sysfs, kernfs:
prepare mount path for kernfs") incorrectly updated sysfs_kill_sb() so
that it first kills super_block and then tries to dereference its
namespace tag to drop it.  Fix it by caching namespace tag before
killing the superblock and then drop the cached namespace tag.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: Vlastimil Babka <vbabka@suse.cz>
Link: http://lkml.kernel.org/g/20131205031051.GC5135@yliu-dev.sh.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10 22:40:12 -08:00
..
dir.c sysfs, kernfs: introduce sysfs_root_sd 2013-11-29 18:09:27 -08:00
file.c sysfs: bail early from kernfs_file_mmap() to avoid spurious lockdep warning 2013-12-10 21:33:31 -08:00
group.c sysfs, kernfs: introduce kernfs[_find_and]_get() and kernfs_put() 2013-11-29 17:55:10 -08:00
Kconfig
Makefile sysfs, kernfs: move inode code to fs/kernfs/inode.c 2013-11-29 17:55:10 -08:00
mount.c sysfs: fix use-after-free in sysfs_kill_sb() 2013-12-10 22:40:12 -08:00
symlink.c sysfs, kernfs: implement kernfs_ns_enabled() 2013-11-29 18:41:28 -08:00
sysfs.h sysfs, kernfs: remove cross inclusions of internal headers 2013-11-29 18:54:50 -08:00