Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
"A couple of fixes; one for automount/lazy umount race, another a
classic "we don't protect the refcount transition to zero with the
lock that protects looking for object in hash" kind of crap in lockd."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
close the race in nlmsvc_free_block()
do_add_mount()/umount -l races

+9 -4
+1 -2
fs/lockd/svclock.c
··· 289 289 dprintk("lockd: freeing block %p...\n", block); 290 290 291 291 /* Remove block from file's list of blocks */ 292 - mutex_lock(&file->f_mutex); 293 292 list_del_init(&block->b_flist); 294 293 mutex_unlock(&file->f_mutex); 295 294 ··· 302 303 static void nlmsvc_release_block(struct nlm_block *block) 303 304 { 304 305 if (block != NULL) 305 - kref_put(&block->b_count, nlmsvc_free_block); 306 + kref_put_mutex(&block->b_count, nlmsvc_free_block, &block->b_file->f_mutex); 306 307 } 307 308 308 309 /*
+8 -2
fs/namespace.c
··· 1886 1886 return err; 1887 1887 1888 1888 err = -EINVAL; 1889 - if (!(mnt_flags & MNT_SHRINKABLE) && !check_mnt(real_mount(path->mnt))) 1890 - goto unlock; 1889 + if (unlikely(!check_mnt(real_mount(path->mnt)))) { 1890 + /* that's acceptable only for automounts done in private ns */ 1891 + if (!(mnt_flags & MNT_SHRINKABLE)) 1892 + goto unlock; 1893 + /* ... and for those we'd better have mountpoint still alive */ 1894 + if (!real_mount(path->mnt)->mnt_ns) 1895 + goto unlock; 1896 + } 1891 1897 1892 1898 /* Refuse the same filesystem on the same mount point */ 1893 1899 err = -EBUSY;