syzbot


possible deadlock in ppp_input

Status: upstream: reported on 2024/09/25 02:52
Reported-by: syzbot+d0a2a8574bdabda16521@syzkaller.appspotmail.com
First crash: 3d09h, last: 13h00m
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in ppp_input ppp 114 27m 11d 0/28 upstream: reported on 2024/09/17 11:45
linux-5.15 possible deadlock in ppp_input 9 7h50m 13d 0/3 upstream: reported on 2024/09/14 14:35

Sample crash report:
=====================================================
WARNING: SOFTIRQ-READ-safe -> SOFTIRQ-READ-unsafe lock order detected
6.1.111-syzkaller #0 Not tainted
-----------------------------------------------------
syz.2.269/5482 [HC0[0]:SC0[8]:HE1:SE0] is trying to acquire:
ffff8880268541e0 (&pch->downl){+.+.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff8880268541e0 (&pch->downl){+.+.}-{2:2}, at: ppp_connect_channel+0x190/0x640 drivers/net/ppp/ppp_generic.c:3485

and this task is already holding:
ffff8880663a0dd0
 (&ppp->rlock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
 (&ppp->rlock){+...}-{2:2}, at: ppp_connect_channel+0x181/0x640 drivers/net/ppp/ppp_generic.c:3484
which would create a new lock dependency:
 (&ppp->rlock){+...}-{2:2} -> (&pch->downl){+.+.}-{2:2}

but this new dependency connects a SOFTIRQ-READ-irq-safe lock:
 (&pch->upl){++.-}-{2:2}

... which became SOFTIRQ-READ-irq-safe at:
  lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
  __raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline]
  _raw_read_lock_bh+0x39/0x50 kernel/locking/spinlock.c:252
  ppp_input+0x3ca/0xa00 drivers/net/ppp/ppp_generic.c:2307
  ppp_async_process+0x7b/0x140 drivers/net/ppp/ppp_async.c:503
  tasklet_action_common+0x3cb/0x4a0
  handle_softirqs+0x2ee/0xa40 kernel/softirq.c:571
  run_ksoftirqd+0xc6/0x120 kernel/softirq.c:938
  smpboot_thread_fn+0x52c/0xa30 kernel/smpboot.c:164
  kthread+0x28d/0x320 kernel/kthread.c:376
  ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

to a SOFTIRQ-READ-irq-unsafe lock:
 (&pch->downl){+.+.}-{2:2}

... which became SOFTIRQ-READ-irq-unsafe at:
...
  lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
  __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
  _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
  spin_lock include/linux/spinlock.h:351 [inline]
  ppp_channel_bridge_input drivers/net/ppp/ppp_generic.c:2272 [inline]
  ppp_input+0x185/0xa00 drivers/net/ppp/ppp_generic.c:2304
  pppoe_rcv_core+0x112/0x300 drivers/net/ppp/pppoe.c:379
  sk_backlog_rcv include/net/sock.h:1117 [inline]
  __release_sock+0x198/0x4b0 net/core/sock.c:2936
  release_sock+0x5d/0x1c0 net/core/sock.c:3500
  pppoe_sendmsg+0xd1/0x740 drivers/net/ppp/pppoe.c:903
  sock_sendmsg_nosec net/socket.c:718 [inline]
  __sock_sendmsg net/socket.c:730 [inline]
  ____sys_sendmsg+0x5a5/0x8f0 net/socket.c:2514
  ___sys_sendmsg net/socket.c:2568 [inline]
  __sys_sendmmsg+0x3ab/0x730 net/socket.c:2654
  __do_sys_sendmmsg net/socket.c:2683 [inline]
  __se_sys_sendmmsg net/socket.c:2680 [inline]
  __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2680
  do_syscall_x64 arch/x86/entry/common.c:51 [inline]
  do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
  entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

Chain exists of:
  &pch->upl --> &ppp->rlock --> &pch->downl

 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&pch->downl);
                               local_irq_disable();
                               lock(&pch->upl);
                               lock(&ppp->rlock);
  <Interrupt>
    lock(&pch->upl);

 *** DEADLOCK ***

5 locks held by syz.2.269/5482:
 #0: ffffffff8dd6c148 (ppp_mutex){+.+.}-{3:3}, at: ppp_ioctl+0x10e/0x1c90 drivers/net/ppp/ppp_generic.c:727
 #1: ffff888058ac2cc0 (&pn->all_ppp_mutex){+.+.}-{3:3}, at: ppp_connect_channel+0x5e/0x640 drivers/net/ppp/ppp_generic.c:3474
 #2: ffff888026854248 (&pch->upl){++.-}-{2:2}, at: ppp_connect_channel+0x87/0x640 drivers/net/ppp/ppp_generic.c:3478
 #3: ffff8880663a0e10 (&ppp->wlock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
 #3: ffff8880663a0e10 (&ppp->wlock){+...}-{2:2}, at: ppp_connect_channel+0x170/0x640 drivers/net/ppp/ppp_generic.c:3484
 #4: ffff8880663a0dd0 (&ppp->rlock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
 #4: ffff8880663a0dd0 (&ppp->rlock){+...}-{2:2}, at: ppp_connect_channel+0x181/0x640 drivers/net/ppp/ppp_generic.c:3484

the dependencies between SOFTIRQ-READ-irq-safe lock and the holding lock:
  -> (&pch->upl){++.-}-{2:2} {
     HARDIRQ-ON-W at:
                        lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                        __raw_write_lock_bh include/linux/rwlock_api_smp.h:202 [inline]
                        _raw_write_lock_bh+0x31/0x40 kernel/locking/spinlock.c:334
                        ppp_disconnect_channel+0x2f/0x2d0 drivers/net/ppp/ppp_generic.c:3522
                        ppp_unregister_channel+0xb5/0x2f0 drivers/net/ppp/ppp_generic.c:2996
                        pppox_unbind_sock+0x58/0xa0 drivers/net/ppp/pppox.c:58
                        pptp_release+0x143/0x2f0 drivers/net/ppp/pptp.c:519
                        __sock_release net/socket.c:654 [inline]
                        sock_close+0xcd/0x230 net/socket.c:1400
                        __fput+0x3f6/0x8d0 fs/file_table.c:320
                        task_work_run+0x246/0x300 kernel/task_work.c:203
                        resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
                        exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177
                        exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
                        __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
                        syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
                        do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
                        entry_SYSCALL_64_after_hwframe+0x68/0xd2
     HARDIRQ-ON-R at:
                        lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                        __raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline]
                        _raw_read_lock_bh+0x39/0x50 kernel/locking/spinlock.c:252
                        ppp_channel_push+0x2c/0x220 drivers/net/ppp/ppp_generic.c:2186
                        ppp_write+0x294/0x3a0 drivers/net/ppp/ppp_generic.c:538
                        vfs_write+0x2d9/0xbc0 fs/read_write.c:582
                        ksys_write+0x19c/0x2c0 fs/read_write.c:637
                        do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                        do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
                        entry_SYSCALL_64_after_hwframe+0x68/0xd2
     IN-SOFTIRQ-R at:
                        lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                        __raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline]
                        _raw_read_lock_bh+0x39/0x50 kernel/locking/spinlock.c:252
                        ppp_input+0x3ca/0xa00 drivers/net/ppp/ppp_generic.c:2307
                        ppp_async_process+0x7b/0x140 drivers/net/ppp/ppp_async.c:503
                        tasklet_action_common+0x3cb/0x4a0
                        handle_softirqs+0x2ee/0xa40 kernel/softirq.c:571
                        run_ksoftirqd+0xc6/0x120 kernel/softirq.c:938
                        smpboot_thread_fn+0x52c/0xa30 kernel/smpboot.c:164
                        kthread+0x28d/0x320 kernel/kthread.c:376
                        ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
     INITIAL USE at:
                       lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                       __raw_write_lock_bh include/linux/rwlock_api_smp.h:202 [inline]
                       _raw_write_lock_bh+0x31/0x40 kernel/locking/spinlock.c:334
                       ppp_disconnect_channel+0x2f/0x2d0 drivers/net/ppp/ppp_generic.c:3522
                       ppp_unregister_channel+0xb5/0x2f0 drivers/net/ppp/ppp_generic.c:2996
                       pppox_unbind_sock+0x58/0xa0 drivers/net/ppp/pppox.c:58
                       pptp_release+0x143/0x2f0 drivers/net/ppp/pptp.c:519
                       __sock_release net/socket.c:654 [inline]
                       sock_close+0xcd/0x230 net/socket.c:1400
                       __fput+0x3f6/0x8d0 fs/file_table.c:320
                       task_work_run+0x246/0x300 kernel/task_work.c:203
                       resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
                       exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177
                       exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
                       __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
                       syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
                       do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
                       entry_SYSCALL_64_after_hwframe+0x68/0xd2
     INITIAL READ USE at:
                            lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                            __raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline]
                            _raw_read_lock_bh+0x39/0x50 kernel/locking/spinlock.c:252
                            ppp_channel_push+0x2c/0x220 drivers/net/ppp/ppp_generic.c:2186
                            ppp_write+0x294/0x3a0 drivers/net/ppp/ppp_generic.c:538
                            vfs_write+0x2d9/0xbc0 fs/read_write.c:582
                            ksys_write+0x19c/0x2c0 fs/read_write.c:637
                            do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                            do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
                            entry_SYSCALL_64_after_hwframe+0x68/0xd2
   }
   ... key      at: [<ffffffff976db060>] ppp_register_net_channel.__key.3+0x0/0x20
 -> (&ppp->wlock){+...}-{2:2} {
    HARDIRQ-ON-W at:
                      lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                      __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
                      _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
                      spin_lock_bh include/linux/spinlock.h:356 [inline]
                      ppp_get_stats64+0xbf/0x290 drivers/net/ppp/ppp_generic.c:1539
                      dev_get_stats+0xa7/0x490 net/core/dev.c:10471
                      rtnl_fill_stats+0x47/0x880 net/core/rtnetlink.c:1244
                      rtnl_fill_ifinfo+0x18aa/0x2090 net/core/rtnetlink.c:1825
                      rtmsg_ifinfo_build_skb+0xdc/0x180 net/core/rtnetlink.c:3938
                      rtmsg_ifinfo_event net/core/rtnetlink.c:3970 [inline]
                      rtmsg_ifinfo+0x71/0x120 net/core/rtnetlink.c:3979
                      register_netdevice+0x13dc/0x1720 net/core/dev.c:10146
                      ppp_unit_register drivers/net/ppp/ppp_generic.c:1217 [inline]
                      ppp_dev_configure+0x850/0xab0 drivers/net/ppp/ppp_generic.c:1273
                      ppp_create_interface drivers/net/ppp/ppp_generic.c:3348 [inline]
                      ppp_unattached_ioctl drivers/net/ppp/ppp_generic.c:1058 [inline]
                      ppp_ioctl+0x702/0x1c90 drivers/net/ppp/ppp_generic.c:731
                      vfs_ioctl fs/ioctl.c:51 [inline]
                      __do_sys_ioctl fs/ioctl.c:870 [inline]
                      __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
                      do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                      do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
                      entry_SYSCALL_64_after_hwframe+0x68/0xd2
    INITIAL USE at:
                     lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                     __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
                     _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
                     spin_lock_bh include/linux/spinlock.h:356 [inline]
                     ppp_get_stats64+0xbf/0x290 drivers/net/ppp/ppp_generic.c:1539
                     dev_get_stats+0xa7/0x490 net/core/dev.c:10471
                     rtnl_fill_stats+0x47/0x880 net/core/rtnetlink.c:1244
                     rtnl_fill_ifinfo+0x18aa/0x2090 net/core/rtnetlink.c:1825
                     rtmsg_ifinfo_build_skb+0xdc/0x180 net/core/rtnetlink.c:3938
                     rtmsg_ifinfo_event net/core/rtnetlink.c:3970 [inline]
                     rtmsg_ifinfo+0x71/0x120 net/core/rtnetlink.c:3979
                     register_netdevice+0x13dc/0x1720 net/core/dev.c:10146
                     ppp_unit_register drivers/net/ppp/ppp_generic.c:1217 [inline]
                     ppp_dev_configure+0x850/0xab0 drivers/net/ppp/ppp_generic.c:1273
                     ppp_create_interface drivers/net/ppp/ppp_generic.c:3348 [inline]
                     ppp_unattached_ioctl drivers/net/ppp/ppp_generic.c:1058 [inline]
                     ppp_ioctl+0x702/0x1c90 drivers/net/ppp/ppp_generic.c:731
                     vfs_ioctl fs/ioctl.c:51 [inline]
                     __do_sys_ioctl fs/ioctl.c:870 [inline]
                     __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
                     do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                     do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
                     entry_SYSCALL_64_after_hwframe+0x68/0xd2
  }
  ... key      at: [<ffffffff976db1a0>] ppp_dev_configure.__key.65+0x0/0x20
  ... acquired at:
   lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
   __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
   _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
   spin_lock_bh include/linux/spinlock.h:356 [inline]
   ppp_connect_channel+0x170/0x640 drivers/net/ppp/ppp_generic.c:3484
   ppp_ioctl+0xbe5/0x1c90 drivers/net/ppp/ppp_generic.c:759
   vfs_ioctl fs/ioctl.c:51 [inline]
   __do_sys_ioctl fs/ioctl.c:870 [inline]
   __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
   do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
   entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> (&ppp->rlock){+...}-{2:2} {
   HARDIRQ-ON-W at:
                    lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                    __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
                    _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
                    spin_lock_bh include/linux/spinlock.h:356 [inline]
                    ppp_get_stats64+0x2f/0x290 drivers/net/ppp/ppp_generic.c:1534
                    dev_get_stats+0xa7/0x490 net/core/dev.c:10471
                    rtnl_fill_stats+0x47/0x880 net/core/rtnetlink.c:1244
                    rtnl_fill_ifinfo+0x18aa/0x2090 net/core/rtnetlink.c:1825
                    rtmsg_ifinfo_build_skb+0xdc/0x180 net/core/rtnetlink.c:3938
                    rtmsg_ifinfo_event net/core/rtnetlink.c:3970 [inline]
                    rtmsg_ifinfo+0x71/0x120 net/core/rtnetlink.c:3979
                    register_netdevice+0x13dc/0x1720 net/core/dev.c:10146
                    ppp_unit_register drivers/net/ppp/ppp_generic.c:1217 [inline]
                    ppp_dev_configure+0x850/0xab0 drivers/net/ppp/ppp_generic.c:1273
                    ppp_create_interface drivers/net/ppp/ppp_generic.c:3348 [inline]
                    ppp_unattached_ioctl drivers/net/ppp/ppp_generic.c:1058 [inline]
                    ppp_ioctl+0x702/0x1c90 drivers/net/ppp/ppp_generic.c:731
                    vfs_ioctl fs/ioctl.c:51 [inline]
                    __do_sys_ioctl fs/ioctl.c:870 [inline]
                    __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
                    do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                    do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
                    entry_SYSCALL_64_after_hwframe+0x68/0xd2
   INITIAL USE at:
                   lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                   __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
                   _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
                   spin_lock_bh include/linux/spinlock.h:356 [inline]
                   ppp_get_stats64+0x2f/0x290 drivers/net/ppp/ppp_generic.c:1534
                   dev_get_stats+0xa7/0x490 net/core/dev.c:10471
                   rtnl_fill_stats+0x47/0x880 net/core/rtnetlink.c:1244
                   rtnl_fill_ifinfo+0x18aa/0x2090 net/core/rtnetlink.c:1825
                   rtmsg_ifinfo_build_skb+0xdc/0x180 net/core/rtnetlink.c:3938
                   rtmsg_ifinfo_event net/core/rtnetlink.c:3970 [inline]
                   rtmsg_ifinfo+0x71/0x120 net/core/rtnetlink.c:3979
                   register_netdevice+0x13dc/0x1720 net/core/dev.c:10146
                   ppp_unit_register drivers/net/ppp/ppp_generic.c:1217 [inline]
                   ppp_dev_configure+0x850/0xab0 drivers/net/ppp/ppp_generic.c:1273
                   ppp_create_interface drivers/net/ppp/ppp_generic.c:3348 [inline]
                   ppp_unattached_ioctl drivers/net/ppp/ppp_generic.c:1058 [inline]
                   ppp_ioctl+0x702/0x1c90 drivers/net/ppp/ppp_generic.c:731
                   vfs_ioctl fs/ioctl.c:51 [inline]
                   __do_sys_ioctl fs/ioctl.c:870 [inline]
                   __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
                   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                   do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
                   entry_SYSCALL_64_after_hwframe+0x68/0xd2
 }
 ... key      at: [<ffffffff976db180>] ppp_dev_configure.__key+0x0/0x20
 ... acquired at:
   lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
   __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
   _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
   spin_lock_bh include/linux/spinlock.h:356 [inline]
   ppp_connect_channel+0x181/0x640 drivers/net/ppp/ppp_generic.c:3484
   ppp_ioctl+0xbe5/0x1c90 drivers/net/ppp/ppp_generic.c:759
   vfs_ioctl fs/ioctl.c:51 [inline]
   __do_sys_ioctl fs/ioctl.c:870 [inline]
   __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
   do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
   entry_SYSCALL_64_after_hwframe+0x68/0xd2


the dependencies between the lock to be acquired
 and SOFTIRQ-READ-irq-unsafe lock:
-> (&pch->downl){+.+.}-{2:2} {
   HARDIRQ-ON-W at:
                    lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                    __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
                    _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
                    spin_lock_bh include/linux/spinlock.h:356 [inline]
                    ppp_unregister_channel+0x78/0x2f0 drivers/net/ppp/ppp_generic.c:2992
                    pppox_unbind_sock+0x58/0xa0 drivers/net/ppp/pppox.c:58
                    pptp_release+0x143/0x2f0 drivers/net/ppp/pptp.c:519
                    __sock_release net/socket.c:654 [inline]
                    sock_close+0xcd/0x230 net/socket.c:1400
                    __fput+0x3f6/0x8d0 fs/file_table.c:320
                    task_work_run+0x246/0x300 kernel/task_work.c:203
                    resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
                    exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177
                    exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
                    __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
                    syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
                    do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
                    entry_SYSCALL_64_after_hwframe+0x68/0xd2
   SOFTIRQ-ON-W at:
                    lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                    __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
                    _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
                    spin_lock include/linux/spinlock.h:351 [inline]
                    ppp_channel_bridge_input drivers/net/ppp/ppp_generic.c:2272 [inline]
                    ppp_input+0x185/0xa00 drivers/net/ppp/ppp_generic.c:2304
                    pppoe_rcv_core+0x112/0x300 drivers/net/ppp/pppoe.c:379
                    sk_backlog_rcv include/net/sock.h:1117 [inline]
                    __release_sock+0x198/0x4b0 net/core/sock.c:2936
                    release_sock+0x5d/0x1c0 net/core/sock.c:3500
                    pppoe_sendmsg+0xd1/0x740 drivers/net/ppp/pppoe.c:903
                    sock_sendmsg_nosec net/socket.c:718 [inline]
                    __sock_sendmsg net/socket.c:730 [inline]
                    ____sys_sendmsg+0x5a5/0x8f0 net/socket.c:2514
                    ___sys_sendmsg net/socket.c:2568 [inline]
                    __sys_sendmmsg+0x3ab/0x730 net/socket.c:2654
                    __do_sys_sendmmsg net/socket.c:2683 [inline]
                    __se_sys_sendmmsg net/socket.c:2680 [inline]
                    __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2680
                    do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                    do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
                    entry_SYSCALL_64_after_hwframe+0x68/0xd2
   INITIAL USE at:
                   lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                   __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
                   _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
                   spin_lock_bh include/linux/spinlock.h:356 [inline]
                   ppp_unregister_channel+0x78/0x2f0 drivers/net/ppp/ppp_generic.c:2992
                   pppox_unbind_sock+0x58/0xa0 drivers/net/ppp/pppox.c:58
                   pptp_release+0x143/0x2f0 drivers/net/ppp/pptp.c:519
                   __sock_release net/socket.c:654 [inline]
                   sock_close+0xcd/0x230 net/socket.c:1400
                   __fput+0x3f6/0x8d0 fs/file_table.c:320
                   task_work_run+0x246/0x300 kernel/task_work.c:203
                   resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
                   exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177
                   exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
                   __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
                   syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
                   do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
                   entry_SYSCALL_64_after_hwframe+0x68/0xd2
 }
 ... key      at: [<ffffffff976db040>] ppp_register_net_channel.__key.1+0x0/0x20
 ... acquired at:
   lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
   __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
   _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
   spin_lock_bh include/linux/spinlock.h:356 [inline]
   ppp_connect_channel+0x190/0x640 drivers/net/ppp/ppp_generic.c:3485
   ppp_ioctl+0xbe5/0x1c90 drivers/net/ppp/ppp_generic.c:759
   vfs_ioctl fs/ioctl.c:51 [inline]
   __do_sys_ioctl fs/ioctl.c:870 [inline]
   __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
   do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
   entry_SYSCALL_64_after_hwframe+0x68/0xd2


stack backtrace:
CPU: 0 PID: 5482 Comm: syz.2.269 Not tainted 6.1.111-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_bad_irq_dependency kernel/locking/lockdep.c:2604 [inline]
 check_irq_usage kernel/locking/lockdep.c:2843 [inline]
 check_prev_add kernel/locking/lockdep.c:3094 [inline]
 check_prevs_add kernel/locking/lockdep.c:3209 [inline]
 validate_chain+0x4d16/0x5950 kernel/locking/lockdep.c:3825
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
 _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
 spin_lock_bh include/linux/spinlock.h:356 [inline]
 ppp_connect_channel+0x190/0x640 drivers/net/ppp/ppp_generic.c:3485
 ppp_ioctl+0xbe5/0x1c90 drivers/net/ppp/ppp_generic.c:759
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f117197dff9
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:00007f11726f3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f1171b35f80 RCX: 00007f117197dff9
RDX: 0000000020000300 RSI: 000000004004743a RDI: 0000000000000005
RBP: 00007f11719f0296 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f1171b35f80 R15: 00007ffd1700a5b8
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/27 23:12 linux-6.1.y e526b12bf916 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in ppp_input
2024/09/25 02:51 linux-6.1.y e526b12bf916 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in ppp_input
* Struck through repros no longer work on HEAD.