From patchwork Thu Jul 12 05:53:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuo Handa X-Patchwork-Id: 10521085 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E00C6602C8 for ; Thu, 12 Jul 2018 05:53:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6D6629303 for ; Thu, 12 Jul 2018 05:53:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C98202933C; Thu, 12 Jul 2018 05:53:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00C5529303 for ; Thu, 12 Jul 2018 05:53:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726904AbeGLGB3 (ORCPT ); Thu, 12 Jul 2018 02:01:29 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:59713 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725992AbeGLGB3 (ORCPT ); Thu, 12 Jul 2018 02:01:29 -0400 Received: from fsav104.sakura.ne.jp (fsav104.sakura.ne.jp [27.133.134.231]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id w6C5rM4r043123; Thu, 12 Jul 2018 14:53:22 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav104.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav104.sakura.ne.jp); Thu, 12 Jul 2018 14:53:22 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav104.sakura.ne.jp) Received: from ccsecurity.localdomain (softbank126074194044.bbtec.net [126.74.194.44]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id w6C5rHEm043073 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 12 Jul 2018 14:53:22 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) From: Tetsuo Handa To: akpm@linux-foundation.org Cc: linux-fsdevel@vger.kernel.org, Tetsuo Handa , Alexander Viro , Dmitry Vyukov Subject: [PATCH] fs: Warn on first freeze_super() request. Date: Thu, 12 Jul 2018 14:53:25 +0900 Message-Id: <1531374805-3325-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> X-Mailer: git-send-email 1.8.3.1 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Dmitry Vyukov Cc: Alexander Viro --- 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);