| Title | Replies (including bot) | Last reply |
|---|---|---|
| [syzbot] possible deadlock in pppoe_device_event | 0 (1) | 2023/01/28 01:13 |
syzbot |
sign-in | mailing list | source | docs |
| Title | Replies (including bot) | Last reply |
|---|---|---|
| [syzbot] possible deadlock in pppoe_device_event | 0 (1) | 2023/01/28 01:13 |
======================================================
WARNING: possible circular locking dependency detected
6.2.0-rc6-syzkaller-00273-g837c07cf68fe #0 Not tainted
------------------------------------------------------
syz-executor.3/23882 is trying to acquire lock:
ffff88802f328130 (sk_lock-AF_PPPOX){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1725 [inline]
ffff88802f328130 (sk_lock-AF_PPPOX){+.+.}-{0:0}, at: pppoe_flush_dev drivers/net/ppp/pppoe.c:304 [inline]
ffff88802f328130 (sk_lock-AF_PPPOX){+.+.}-{0:0}, at: pppoe_device_event+0x329/0x980 drivers/net/ppp/pppoe.c:346
but task is already holding lock:
ffffffff8e0b5750 (dev_addr_sem){++++}-{3:3}, at: dev_set_mac_address_user+0x23/0x50 net/core/dev.c:8804
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #3 (dev_addr_sem){++++}-{3:3}:
down_write+0x94/0x220 kernel/locking/rwsem.c:1562
dev_set_mac_address_user+0x23/0x50 net/core/dev.c:8804
do_setlink+0x18c4/0x3bb0 net/core/rtnetlink.c:2775
__rtnl_newlink+0xd69/0x1840 net/core/rtnetlink.c:3590
rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3637
rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6141
netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574
netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1942
sock_sendmsg_nosec net/socket.c:714 [inline]
sock_sendmsg+0xd3/0x120 net/socket.c:734
__sys_sendto+0x23a/0x340 net/socket.c:2117
__do_sys_sendto net/socket.c:2129 [inline]
__se_sys_sendto net/socket.c:2125 [inline]
__x64_sys_sendto+0xe1/0x1b0 net/socket.c:2125
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
-> #2 (rtnl_mutex){+.+.}-{3:3}:
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x12f/0x1360 kernel/locking/mutex.c:747
prb_calc_retire_blk_tmo+0x7d/0x1e0 net/packet/af_packet.c:576
init_prb_bdqc net/packet/af_packet.c:634 [inline]
packet_set_ring+0x158f/0x1980 net/packet/af_packet.c:4439
packet_setsockopt+0x1a32/0x3a30 net/packet/af_packet.c:3808
__sys_setsockopt+0x2c6/0x5b0 net/socket.c:2246
__do_sys_setsockopt net/socket.c:2257 [inline]
__se_sys_setsockopt net/socket.c:2254 [inline]
__x64_sys_setsockopt+0xbe/0x160 net/socket.c:2254
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
-> #1 (sk_lock-AF_PACKET){+.+.}-{0:0}:
lock_sock_nested+0x3a/0xf0 net/core/sock.c:3470
lock_sock include/net/sock.h:1725 [inline]
l2tp_tunnel_register+0x2aa/0x11e0 net/l2tp/l2tp_core.c:1483
pppol2tp_connect+0xcdc/0x1a10 net/l2tp/l2tp_ppp.c:723
__sys_connect_file+0x153/0x1a0 net/socket.c:1976
__sys_connect+0x165/0x1a0 net/socket.c:1993
__do_sys_connect net/socket.c:2003 [inline]
__se_sys_connect net/socket.c:2000 [inline]
__x64_sys_connect+0x73/0xb0 net/socket.c:2000
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
-> #0 (sk_lock-AF_PPPOX){+.+.}-{0:0}:
check_prev_add kernel/locking/lockdep.c:3097 [inline]
check_prevs_add kernel/locking/lockdep.c:3216 [inline]
validate_chain kernel/locking/lockdep.c:3831 [inline]
__lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5055
lock_acquire kernel/locking/lockdep.c:5668 [inline]
lock_acquire+0x1e3/0x630 kernel/locking/lockdep.c:5633
lock_sock_nested+0x3a/0xf0 net/core/sock.c:3470
lock_sock include/net/sock.h:1725 [inline]
pppoe_flush_dev drivers/net/ppp/pppoe.c:304 [inline]
pppoe_device_event+0x329/0x980 drivers/net/ppp/pppoe.c:346
notifier_call_chain+0xb5/0x200 kernel/notifier.c:87
call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1944
call_netdevice_notifiers_extack net/core/dev.c:1982 [inline]
call_netdevice_notifiers net/core/dev.c:1996 [inline]
dev_set_mac_address+0x2d7/0x3e0 net/core/dev.c:8791
bond_set_mac_address+0x359/0x7a0 drivers/net/bonding/bond_main.c:4743
dev_set_mac_address+0x26b/0x3e0 net/core/dev.c:8787
dev_set_mac_address_user+0x31/0x50 net/core/dev.c:8805
do_setlink+0x18c4/0x3bb0 net/core/rtnetlink.c:2775
__rtnl_newlink+0xd69/0x1840 net/core/rtnetlink.c:3590
rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3637
rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6141
netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574
netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1942
sock_sendmsg_nosec net/socket.c:714 [inline]
sock_sendmsg+0xd3/0x120 net/socket.c:734
____sys_sendmsg+0x712/0x8c0 net/socket.c:2476
___sys_sendmsg+0x110/0x1b0 net/socket.c:2530
__sys_sendmsg+0xf7/0x1c0 net/socket.c:2559
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
other info that might help us debug this:
Chain exists of:
sk_lock-AF_PPPOX --> rtnl_mutex --> dev_addr_sem
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(dev_addr_sem);
lock(rtnl_mutex);
lock(dev_addr_sem);
lock(sk_lock-AF_PPPOX);
*** DEADLOCK ***
2 locks held by syz-executor.3/23882:
#0: ffffffff8e0c2528 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:75 [inline]
#0: ffffffff8e0c2528 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x3e9/0xca0 net/core/rtnetlink.c:6138
#1: ffffffff8e0b5750 (dev_addr_sem){++++}-{3:3}, at: dev_set_mac_address_user+0x23/0x50 net/core/dev.c:8804
stack backtrace:
CPU: 0 PID: 23882 Comm: syz-executor.3 Not tainted 6.2.0-rc6-syzkaller-00273-g837c07cf68fe #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106
check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2177
check_prev_add kernel/locking/lockdep.c:3097 [inline]
check_prevs_add kernel/locking/lockdep.c:3216 [inline]
validate_chain kernel/locking/lockdep.c:3831 [inline]
__lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5055
lock_acquire kernel/locking/lockdep.c:5668 [inline]
lock_acquire+0x1e3/0x630 kernel/locking/lockdep.c:5633
lock_sock_nested+0x3a/0xf0 net/core/sock.c:3470
lock_sock include/net/sock.h:1725 [inline]
pppoe_flush_dev drivers/net/ppp/pppoe.c:304 [inline]
pppoe_device_event+0x329/0x980 drivers/net/ppp/pppoe.c:346
notifier_call_chain+0xb5/0x200 kernel/notifier.c:87
call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1944
call_netdevice_notifiers_extack net/core/dev.c:1982 [inline]
call_netdevice_notifiers net/core/dev.c:1996 [inline]
dev_set_mac_address+0x2d7/0x3e0 net/core/dev.c:8791
bond_set_mac_address+0x359/0x7a0 drivers/net/bonding/bond_main.c:4743
dev_set_mac_address+0x26b/0x3e0 net/core/dev.c:8787
dev_set_mac_address_user+0x31/0x50 net/core/dev.c:8805
do_setlink+0x18c4/0x3bb0 net/core/rtnetlink.c:2775
__rtnl_newlink+0xd69/0x1840 net/core/rtnetlink.c:3590
rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3637
rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6141
netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574
netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1942
sock_sendmsg_nosec net/socket.c:714 [inline]
sock_sendmsg+0xd3/0x120 net/socket.c:734
____sys_sendmsg+0x712/0x8c0 net/socket.c:2476
___sys_sendmsg+0x110/0x1b0 net/socket.c:2530
__sys_sendmsg+0xf7/0x1c0 net/socket.c:2559
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f9b0008c0c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f9b00e47168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f9b001abf80 RCX: 00007f9b0008c0c9
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000004
RBP: 00007f9b000e7ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9b002cfb1f R14: 00007f9b00e47300 R15: 0000000000022000
</TASK>
device bond0 entered promiscuous mode
device bond_slave_0 entered promiscuous mode
device bond_slave_1 entered promiscuous mode
| Time | Kernel | Commit | Syzkaller | Config | Log | Report | Syz repro | C repro | VM info | Assets (help?) | Manager | Title |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2023/02/05 20:07 | upstream | 837c07cf68fe | be607b78 | .config | console log | report | info | ci-upstream-kasan-gce | possible deadlock in pppoe_device_event | |||
| 2023/01/24 01:11 | upstream | 7bf70dbb1882 | 9dfcf09c | .config | console log | report | info | ci-upstream-kasan-gce | possible deadlock in pppoe_device_event | |||
| 2023/02/17 17:51 | upstream | ec35307e18ba | 3e7039f4 | .config | console log | report | info | ci-upstream-kasan-gce-386 | possible deadlock in pppoe_device_event | |||
| 2023/02/15 03:19 | upstream | e1c04510f521 | 1d6b4af7 | .config | console log | report | info | ci-upstream-kasan-gce-386 | possible deadlock in pppoe_device_event |