Commit 345a5c4a authored by Christian Brauner's avatar Christian Brauner

super: move lockdep assert

Fix braino and move the lockdep assertion after put_super() otherwise we
risk a use-after-free.

Fixes: 2c18a63b ("super: wait until we passed kill super")
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Message-Id: <20230828-vfs-super-fixes-v1-1-b37a4a04a88f@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent cd4284cf
......@@ -570,8 +570,8 @@ static bool grab_super_dead(struct super_block *sb)
return true;
}
wait_var_event(&sb->s_flags, wait_dead(sb));
put_super(sb);
lockdep_assert_not_held(&sb->s_umount);
put_super(sb);
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment