diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 21:01:29 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:53:10 -0500 |
commit | dabe0dc194d5d56d379a8994fff47392744b6491 (patch) | |
tree | 16696a688d5b6386c6183cc6137807af38e1d9d1 /block/blk-iopoll.c | |
parent | cf31e70d6cf93f19fe9bf1144966ef40991ac723 (diff) | |
download | linux-3.10-dabe0dc194d5d56d379a8994fff47392744b6491.tar.gz linux-3.10-dabe0dc194d5d56d379a8994fff47392744b6491.tar.bz2 linux-3.10-dabe0dc194d5d56d379a8994fff47392744b6491.zip |
vfs: fix the rest of sget() races
unfortunately, just checking MS_BORN after having grabbed ->s_umount in
sget() is not enough; places that pick superblock from a list and
grab s_umount shared need the same check in addition to checking for
->s_root; otherwise three-way race between failing mount, sget() and
such list-walker can leave us with list-walker coming *second*, when
temporary active ref grabbed by sget() (to be dropped when sget()
notices that original mount has failed by checking MS_BORN) has
lead to deactivate_locked_super() from failing ->mount() *not* doing
->kill_sb() and just releasing ->s_umount. Once sget() gets through
and notices that MS_BORN had never been set it will drop the active
ref and fs will be shut down and kicked out of all lists, but it's
too late for something like sync_supers().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block/blk-iopoll.c')
0 files changed, 0 insertions, 0 deletions