From: Andrew Morton still peevish Cc: "Eric W. Biederman" Cc: Al Viro Cc: Christoph Hellwig Cc: Miklos Szeredi Cc: Serge Hallyn Cc: Ram Pai Signed-off-by: Andrew Morton --- fs/namespace.c | 1 + 1 file changed, 1 insertion(+) diff -puN fs/namespace.c~unprivileged-mounts-allow-unprivileged-bind-mounts-fix fs/namespace.c --- a/fs/namespace.c~unprivileged-mounts-allow-unprivileged-bind-mounts-fix +++ a/fs/namespace.c @@ -240,6 +240,7 @@ static void dec_nr_user_mounts(void) static int reserve_user_mount(void) { int err = 0; + spin_lock(&vfsmount_lock); if (nr_user_mounts >= max_user_mounts && !capable(CAP_SYS_ADMIN)) err = -EPERM; _