From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f78.google.com (mail-io1-f78.google.com [209.85.166.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9028053363 for ; Thu, 26 Dec 2024 05:34:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.78 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735191262; cv=none; b=hlR1Klu2/NM/LUL7imQVUTVxlv8FAF3ZfRO/TLiYuLCLBp+vJYzdxvvYD732YvbxQAGYNB+by7ay9Q0OVbfg5uvm0OZlZTzG+iVhpWdnc9eRi4esRo12dScSDE6uWlEKARWG7vspM3GEdqYzV0MXWYsJ3YscN2rorlvi6WZdlgU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735191262; c=relaxed/simple; bh=3zN5L2d2pShtbUr7bIhYL/ZnPVC1ATHvv2uvV2gFUmc=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=JnJU9YZrjAsPEGm0Q3nRUHflo8/wW0xs4se5q7xozzt0kybFwUMJxCDlLQd+/AIoQ48Ltoh5vWI4aF15DYnjwz9PhBLVk3DFn6Xi2awaVpcl41QnIBqGIBUMAl4pJAE3ACq+l9Y/OD16jBjojpOcOw8pYEbZ98uWJCixPqgnS+U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-io1-f78.google.com with SMTP id ca18e2360f4ac-849d26dd331so228260339f.1 for ; Wed, 25 Dec 2024 21:34:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735191260; x=1735796060; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gNPeUisoQQAFO3VDEvaYZUuTZRGUT5moESeK0PP4yJU=; b=ZLxrnEaiTMgrw+AEcTjPvL6EbPD2ujPx++x5HuH4eHNzT5vMLyi+sf0iPcYQIcS0Ni CuIFLjlxb0E9fUS4lNA3ocIInG9ZEkQjLIbEqJ2paYHPtaewtvvRjtN5vuKYCdU12fLr 36Al+/FNdmLj846IsNmf6DDwfxLCQuBuE1oILU5cDhKec8rkgbUcb7B3PjmLeDm36ZVE qaLUaoB54x1dVEZtDF/xiDvW7LzaF/9yREXqWipGtY0I65PL46yM5SArcPU6aMO0Mrb0 vGIgGhQcxQl3jf4ABUxvCLnMYkVpaSi69GKwnroCG/kI1eXbwvUA82tnBG0vszs393dE 9QAA== X-Forwarded-Encrypted: i=1; AJvYcCVzzXnQ1i6Wg38m/cNXYbfm6zT8/p8r7h/ampHTccGtB7fL4swM57/4GNw+g9JF4JGn/jtcd1U=@vger.kernel.org X-Gm-Message-State: AOJu0YxdQDLOuetUeZT+J/Q4+FJHz6Z2qCUe02OYSzD1F8NKMq33Z2Vi 37CRZnIDpHVnR2ROF8ld4QHe8EjfGO8qULdXR2w1ElQBXbNEeT0egJGSoY1Nw3YTSKr82JPp3Ml ymAbuk9M9jQtPVYa8YwTnbrcK3brCIMxGT3fTrM8pYOFvv77uX4esbDM= X-Google-Smtp-Source: AGHT+IGioBFpENLsTTK5hhzuFbpuu0NtWfpraxEanwMyYeP/bhnmOEmhaHAxrOSvoseHcaOkAvcGGgvS1MrMQ7PRSbRO6JzpBUsF Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a92:d703:0:b0:3ab:502c:b523 with SMTP id e9e14a558f8ab-3c02ceb2239mr164734945ab.4.1735191259801; Wed, 25 Dec 2024 21:34:19 -0800 (PST) Date: Wed, 25 Dec 2024 21:34:19 -0800 In-Reply-To: <0000000000001abfb506221890b2@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <676ceadb.050a0220.226966.007a.GAE@google.com> Subject: Re: [syzbot] [hams?] possible deadlock in nr_rt_device_down (3) From: syzbot To: davem@davemloft.net, edumazet@google.com, horms@kernel.org, kuba@kernel.org, linux-hams@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, ralf@linux-mips.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" syzbot has found a reproducer for the following issue on: HEAD commit: 9b2ffa6148b1 Merge tag 'mtd/fixes-for-6.13-rc5' of git://g.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=11dac0b0580000 kernel config: https://syzkaller.appspot.com/x/.config?x=4c4096b0d467a682 dashboard link: https://syzkaller.appspot.com/bug?extid=ccdfb85a561b973219c7 compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14869adf980000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/dbe249d9f678/disk-9b2ffa61.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/ef6ad79e83bf/vmlinux-9b2ffa61.xz kernel image: https://storage.googleapis.com/syzbot-assets/4d67490d157d/bzImage-9b2ffa61.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+ccdfb85a561b973219c7@syzkaller.appspotmail.com ====================================================== WARNING: possible circular locking dependency detected 6.13.0-rc4-syzkaller-00012-g9b2ffa6148b1 #0 Not tainted ------------------------------------------------------ syz.3.1344/8689 is trying to acquire lock: ffffffff8fdf2318 (nr_node_list_lock){+...}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffffffff8fdf2318 (nr_node_list_lock){+...}-{3:3}, at: nr_rt_device_down+0xb5/0x7b0 net/netrom/nr_route.c:517 but task is already holding lock: ffffffff8fdf22b8 (nr_neigh_list_lock){+...}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffffffff8fdf22b8 (nr_neigh_list_lock){+...}-{3:3}, at: nr_rt_device_down+0x28/0x7b0 net/netrom/nr_route.c:514 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (nr_neigh_list_lock){+...}-{3:3}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x35/0x50 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:356 [inline] nr_remove_neigh net/netrom/nr_route.c:307 [inline] nr_dec_obs net/netrom/nr_route.c:472 [inline] nr_rt_ioctl+0x398/0xfb0 net/netrom/nr_route.c:692 sock_do_ioctl+0x158/0x460 net/socket.c:1209 sock_ioctl+0x626/0x8e0 net/socket.c:1328 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&nr_node->node_lock){+...}-{3:3}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x35/0x50 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:356 [inline] nr_node_lock include/net/netrom.h:152 [inline] nr_dec_obs net/netrom/nr_route.c:459 [inline] nr_rt_ioctl+0x192/0xfb0 net/netrom/nr_route.c:692 sock_do_ioctl+0x158/0x460 net/socket.c:1209 sock_ioctl+0x626/0x8e0 net/socket.c:1328 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (nr_node_list_lock){+...}-{3:3}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x35/0x50 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:356 [inline] nr_rt_device_down+0xb5/0x7b0 net/netrom/nr_route.c:517 nr_device_event+0x134/0x150 net/netrom/af_netrom.c:126 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 __dev_notify_flags+0x207/0x400 dev_change_flags+0xf0/0x1a0 net/core/dev.c:9026 dev_ifsioc+0x7c8/0xe70 net/core/dev_ioctl.c:526 dev_ioctl+0x719/0x1340 net/core/dev_ioctl.c:783 sock_do_ioctl+0x240/0x460 net/socket.c:1223 sock_ioctl+0x626/0x8e0 net/socket.c:1328 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: nr_node_list_lock --> &nr_node->node_lock --> nr_neigh_list_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(nr_neigh_list_lock); lock(&nr_node->node_lock); lock(nr_neigh_list_lock); lock(nr_node_list_lock); *** DEADLOCK *** 2 locks held by syz.3.1344/8689: #0: ffffffff8fca0788 (rtnl_mutex){+.+.}-{4:4}, at: dev_ioctl+0x706/0x1340 net/core/dev_ioctl.c:782 #1: ffffffff8fdf22b8 (nr_neigh_list_lock){+...}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #1: ffffffff8fdf22b8 (nr_neigh_list_lock){+...}-{3:3}, at: nr_rt_device_down+0x28/0x7b0 net/netrom/nr_route.c:514 stack backtrace: CPU: 1 UID: 0 PID: 8689 Comm: syz.3.1344 Not tainted 6.13.0-rc4-syzkaller-00012-g9b2ffa6148b1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2074 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x35/0x50 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:356 [inline] nr_rt_device_down+0xb5/0x7b0 net/netrom/nr_route.c:517 nr_device_event+0x134/0x150 net/netrom/af_netrom.c:126 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 __dev_notify_flags+0x207/0x400 dev_change_flags+0xf0/0x1a0 net/core/dev.c:9026 dev_ifsioc+0x7c8/0xe70 net/core/dev_ioctl.c:526 dev_ioctl+0x719/0x1340 net/core/dev_ioctl.c:783 sock_do_ioctl+0x240/0x460 net/socket.c:1223 sock_ioctl+0x626/0x8e0 net/socket.c:1328 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f610cf85d29 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f610dd56038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f610d176160 RCX: 00007f610cf85d29 RDX: 0000000020000000 RSI: 0000000000008914 RDI: 0000000000000004 RBP: 00007f610d001aa8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f610d176160 R15: 00007ffe09d33fa8 --- If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing.