Semaphore should be released in get_super

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Probably I found a bug in get_super() proc. I think there should be semaphore released before return sb.
I attached diff file.

regards,
sdrb
diff --git a/fs/super.c b/fs/super.c
index c04f7e0..361bbec 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -473,8 +473,10 @@ rescan:
 			spin_unlock(&sb_lock);
 			down_read(&sb->s_umount);
 			/* still alive? */
-			if (sb->s_root)
+			if (sb->s_root) {
+				up_read(&sb->s_umount);
 				return sb;
+			}
 			up_read(&sb->s_umount);
 			/* nope, got unmounted */
 			spin_lock(&sb_lock);

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux