[PATCH] fs: Warn on first freeze_super() request.

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

 



This is a temporary patch which should not go to linux.git.

syzbot is hitting hung task problems at __sb_start_write() [1].
atomic_long_read(&sem->rw_sem.count) says that percpu_down_read() was
blocked because somebody has called percpu_down_write(). But since we
believe that syzbot is not doing ioctl(FIFREEZE) requests, let's check
who is calling percpu_down_write() from freeze_super().

Since it is impossible to reproduce this problem locally, this patch was
made in order to test linux-next.git using syzbot infrastructure (and will
be removed after the culprit is found).

[1] https://syzkaller.appspot.com/bug?id=287aa8708bc940d0ca1645223c53dd4c2d203be6

Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
---
 fs/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/super.c b/fs/super.c
index 13647d4..4ec1b03 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1618,6 +1618,7 @@ int freeze_super(struct super_block *sb)
 		return 0;
 	}
 
+	WARN_ONCE(1, "Freezing superblock. Watch out for hung task.\n");
 	sb->s_writers.frozen = SB_FREEZE_WRITE;
 	/* Release s_umount to preserve sb_start_write -> s_umount ordering */
 	up_write(&sb->s_umount);
-- 
1.8.3.1




[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