BUG: sleeping function called from invalid context in do_con_write

10 views
Skip to first unread message

syzbot

unread,
Feb 25, 2021, 5:19:23 AM2/25/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 2d19be46 Linux 4.19.177
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15a5bf5ad00000
kernel config: https://syzkaller.appspot.com/x/.config?x=6a1a8f0ba6627eb7
dashboard link: https://syzkaller.appspot.com/bug?extid=6d39cd79af749d6c718d

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6d39cd...@syzkaller.appspotmail.com

BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 18903, name: syz-executor.5
3 locks held by syz-executor.5/18903:
#0: 000000005af27a63 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 000000008f01c68e (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 000000008f01c68e (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 000000005af27a63 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 402
hardirqs last enabled at (401): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (402): [<ffffffff88164b05>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (402): [<ffffffff88164b05>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (48): [<ffffffff86def864>] raw_hash_sk+0x1c4/0x250 net/ipv4/raw.c:107
softirqs last disabled at (46): [<ffffffff86def74b>] raw_hash_sk+0xab/0x250 net/ipv4/raw.c:104
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 0 PID: 18903 Comm: syz-executor.5 Not tainted 4.19.177-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x465ef9
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007faccf5db188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465ef9
RDX: 0000000000000001 RSI: 000000000000540a RDI: 0000000000000005
RBP: 00000000004bcd1c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffeb2fd8b3f R14: 00007faccf5db300 R15: 0000000000022000
capability: warning: `syz-executor.2' uses 32-bit capabilities (legacy support in use)
F2FS-fs (loop5): Magic Mismatch, valid(0xf2f52010) - read(0x5377e300)
F2FS-fs (loop5): Can't find valid F2FS filesystem in 1th superblock
EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue
F2FS-fs (loop5): Magic Mismatch, valid(0xf2f52010) - read(0x0)
F2FS-fs (loop5): Can't find valid F2FS filesystem in 2th superblock
F2FS-fs (loop5): Magic Mismatch, valid(0xf2f52010) - read(0x5377e300)
F2FS-fs (loop5): Can't find valid F2FS filesystem in 1th superblock
F2FS-fs (loop5): Magic Mismatch, valid(0xf2f52010) - read(0x0)
F2FS-fs (loop5): Can't find valid F2FS filesystem in 2th superblock
F2FS-fs (loop5): Magic Mismatch, valid(0xf2f52010) - read(0x5377e300)
F2FS-fs (loop5): Can't find valid F2FS filesystem in 1th superblock
IPVS: Unknown mcast interface: virt_wifi0
tmpfs: No value for mount option 'dont_measure'
tmpfs: No value for mount option 'dont_measure'
IPVS: set_ctl: invalid protocol: 1 0.0.0.0:20003
IPVS: set_ctl: invalid protocol: 1 0.0.0.0:20003


---
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Mar 19, 2021, 2:43:19 AM3/19/21
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: ac3af4be Linux 4.19.181
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1304d5ecd00000
kernel config: https://syzkaller.appspot.com/x/.config?x=4f09908a6dd5ae5f
dashboard link: https://syzkaller.appspot.com/bug?extid=6d39cd79af749d6c718d
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1718a69ed00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6d39cd...@syzkaller.appspotmail.com

IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 9728, name: syz-executor.2
3 locks held by syz-executor.2/9728:
#0: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 922
hardirqs last enabled at (921): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (922): [<ffffffff8816a795>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (922): [<ffffffff8816a795>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (736): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
softirqs last disabled at (734): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 0 PID: 9728 Comm: syz-executor.2 Not tainted 4.19.181-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x466459
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f7444824188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459
RDX: 0000000000000001 RSI: 000000000000540a RDI: 000000000000000c
RBP: 00000000004bf9cb R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007fff517d879f R14: 00007f7444824300 R15: 0000000000022000
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 9957, name: syz-executor.1
3 locks held by syz-executor.1/9957:
#0: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 3632
hardirqs last enabled at (3631): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (3632): [<ffffffff8816a795>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (3632): [<ffffffff8816a795>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (3430): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
softirqs last disabled at (3428): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 0 PID: 9957 Comm: syz-executor.1 Tainted: G W 4.19.181-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x466459
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe730f55188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459
RDX: 0000000000000001 RSI: 000000000000540a RDI: 000000000000000c
RBP: 00000000004bf9cb R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffee5e9deaf R14: 00007fe730f55300 R15: 0000000000022000
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 10218, name: syz-executor.2
3 locks held by syz-executor.2/10218:
#0: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 1114
hardirqs last enabled at (1113): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (1114): [<ffffffff8816a795>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (1114): [<ffffffff8816a795>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (914): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
softirqs last disabled at (912): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 1 PID: 10218 Comm: syz-executor.2 Tainted: G W 4.19.181-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x466459
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f7444824188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459
RDX: 0000000000000001 RSI: 000000000000540a RDI: 000000000000000c
RBP: 00000000004bf9cb R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007fff517d879f R14: 00007f7444824300 R15: 0000000000022000
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 10471, name: syz-executor.0
3 locks held by syz-executor.0/10471:
#0: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 724
hardirqs last enabled at (723): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (724): [<ffffffff8816a795>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (724): [<ffffffff8816a795>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (116): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
softirqs last disabled at (114): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 1 PID: 10471 Comm: syz-executor.0 Tainted: G W 4.19.181-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x466459
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f94cb163188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459
RDX: 0000000000000001 RSI: 000000000000540a RDI: 000000000000000c
RBP: 00000000004bf9cb R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffc873ce89f R14: 00007f94cb163300 R15: 0000000000022000
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 10623, name: syz-executor.1
3 locks held by syz-executor.1/10623:
#0: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 852
hardirqs last enabled at (851): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (852): [<ffffffff8816a795>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (852): [<ffffffff8816a795>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (140): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
softirqs last disabled at (138): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 0 PID: 10623 Comm: syz-executor.1 Tainted: G W 4.19.181-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x466459
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe730f55188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459
RDX: 0000000000000001 RSI: 000000000000540a RDI: 000000000000000c
RBP: 00000000004bf9cb R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffee5e9deaf R14: 00007fe730f55300 R15: 0000000000022000
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 11096, name: syz-executor.3
3 locks held by syz-executor.3/11096:
#0: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 900
hardirqs last enabled at (899): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (900): [<ffffffff8816a795>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (900): [<ffffffff8816a795>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (128): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
softirqs last disabled at (126): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 1 PID: 11096 Comm: syz-executor.3 Tainted: G W 4.19.181-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x466459
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc3e0348188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459
RDX: 0000000000000001 RSI: 000000000000540a RDI: 000000000000000c
RBP: 00000000004bf9cb R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffd1c56220f R14: 00007fc3e0348300 R15: 0000000000022000
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 11548, name: syz-executor.1
3 locks held by syz-executor.1/11548:
#0: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 00000000bedf2fe2 (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000c9240938 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 1104
hardirqs last enabled at (1103): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (1104): [<ffffffff8816a795>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (1104): [<ffffffff8816a795>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (924): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
softirqs last disabled at (922): [<ffffffff869e8c16>] netlink_create+0x3b6/0x5d0 net/netlink/af_netlink.c:707
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 0 PID: 11548 Comm: syz-executor.1 Tainted: G W 4.19.181-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x466459
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe730f55188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459
RDX: 0000000000000001 RSI: 000000000000540a RDI: 000000000000000c
RBP: 00000000004bf9cb R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffee5e9deaf R14: 00007fe730f55300 R15: 0000000000022000

syzbot

unread,
Apr 20, 2021, 9:58:19 AM4/20/21
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 2965db2e Linux 4.19.188
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=11b0e341d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=66e717310a9b0f81
dashboard link: https://syzkaller.appspot.com/bug?extid=6d39cd79af749d6c718d
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1210f3f9d00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1644d561d00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6d39cd...@syzkaller.appspotmail.com

BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 8129, name: syz-executor325
3 locks held by syz-executor325/8129:
#0: 00000000e1476003 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 0000000001cf809f (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 0000000001cf809f (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000e1476003 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 418
hardirqs last enabled at (417): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (418): [<ffffffff8817df95>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (418): [<ffffffff8817df95>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (0): [<ffffffff81370c69>] copy_process.part.0+0x15b9/0x8260 kernel/fork.c:1855
softirqs last disabled at (0): [<0000000000000000>] (null)
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 1 PID: 8129 Comm: syz-executor325 Not tainted 4.19.188-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440009
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff0320fc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 0000000000440009
RDX: 0000000000000001 RSI: 000000000000540a RDI: 0000000000000005
RBP: 0000000000000000 R08: 000000000000000d R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000996e
R13: 00007fff0320fc7c R14: 00007fff0320fc90 R15: 00007fff0320fc80
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 8348, name: syz-executor325
3 locks held by syz-executor325/8348:
#0: 00000000e1476003 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 0000000001cf809f (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 0000000001cf809f (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000e1476003 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 430
hardirqs last enabled at (429): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (430): [<ffffffff8817df95>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (430): [<ffffffff8817df95>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (222): [<ffffffff88400678>] __do_softirq+0x678/0x980 kernel/softirq.c:318
softirqs last disabled at (195): [<ffffffff813926d5>] invoke_softirq kernel/softirq.c:372 [inline]
softirqs last disabled at (195): [<ffffffff813926d5>] irq_exit+0x215/0x260 kernel/softirq.c:412
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 1 PID: 8348 Comm: syz-executor325 Tainted: G W 4.19.188-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440009
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff0320fc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 0000000000440009
RDX: 0000000000000001 RSI: 000000000000540a RDI: 0000000000000005
RBP: 0000000000000000 R08: 000000000000000d R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000a15e
R13: 00007fff0320fc7c R14: 00007fff0320fc90 R15: 00007fff0320fc80
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 8578, name: syz-executor325
3 locks held by syz-executor325/8578:
#0: 00000000e1476003 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 0000000001cf809f (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 0000000001cf809f (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000e1476003 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 470
hardirqs last enabled at (469): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (470): [<ffffffff8817df95>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (470): [<ffffffff8817df95>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (324): [<ffffffff88400678>] __do_softirq+0x678/0x980 kernel/softirq.c:318
softirqs last disabled at (295): [<ffffffff813926d5>] invoke_softirq kernel/softirq.c:372 [inline]
softirqs last disabled at (295): [<ffffffff813926d5>] irq_exit+0x215/0x260 kernel/softirq.c:412
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 1 PID: 8578 Comm: syz-executor325 Tainted: G W 4.19.188-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440009
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff0320fc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 0000000000440009
RDX: 0000000000000001 RSI: 000000000000540a RDI: 0000000000000005
RBP: 0000000000000000 R08: 000000000000000d R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000a9c7
R13: 00007fff0320fc7c R14: 00007fff0320fc90 R15: 00007fff0320fc80
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 8674, name: syz-executor325
3 locks held by syz-executor325/8674:
#0: 00000000e1476003 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 0000000001cf809f (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 0000000001cf809f (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000e1476003 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 378
hardirqs last enabled at (377): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (378): [<ffffffff8817df95>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (378): [<ffffffff8817df95>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (0): [<ffffffff81370c69>] copy_process.part.0+0x15b9/0x8260 kernel/fork.c:1855
softirqs last disabled at (0): [<0000000000000000>] (null)
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 0 PID: 8674 Comm: syz-executor325 Tainted: G W 4.19.188-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440009
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff0320fc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 0000000000440009
RDX: 0000000000000001 RSI: 000000000000540a RDI: 0000000000000005
RBP: 0000000000000000 R08: 000000000000000d R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000ae38
R13: 00007fff0320fc7c R14: 00007fff0320fc90 R15: 00007fff0320fc80
BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2581
in_atomic(): 1, irqs_disabled(): 1, pid: 8969, name: syz-executor325
3 locks held by syz-executor325/8969:
#0: 00000000e1476003 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 0000000001cf809f (&(&tty->flow_lock)->rlock){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline]
#1: 0000000001cf809f (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:914
#2: 00000000e1476003 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
irq event stamp: 652
hardirqs last enabled at (651): [<ffffffff81007641>] do_syscall_64+0x21/0x620 arch/x86/entry/common.c:280
hardirqs last disabled at (652): [<ffffffff8817df95>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (652): [<ffffffff8817df95>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160
softirqs last enabled at (602): [<ffffffff88400678>] __do_softirq+0x678/0x980 kernel/softirq.c:318
softirqs last disabled at (433): [<ffffffff813926d5>] invoke_softirq kernel/softirq.c:372 [inline]
softirqs last disabled at (433): [<ffffffff813926d5>] irq_exit+0x215/0x260 kernel/softirq.c:412
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 0 PID: 8969 Comm: syz-executor325 Tainted: G W 4.19.188-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+0x1fc/0x2ef lib/dump_stack.c:118
___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2581
con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403
n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479
tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534
__start_tty drivers/tty/tty_io.c:806 [inline]
__start_tty+0x116/0x150 drivers/tty/tty_io.c:799
n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:917
n_hdlc_tty_ioctl+0x102/0x350 drivers/tty/n_hdlc.c:783
tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440009
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff0320fc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 0000000000440009
RDX: 0000000000000001 RSI: 000000000000540a RDI: 0000000000000005
RBP: 0000000000000000 R08: 000000000000000d R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000b896
R13: 00007fff0320fc7c R14: 00007fff0320fc90 R15: 00007fff0320fc80

Reply all
Reply to author
Forward
0 new messages