From: Tejun Heo Date: Tue, 10 Dec 2013 15:22:30 +0000 (-0500) Subject: sysfs: fix use-after-free in sysfs_kill_sb() X-Git-Tag: v3.14-rc1~151^2~57 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7560a0132cfc93b25d2df1d277a078a05220cf4;p=pandora-kernel.git sysfs: fix use-after-free in sysfs_kill_sb() While restructuring the [u]mount path, 4b93dc9b1c68 ("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 Reported-by: Yuanhan Liu Tested-by: Yuanhan Liu Tested-by: Vlastimil Babka Link: http://lkml.kernel.org/g/20131205031051.GC5135@yliu-dev.sh.intel.com Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed