Skip to content
Commit a7560a01 authored by Tejun Heo's avatar Tejun Heo Committed by Greg Kroah-Hartman
Browse files

sysfs: fix use-after-free in sysfs_kill_sb()



While restructuring the [u]mount path, 4b93dc9b ("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: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarYuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: default avatarYuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: default avatarVlastimil Babka <vbabka@suse.cz>
Link: http://lkml.kernel.org/g/20131205031051.GC5135@yliu-dev.sh.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9b2db6e1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment