SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) cache: sigqueue, object size: 80, buffer size: 112, default order: 0, min order: 0 node 0: slabs: 30020, objs: 1080720, free: 0 ====================================================== WARNING: possible circular locking dependency detected 5.10.123 #1 Not tainted ------------------------------------------------------ syz-executor.5/13857 is trying to acquire lock: ffffffff84d0b5c0 (console_owner){-.-.}-{0:0}, at: console_unlock+0x2e1/0xb30 kernel/printk/printk.c:2507 but task is already holding lock: ffff888050e065d8 (&sighand->siglock){-.-.}-{2:2}, at: force_sig_info_to_task+0x6c/0x3a0 kernel/signal.c:1317 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&sighand->siglock){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 __lock_task_sighand+0xd3/0x2f0 kernel/signal.c:1391 lock_task_sighand include/linux/sched/signal.h:693 [inline] task_work_add+0x1db/0x2b0 kernel/task_work.c:58 io_req_task_work_add fs/io_uring.c:2062 [inline] __io_async_wake+0x40b/0x8d0 fs/io_uring.c:4938 __wake_up_common+0x14c/0x4c0 kernel/sched/wait.c:93 __wake_up_common_lock+0xd0/0x130 kernel/sched/wait.c:123 tty_ldisc_lock+0x40/0xb0 drivers/tty/tty_ldisc.c:335 tty_ldisc_hangup+0x204/0x690 drivers/tty/tty_ldisc.c:744 __tty_hangup.part.0+0x510/0x9b0 drivers/tty/tty_io.c:624 __tty_hangup drivers/tty/tty_io.c:574 [inline] tty_vhangup drivers/tty/tty_io.c:697 [inline] tty_ioctl+0x120e/0x1830 drivers/tty/tty_io.c:2683 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x196/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #3 (&tty->read_wait){....}-{2:2}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] io_poll_double_wake+0x1f8/0x550 fs/io_uring.c:5051 __wake_up_common+0x14c/0x4c0 kernel/sched/wait.c:93 __wake_up_common_lock+0xd0/0x130 kernel/sched/wait.c:123 tty_ldisc_lock+0x55/0xb0 drivers/tty/tty_ldisc.c:336 tty_ldisc_hangup+0x204/0x690 drivers/tty/tty_ldisc.c:744 __tty_hangup.part.0+0x510/0x9b0 drivers/tty/tty_io.c:624 __tty_hangup drivers/tty/tty_io.c:574 [inline] tty_vhangup drivers/tty/tty_io.c:697 [inline] tty_ioctl+0x120e/0x1830 drivers/tty/tty_io.c:2683 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x196/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #2 (&tty->write_wait){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:122 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:50 serial8250_tx_chars+0x516/0xa90 drivers/tty/serial/8250/8250_port.c:1861 serial8250_handle_irq.part.0+0x3f1/0x4c0 drivers/tty/serial/8250/8250_port.c:1948 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1921 [inline] serial8250_default_handle_irq+0xb8/0x230 drivers/tty/serial/8250/8250_port.c:1964 serial8250_interrupt+0xf4/0x1a0 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x2ef/0x820 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0xff/0x280 kernel/irq/handle.c:213 handle_edge_irq+0x249/0xd00 kernel/irq/chip.c:822 asm_call_irq_on_stack+0x12/0x20 __run_irq_on_irqstack arch/x86/include/asm/irq_stack.h:48 [inline] run_irq_on_irqstack_cond arch/x86/include/asm/irq_stack.h:101 [inline] handle_irq arch/x86/kernel/irq.c:230 [inline] __common_interrupt arch/x86/kernel/irq.c:249 [inline] common_interrupt+0xdd/0x190 arch/x86/kernel/irq.c:239 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:626 native_safe_halt arch/x86/include/asm/irqflags.h:60 [inline] arch_safe_halt arch/x86/include/asm/irqflags.h:103 [inline] default_idle+0xe/0x10 arch/x86/kernel/process.c:689 default_idle_call+0x87/0xd0 kernel/sched/idle.c:112 cpuidle_idle_call kernel/sched/idle.c:194 [inline] do_idle+0x3a9/0x520 kernel/sched/idle.c:300 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:396 secondary_startup_64_no_verify+0xc2/0xcb -> #1 (&port_lock_key){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 serial8250_console_write+0x90b/0xb60 drivers/tty/serial/8250/8250_port.c:3340 call_console_drivers kernel/printk/printk.c:1911 [inline] console_unlock+0x826/0xb30 kernel/printk/printk.c:2532 register_console kernel/printk/printk.c:2873 [inline] register_console+0x53d/0x800 kernel/printk/printk.c:2763 univ8250_console_init+0x3a/0x46 drivers/tty/serial/8250/8250_core.c:690 console_init+0x361/0x4fa kernel/printk/printk.c:2983 start_kernel+0x2e1/0x48a init/main.c:982 secondary_startup_64_no_verify+0xc2/0xcb -> #0 (console_owner){-.-.}-{0:0}: check_prev_add kernel/locking/lockdep.c:2988 [inline] check_prevs_add kernel/locking/lockdep.c:3113 [inline] validate_chain kernel/locking/lockdep.c:3728 [inline] __lock_acquire+0x29e3/0x5b00 kernel/locking/lockdep.c:4954 lock_acquire kernel/locking/lockdep.c:5564 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5529 console_lock_spinning_enable kernel/printk/printk.c:1763 [inline] console_unlock+0x360/0xb30 kernel/printk/printk.c:2529 vprintk_emit+0x1da/0x4d0 kernel/printk/printk.c:2054 vprintk_func+0x8b/0x140 kernel/printk/printk_safe.c:401 printk+0xba/0xed kernel/printk/printk.c:2102 warn_alloc.cold+0x90/0x18a mm/page_alloc.c:3981 __alloc_pages_slowpath.constprop.0+0x1cbf/0x2210 mm/page_alloc.c:4868 __alloc_pages_nodemask+0x54f/0x680 mm/page_alloc.c:4972 alloc_pages_current+0x187/0x280 mm/mempolicy.c:2265 alloc_pages include/linux/gfp.h:547 [inline] alloc_slab_page mm/slub.c:1620 [inline] allocate_slab+0x297/0x380 mm/slub.c:1771 new_slab mm/slub.c:1824 [inline] new_slab_objects mm/slub.c:2583 [inline] ___slab_alloc+0x46c/0x700 mm/slub.c:2746 __slab_alloc mm/slub.c:2786 [inline] slab_alloc_node mm/slub.c:2861 [inline] slab_alloc mm/slub.c:2904 [inline] kmem_cache_alloc+0x30e/0x350 mm/slub.c:2909 __sigqueue_alloc+0x1ee/0x560 kernel/signal.c:435 __send_signal+0x5db/0x1040 kernel/signal.c:1116 force_sig_info_to_task+0x2a0/0x3a0 kernel/signal.c:1334 force_sig_fault_to_task kernel/signal.c:1673 [inline] force_sig_fault+0xb0/0xf0 kernel/signal.c:1680 __bad_area_nosemaphore+0x270/0x320 arch/x86/mm/fault.c:832 __bad_area arch/x86/mm/fault.c:863 [inline] bad_area_access_error+0x260/0x360 arch/x86/mm/fault.c:923 do_user_addr_fault+0x3e7/0xc00 arch/x86/mm/fault.c:1362 handle_page_fault arch/x86/mm/fault.c:1436 [inline] exc_page_fault+0xa2/0x1a0 arch/x86/mm/fault.c:1492 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571 other info that might help us debug this: Chain exists of: console_owner --> &tty->read_wait --> &sighand->siglock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sighand->siglock); lock(&tty->read_wait); lock(&sighand->siglock); lock(console_owner); *** DEADLOCK *** 2 locks held by syz-executor.5/13857: #0: ffff888050e065d8 (&sighand->siglock){-.-.}-{2:2}, at: force_sig_info_to_task+0x6c/0x3a0 kernel/signal.c:1317 #1: ffffffff84deb940 (console_lock){+.+.}-{0:0}, at: vprintk_func+0x8b/0x140 kernel/printk/printk_safe.c:401 stack backtrace: CPU: 1 PID: 13857 Comm: syz-executor.5 Not tainted 5.10.123 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2123 check_prev_add kernel/locking/lockdep.c:2988 [inline] check_prevs_add kernel/locking/lockdep.c:3113 [inline] validate_chain kernel/locking/lockdep.c:3728 [inline] __lock_acquire+0x29e3/0x5b00 kernel/locking/lockdep.c:4954 lock_acquire kernel/locking/lockdep.c:5564 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5529 console_lock_spinning_enable kernel/printk/printk.c:1763 [inline] console_unlock+0x360/0xb30 kernel/printk/printk.c:2529 vprintk_emit+0x1da/0x4d0 kernel/printk/printk.c:2054 vprintk_func+0x8b/0x140 kernel/printk/printk_safe.c:401 printk+0xba/0xed kernel/printk/printk.c:2102 warn_alloc.cold+0x90/0x18a mm/page_alloc.c:3981 __alloc_pages_slowpath.constprop.0+0x1cbf/0x2210 mm/page_alloc.c:4868 __alloc_pages_nodemask+0x54f/0x680 mm/page_alloc.c:4972 alloc_pages_current+0x187/0x280 mm/mempolicy.c:2265 alloc_pages include/linux/gfp.h:547 [inline] alloc_slab_page mm/slub.c:1620 [inline] allocate_slab+0x297/0x380 mm/slub.c:1771 new_slab mm/slub.c:1824 [inline] new_slab_objects mm/slub.c:2583 [inline] ___slab_alloc+0x46c/0x700 mm/slub.c:2746 __slab_alloc mm/slub.c:2786 [inline] slab_alloc_node mm/slub.c:2861 [inline] slab_alloc mm/slub.c:2904 [inline] kmem_cache_alloc+0x30e/0x350 mm/slub.c:2909 __sigqueue_alloc+0x1ee/0x560 kernel/signal.c:435 __send_signal+0x5db/0x1040 kernel/signal.c:1116 force_sig_info_to_task+0x2a0/0x3a0 kernel/signal.c:1334 force_sig_fault_to_task kernel/signal.c:1673 [inline] force_sig_fault+0xb0/0xf0 kernel/signal.c:1680 __bad_area_nosemaphore+0x270/0x320 arch/x86/mm/fault.c:832 __bad_area arch/x86/mm/fault.c:863 [inline] bad_area_access_error+0x260/0x360 arch/x86/mm/fault.c:923 do_user_addr_fault+0x3e7/0xc00 arch/x86/mm/fault.c:1362 handle_page_fault arch/x86/mm/fault.c:1436 [inline] exc_page_fault+0xa2/0x1a0 arch/x86/mm/fault.c:1492 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571 RIP: 0033:0x7f7db187f452 Code: ff e8 62 33 01 00 85 c0 0f 84 ba 01 00 00 64 f0 83 2c 25 b8 ff ff ff 01 e8 6b d1 00 00 48 8b 0c 24 8b 00 48 8b 99 80 00 00 00 <89> 81 88 00 00 00 85 c0 75 06 48 83 fb ff 74 18 48 63 44 24 14 48 RSP: 002b:00007f7daee2d1a0 EFLAGS: 00010203 RAX: 0000000000000013 RBX: 00000002be5741c3 RCX: 00007f7db187fa89 RDX: 00007f7db187f42e RSI: 0000000000000001 RDI: 00007f7daee2d5f0 RBP: 00007f7db1932f6d R08: 00007f7daee2d1a0 R09: 00007f7db1932f6d R10: 00007f7db193278f R11: 0000000000000000 R12: 0000000000000000 R13: 00007ffe8158a79f R14: 00007f7daee2d300 R15: 0000000000022000