Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4229124pxb; Tue, 10 Nov 2020 10:58:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBOP1dk5ihTSOhja/VGZHSC95+uoyQxP2oxidJ/lrRfU2LvP1rBgh/GfjmM3Mbyz6/1tv9 X-Received: by 2002:a17:906:ae52:: with SMTP id lf18mr22742219ejb.9.1605034684587; Tue, 10 Nov 2020 10:58:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605034684; cv=none; d=google.com; s=arc-20160816; b=Pq8Np2ILaSCaZCICtfoJoArOeJ1KdgJK6lPhdy9ZoGzJQULqafbf+wCFiR1wtAsiFJ vUS6cAErJbN+DgZ8+8aRKUjQwqeFARnkhyQKnqRqAl+3BWSaOqCOQuhsB5zfYa12ZL8Y tqO7O77bj1Lzn3bHw7LSFP08O0hFGqTT+zBmkKv3+Q7kwClnY48DyZLnuJ0OkuN1vgNX 6PPFcs55ZPRVveZWvfa0Gh1z8EftMiUxtMUtlROxbFdWqo8FqdzuEPukEa9DVGHh9IWe ZIsKptHp+FPsIJnzu76LP17d3YicqFQl9Qhpxl9XnXpFSJ1XihLWF33COadYvEFr+0pB QlaA== 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=UBBVE26iMIwjToKruwBtc4rwDCIqTbom0jdq+SEqTcQ=; b=Mt7G14x+47tR6ETPPJZkI9oqNVPb44Zd+9Bd/P+7Ojm3nvSj9ctT90O0JtjtNDgNPR FC/Ma/26/GPOfyFiS8rBAEMUKfeqnGesKQAn7UH104sAIbrP++z5NLY2TFH3yS06lsLH afB5X8uQQq4R3er9s2Kebp+EvAazgZCEyGrMOxRvTdh1Bx5201qjDcBBTtlDKwcJ38TA 1FCZVBRGpRfPUvFb0w7pZEtfwmHqvy2tCRsjrk8W8js8UNnJ9Z7eDmgL2Wax+4S35tD4 q/dLgVc9SeSJx64POzseR7SL/UM3IXel0RDTg1VAL7TEN8UypOC8Yp9JwajwBwe/ic3P Mivg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o3si9691217ejm.578.2020.11.10.10.57.39; Tue, 10 Nov 2020 10:58:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1731407AbgKJSzU (ORCPT + 99 others); Tue, 10 Nov 2020 13:55:20 -0500 Received: from mail-io1-f70.google.com ([209.85.166.70]:53734 "EHLO mail-io1-f70.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730382AbgKJSzT (ORCPT ); Tue, 10 Nov 2020 13:55:19 -0500 Received: by mail-io1-f70.google.com with SMTP id c17so9109697iom.20 for ; Tue, 10 Nov 2020 10:55:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=UBBVE26iMIwjToKruwBtc4rwDCIqTbom0jdq+SEqTcQ=; b=XMIBSBnPQq3jNIbFsmwPvCz2uV4hyj7ZciDKtidzvZJGfwhGvCD5iZebT7/1Z739SH LSVKuu+mKNF/FCqPUPH+a7+IRxmluCnKzs+e0MkxRs7BCAbRWOm2ERGyNrSHC1D/PNGM wQpvnsQ6lP1/SOjgrcQckyNuvYmubIquAXYu6vuPqrNH3FCoBXnwDoJp4yUtEo1S+O9W b3FFitjLFAYlU5n6+nfUJDfpctlQmtTLQ3RN94tp0e13EYUIpOlkg/KuSIYIK+PnonBY aSdstAe/JFQ1LGITWqoOykmJa4f5RFYlhtajIdOQhP/Aht8rlQXgExBPFVHdNmGMNfmr HIEQ== X-Gm-Message-State: AOAM533TqRjFldQ7ZUZoXgXmT17DwCZWU13AVe1yVnVSYxxukNSTUpAb clBCUBOXskII2l4TK2tDj2akNiX2q5VoHkqswwLsBxGQoGk4 MIME-Version: 1.0 X-Received: by 2002:a02:6948:: with SMTP id e69mr16775986jac.6.1605034518502; Tue, 10 Nov 2020 10:55:18 -0800 (PST) Date: Tue, 10 Nov 2020 10:55:18 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <00000000000053e36405b3c538fc@google.com> Subject: KASAN: null-ptr-deref Write in start_transaction From: syzbot To: clm@fb.com, dsterba@suse.com, josef@toxicpanda.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, mingo@redhat.com, peterz@infradead.org, rostedt@goodmis.org, syzkaller-bugs@googlegroups.com, will@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following issue on: HEAD commit: 521b619a Merge tag 'linux-kselftest-kunit-fixes-5.10-rc3' .. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=173b8fb6500000 kernel config: https://syzkaller.appspot.com/x/.config?x=61033507391c77ff dashboard link: https://syzkaller.appspot.com/bug?extid=6700bca07dff187809c4 compiler: gcc (GCC) 10.1.0-syz 20200507 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14a07ab2500000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10fe69c6500000 The issue was bisected to: commit 4d004099a668c41522242aa146a38cc4eb59cb1e Author: Peter Zijlstra Date: Fri Oct 2 09:04:21 2020 +0000 lockdep: Fix lockdep recursion bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=100c0532500000 final oops: https://syzkaller.appspot.com/x/report.txt?x=120c0532500000 console output: https://syzkaller.appspot.com/x/log.txt?x=140c0532500000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+6700bca07dff187809c4@syzkaller.appspotmail.com Fixes: 4d004099a668 ("lockdep: Fix lockdep recursion") ================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: null-ptr-deref in atomic_fetch_add_relaxed include/asm-generic/atomic-instrumented.h:142 [inline] BUG: KASAN: null-ptr-deref in __refcount_add include/linux/refcount.h:193 [inline] BUG: KASAN: null-ptr-deref in __refcount_inc include/linux/refcount.h:250 [inline] BUG: KASAN: null-ptr-deref in refcount_inc include/linux/refcount.h:267 [inline] BUG: KASAN: null-ptr-deref in start_transaction+0x158/0x1170 fs/btrfs/transaction.c:541 Write of size 4 at addr 000000000000003a by task syz-executor154/8513 CPU: 1 PID: 8513 Comm: syz-executor154 Not tainted 5.10.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 __kasan_report mm/kasan/report.c:549 [inline] kasan_report.cold+0x5/0x37 mm/kasan/report.c:562 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_fetch_add_relaxed include/asm-generic/atomic-instrumented.h:142 [inline] __refcount_add include/linux/refcount.h:193 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] start_transaction+0x158/0x1170 fs/btrfs/transaction.c:541 flush_space+0x1c0/0xf60 fs/btrfs/space-info.c:685 priority_reclaim_metadata_space fs/btrfs/space-info.c:1154 [inline] handle_reserve_ticket fs/btrfs/space-info.c:1238 [inline] __reserve_bytes+0xd2c/0x1480 fs/btrfs/space-info.c:1403 btrfs_reserve_metadata_bytes+0x75/0x260 fs/btrfs/space-info.c:1429 btrfs_delalloc_reserve_metadata+0x261/0xb90 fs/btrfs/delalloc-space.c:332 btrfs_buffered_write.isra.0+0x445/0xf10 fs/btrfs/file.c:1703 __btrfs_direct_write fs/btrfs/file.c:1874 [inline] btrfs_file_write_iter+0xda6/0x16d0 fs/btrfs/file.c:2046 call_write_iter include/linux/fs.h:1887 [inline] do_iter_readv_writev+0x46f/0x740 fs/read_write.c:740 do_iter_write+0x188/0x670 fs/read_write.c:866 vfs_writev+0x1aa/0x2e0 fs/read_write.c:939 do_pwritev fs/read_write.c:1036 [inline] __do_sys_pwritev fs/read_write.c:1083 [inline] __se_sys_pwritev fs/read_write.c:1078 [inline] __x64_sys_pwritev+0x231/0x310 fs/read_write.c:1078 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x44d959 Code: 7d cb fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 4b cb fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f78b0d8bce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000128 RAX: ffffffffffffffda RBX: 00000000006e1c28 RCX: 000000000044d959 RDX: 0000000000000001 RSI: 00000000200014c0 RDI: 0000000000000003 RBP: 00000000006e1c20 R08: 0000000000000020 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 00000000006e1c2c R13: 00007ffefe638f4f R14: 00007f78b0d8c9c0 R15: 20c49ba5e353f7cf ================================================================== --- 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