Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp5301614rwj; Wed, 21 Dec 2022 00:19:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXt+6M3yomwP5Er+VVOw0+8qgBeyB5N0zxfVohxwbSaAAREV/0hwvkk7tIYVTBOK8PWgnBOD X-Received: by 2002:a17:907:c717:b0:7c1:ad6:638a with SMTP id ty23-20020a170907c71700b007c10ad6638amr696469ejc.17.1671610787862; Wed, 21 Dec 2022 00:19:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671610787; cv=none; d=google.com; s=arc-20160816; b=SVQQVV6U4DIbg6hcXtppOkXSfBhIooR1VamRHdKmWMNRmdrtRtTBpCnozsC5j3D1oF 4LeOk+hK/V+tQu/Gz+Pb4fiw5R07MekDlhLRq2fvW1FVzS5aG5shHOSBxTPMhuK519wp abqd+QtDWO0GW8fa17DyFmidTyrOL66qMwYZokGxwbz1mvBxf/zrM48NO0SA4363r46V 39b3XbYzxk6CitPAuggjoB3T+HVGrWbe//t1yBMppaA7ZyDfj9ZYJgKBqRynnuav1DX0 TEDUJJk22fHd09020E0tMnHUH6uJR+3+w0qMNOGnfYFBUW+WjIkh/bSBYfZBV9dJqxr0 IjAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:message-id:date:mime-version; bh=A7+8fuqPbIIauDX75GlkNV66FuhTqueE+eYRZ4kmpgo=; b=ffX6L/d5QeAnfTkTxM4xQqrHYPL7ztMOe6dLpfWi3WD+OEk/h0QfOpqLXi7ootdCKy AEcK//vGQBbNLU8TJDwplkbKJpSjYcj1r3EdZKlRULeatp4NoKOQSjSM2bef7AyKytVA 2FFip0MIT7VG1tL2mdHp5D8ifw8OUkMOkbtIiCFmzPJCJ0ZLHIqDGtxKfmRUhF7qTCln CsDhh21SBh3qZfX7Z4r+a3msB5L86VBINJFkvQ7OsBYyscMj9alhkQS+xkTeuB7Uo6aJ H3pDlZSUg2w44dTujO50MzDhciALiIbIhct/U8OOhZFuNK6Ep8vwGccbliyu1NyC+6gE 20rA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a056402510e00b0046b55a18bc4si11409401edd.436.2022.12.21.00.19.31; Wed, 21 Dec 2022 00:19:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234517AbiLUIPL (ORCPT + 69 others); Wed, 21 Dec 2022 03:15:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234562AbiLUIOo (ORCPT ); Wed, 21 Dec 2022 03:14:44 -0500 Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB2E5218A5 for ; Wed, 21 Dec 2022 00:14:41 -0800 (PST) Received: by mail-il1-f200.google.com with SMTP id a10-20020a056e02180a00b0030bc09c6b94so3358395ilv.6 for ; Wed, 21 Dec 2022 00:14:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=A7+8fuqPbIIauDX75GlkNV66FuhTqueE+eYRZ4kmpgo=; b=02LQ2O4fQ2kKggvdAADjzE5/QfSsKArzvn1YOdDVOSedx01tS2Bf2KcIugsaVtKhzz aTGwlL+7s7F5WwNI10fmABtK7aAmGS7YnPlEQITv/tONBuNWPzPw04dtYX/1ORxVZ1c/ 6c/Jsz9Q1TuE/3idmHUueMcyZZgCprRk8w/yV65IkuO9UAbIi30ipkQ3kGXRCzPUlLEI 7IV0i45c8oxrjTd06E758IUKrVg/zpYDDKWZ/UTTyY7moDr2ZFH1K+5HNhoOFTrWmHGD s3NttemadTq59unrlkJKlaB2CNj1y6zf5DO9ftoXmywWNtMzNllL9QyfebJibBhzOSIn yXMQ== X-Gm-Message-State: AFqh2kqo8zL/UIa46AgZ8a8dtfMoa+V4crArzdDOT5lZkZbIDjz3c9D+ vD+/SBiRTZF2o/awiZP7HIJpj5EULpnM4COrFVVvHjuaNEcW MIME-Version: 1.0 X-Received: by 2002:a92:4442:0:b0:303:c52:274a with SMTP id a2-20020a924442000000b003030c52274amr90595ilm.171.1671610481055; Wed, 21 Dec 2022 00:14:41 -0800 (PST) Date: Wed, 21 Dec 2022 00:14:41 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000ed1df405f05224aa@google.com> Subject: [syzbot] [ntfs3?] possible deadlock in ntfs_set_state From: syzbot To: almaz.alexandrovich@paragon-software.com, bvanassche@acm.org, hch@lst.de, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, martin.petersen@oracle.com, nathan@kernel.org, ndesaulniers@google.com, ntfs3@lists.linux.dev, syzkaller-bugs@googlegroups.com, trix@redhat.com, viro@zeniv.linux.org.uk, yanaijie@huawei.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,FROM_LOCAL_HEX, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following issue on: HEAD commit: aeba12b26c79 Merge tag 'nfsd-6.2-1' of git://git.kernel.or.. git tree: upstream console+strace: https://syzkaller.appspot.com/x/log.txt?x=1655e690480000 kernel config: https://syzkaller.appspot.com/x/.config?x=4d348fc1e0f483c9 dashboard link: https://syzkaller.appspot.com/bug?extid=f91c29a5d5a01ada051a compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15332c9b880000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16647dc8480000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/661fe33f851b/disk-aeba12b2.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/c938bdcf3ad0/vmlinux-aeba12b2.xz kernel image: https://storage.googleapis.com/syzbot-assets/e7f738de30b7/bzImage-aeba12b2.xz mounted in repro: https://storage.googleapis.com/syzbot-assets/b4ed1012076c/mount_0.gz The issue was bisected to: commit d9a434fa0c12ed5f7afe1e9dd30003ab5d059b85 Author: Jason Yan Date: Wed Jul 20 02:51:20 2022 +0000 scsi: core: Fix warning in scsi_alloc_sgtables() bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14a1c453880000 final oops: https://syzkaller.appspot.com/x/report.txt?x=16a1c453880000 console output: https://syzkaller.appspot.com/x/log.txt?x=12a1c453880000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+f91c29a5d5a01ada051a@syzkaller.appspotmail.com Fixes: d9a434fa0c12 ("scsi: core: Fix warning in scsi_alloc_sgtables()") ntfs3: loop0: ino=5, ntfs_iget5 ============================================ WARNING: possible recursive locking detected 6.1.0-syzkaller-13781-gaeba12b26c79 #0 Not tainted -------------------------------------------- kworker/u4:6/3799 is trying to acquire lock: ffff888076a40100 (&ni->ni_lock){+.+.}-{3:3}, at: ntfs_set_state+0x1da/0x680 fs/ntfs3/fsntfs.c:920 but task is already holding lock: ffff888076a46fa0 (&ni->ni_lock){+.+.}-{3:3}, at: ni_trylock fs/ntfs3/ntfs_fs.h:1123 [inline] ffff888076a46fa0 (&ni->ni_lock){+.+.}-{3:3}, at: ni_write_inode+0x14d/0x11e0 fs/ntfs3/frecord.c:3226 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ni->ni_lock); lock(&ni->ni_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by kworker/u4:6/3799: #0: ffff88814514c138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x7f2/0xdb0 #1: ffffc9000ecc7d00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x831/0xdb0 kernel/workqueue.c:2264 #2: ffff888076a46fa0 (&ni->ni_lock){+.+.}-{3:3}, at: ni_trylock fs/ntfs3/ntfs_fs.h:1123 [inline] #2: ffff888076a46fa0 (&ni->ni_lock){+.+.}-{3:3}, at: ni_write_inode+0x14d/0x11e0 fs/ntfs3/frecord.c:3226 stack backtrace: CPU: 0 PID: 3799 Comm: kworker/u4:6 Not tainted 6.1.0-syzkaller-13781-gaeba12b26c79 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x290 lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2990 [inline] check_deadlock kernel/locking/lockdep.c:3033 [inline] validate_chain+0x4843/0x6ae0 kernel/locking/lockdep.c:3818 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5055 lock_acquire+0x182/0x3c0 kernel/locking/lockdep.c:5668 __mutex_lock_common+0x1bd/0x26e0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 ntfs_set_state+0x1da/0x680 fs/ntfs3/fsntfs.c:920 ntfs_iget5+0x34c/0x36f0 fs/ntfs3/inode.c:504 ni_update_parent+0x7ea/0xc60 fs/ntfs3/frecord.c:3182 ni_write_inode+0xe30/0x11e0 fs/ntfs3/frecord.c:3277 write_inode fs/fs-writeback.c:1451 [inline] __writeback_single_inode+0x4d6/0x670 fs/fs-writeback.c:1663 writeback_sb_inodes+0x812/0x1050 fs/fs-writeback.c:1889 wb_writeback+0x41f/0x7b0 fs/fs-writeback.c:2063 wb_do_writeback fs/fs-writeback.c:2206 [inline] wb_workfn+0x3cb/0xef0 fs/fs-writeback.c:2246 process_one_work+0x877/0xdb0 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. For information about bisection process see: https://goo.gl/tpsmEJ#bisection syzbot can test patches for this issue, for details see: https://goo.gl/tpsmEJ#testing-patches