[ 9.357930][ T170] netconsole: network logging started [ 9.357947][ T170] BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:322 [ 9.357950][ T170] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 170, name: modprobe [ 9.357952][ T170] preempt_count: 1, expected: 0 [ 9.357953][ T170] RCU nest depth: 0, expected: 0 [ 9.357954][ T170] locks held by modprobe/170: 4, last CPU#2: [ 9.357956][ T170] #0: ffffffffab199cc0 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x320/0x3e0 [ 9.357968][ T170] #1: ffffffffab199d38 (console_srcu){....}-{0:0}, at: console_flush_one_record+0x106/0x710 [ 9.357972][ T170] #2: ffffffffab089660 (console_owner){....}-{0:0}, at: console_lock_spinning_enable+0x40/0x60 [ 9.357975][ T170] #3: ffffffffab089560 (printk_legacy_map-wait-type-override){....}-{3:3}, at: console_emit_next_record+0x202/0x4f0 [ 9.357979][ T170] irq event stamp: 37910 [ 9.357980][ T170] hardirqs last enabled at (37909): [] __down_trylock_console_sem+0x86/0xa0 [ 9.357982][ T170] hardirqs last disabled at (37910): [] console_emit_next_record+0x3f8/0x4f0 [ 9.357984][ T170] softirqs last enabled at (37734): [] handle_softirqs+0x67c/0x900 [ 9.357988][ T170] softirqs last disabled at (37729): [] __irq_exit_rcu+0x145/0x1c0 [ 9.357990][ T170] Preemption disabled at: [ 9.357991][ T170] [] vprintk_emit+0x31b/0x3e0 [ 9.357997][ T170] CPU: 2 UID: 0 PID: 170 Comm: modprobe Tainted: G W 7.2.0-virtme #1 PREEMPT(full) [ 9.358000][ T170] Tainted: [W]=WARN [ 9.358001][ T170] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 9.358003][ T170] Call Trace: [ 9.358005][ T170] [ 9.358006][ T170] dump_stack_lvl+0x6f/0xa0 [ 9.358012][ T170] ? vprintk_emit+0x31b/0x3e0 [ 9.358014][ T170] __might_resched.cold+0x1fe/0x2c1 [ 9.358018][ T170] ? perf_trace_sched_switch+0x7c0/0x7c0 [ 9.358022][ T170] ? __kmalloc_noprof+0xdb/0x760 [ 9.358026][ T170] __kmalloc_noprof+0x443/0x760 [ 9.358028][ T170] ? alloc_buf.isra.0+0x4b/0x260 [ 9.358034][ T170] ? do_raw_spin_unlock+0x59/0x250 [ 9.358037][ T170] alloc_buf.isra.0+0x4b/0x260 [ 9.358040][ T170] put_chars+0x1e1/0x2f0 [ 9.358043][ T170] ? __send_to_port+0x420/0x420 [ 9.358046][ T170] ? validate_chain+0x38b/0xc20 [ 9.358051][ T170] hvc_console_print+0x292/0x780 [ 9.358056][ T170] ? hvc_write+0x3a0/0x3a0 [ 9.358059][ T170] ? rcu_is_watching+0x16/0xd0 [ 9.358062][ T170] ? lock_acquire+0x13c/0x160 [ 9.358066][ T170] console_emit_next_record+0x252/0x4f0 [ 9.358070][ T170] ? devkmsg_read+0x4e0/0x4e0 [ 9.358074][ T170] ? rcu_is_watching+0x16/0xd0 [ 9.358076][ T170] ? lock_acquire+0x13c/0x160 [ 9.358079][ T170] console_flush_one_record+0x46f/0x710 [ 9.358083][ T170] ? console_emit_next_record+0x4f0/0x4f0 [ 9.358085][ T170] ? __lock_acquire+0x518/0xc20 [ 9.358090][ T170] console_unlock+0xee/0x1f0 [ 9.358092][ T170] ? console_flush_one_record+0x710/0x710 [ 9.358094][ T170] ? rcu_is_watching+0x16/0xd0 [ 9.358096][ T170] ? lock_acquire+0x60/0x160 [ 9.358099][ T170] ? __down_trylock_console_sem+0x5e/0xa0 [ 9.358100][ T170] ? vprintk_emit+0x320/0x3e0 [ 9.358103][ T170] vprintk_emit+0x37c/0x3e0 [ 9.358107][ T170] ? wake_up_klogd_work_func+0x90/0x90 [ 9.358109][ T170] ? find_held_lock+0x2b/0x80 [ 9.358113][ T170] ? __lock_release.isra.0+0x69/0x1a0 [ 9.358114][ T170] ? fast_dput+0x316/0x540 [ 9.358119][ T170] ? cleanup_netconsole+0x1140/0x1140 [netconsole] [ 9.358123][ T170] _printk+0xc7/0x100 [ 9.358127][ T170] ? snapshot_read.cold+0x21/0x21 [ 9.358130][ T170] ? __up_write+0x2e5/0x5f0 [ 9.358133][ T170] ? cleanup_netconsole+0x1140/0x1140 [netconsole] [ 9.358137][ T170] ? configfs_register_subsystem+0x340/0x570 [ 9.358141][ T170] init_netconsole+0x4a8/0x1000 [netconsole] [ 9.358145][ T170] ? cleanup_netconsole+0x1140/0x1140 [netconsole] [ 9.358151][ T170] ? cleanup_netconsole+0x1140/0x1140 [netconsole] [ 9.358154][ T170] do_one_initcall+0x124/0x4f0 [ 9.358157][ T170] ? trace_event_raw_event_initcall_level+0x280/0x280 [ 9.358162][ T170] ? do_init_module+0xae/0x8a0 [ 9.358165][ T170] ? kasan_unpoison+0x44/0x70 [ 9.358171][ T170] do_init_module+0x2ad/0x8a0 [ 9.358174][ T170] ? lockdep_hardirqs_on+0x91/0x130 [ 9.358178][ T170] ? free_module+0x470/0x470 [ 9.358181][ T170] ? kfree+0x123/0x590 [ 9.358185][ T170] load_module+0x1424/0x1bb0 [ 9.358191][ T170] ? layout_and_allocate.isra.0+0x680/0x680 [ 9.358195][ T170] ? __ia32_sys_fsconfig+0x180/0x180 [ 9.358198][ T170] ? ovl_real_file+0x172/0x1e0 [ 9.358202][ T170] ? backing_file_read_iter+0x541/0x790 [ 9.358205][ T170] ? rcu_lockdep_current_cpu_online+0x3f/0x1b0 [ 9.358209][ T170] init_module_from_file+0x11f/0x1a0 [ 9.358212][ T170] ? __do_sys_init_module+0x220/0x220 [ 9.358220][ T170] ? __rwlock_init+0x150/0x150 [ 9.358223][ T170] ? do_raw_spin_unlock+0x59/0x250 [ 9.358226][ T170] idempotent_init_module+0x37b/0x7c0 [ 9.358230][ T170] ? init_module_from_file+0x1a0/0x1a0 [ 9.358236][ T170] ? rcu_is_watching+0x16/0xd0 [ 9.358238][ T170] ? cap_capable+0x1d7/0x3d0 [ 9.358244][ T170] __x64_sys_finit_module+0xdf/0x190 [ 9.358245][ T170] ? trace_irq_enable.constprop.0+0x9b/0x160 [ 9.358250][ T170] do_syscall_64+0xff/0x530 [ 9.358251][ T170] ? exc_page_fault+0xee/0x100 [ 9.358254][ T170] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 9.358256][ T170] RIP: 0033:0x7f349058037d [ 9.358260][ T170] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 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 8b 0d 4b aa 0f 00 f7 d8 64 89 01 48 [ 9.358262][ T170] RSP: 002b:00007fffbd74bbf8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 9.358265][ T170] RAX: ffffffffffffffda RBX: 000055e5ba0db700 RCX: 00007f349058037d [ 9.358266][ T170] RDX: 0000000000000000 RSI: 000055e5a6eccffd RDI: 0000000000000005 [ 9.358267][ T170] RBP: 00007fffbd74bc90 R08: 0000000000000000 R09: 0000000000000000 [ 9.358267][ T170] R10: 0000000000000000 R11: 0000000000000246 R12: 000055e5a6eccffd [ 9.358268][ T170] R13: 000055e5ba0db810 R14: 0000000000040000 R15: 0000000000000000 [ 9.358275][ T170] [ 11.783070][ T225] Test #1 from CPU2: netcons_kOaK0 [ 11.783104][ T225] BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:322 [ 11.783108][ T225] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 225, name: echo [ 11.783110][ T225] preempt_count: 1, expected: 0 [ 11.783111][ T225] RCU nest depth: 0, expected: 0 [ 11.783113][ T225] locks held by echo/225: 4, last CPU#2: [ 11.783116][ T225] #0: ffffffffab199cc0 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x320/0x3e0 [ 11.783132][ T225] #1: ffffffffab199d38 (console_srcu){....}-{0:0}, at: console_flush_one_record+0x106/0x710 [ 11.783139][ T225] #2: ffffffffab089660 (console_owner){....}-{0:0}, at: console_lock_spinning_enable+0x40/0x60 [ 11.783145][ T225] #3: ffffffffab089560 (printk_legacy_map-wait-type-override){....}-{3:3}, at: console_emit_next_record+0x202/0x4f0 [ 11.783152][ T225] irq event stamp: 27612 [ 11.783155][ T225] hardirqs last enabled at (27611): [] __down_trylock_console_sem+0x86/0xa0 [ 11.783158][ T225] hardirqs last disabled at (27612): [] console_emit_next_record+0x3f8/0x4f0 [ 11.783161][ T225] softirqs last enabled at (26372): [] handle_softirqs+0x67c/0x900 [ 11.783167][ T225] softirqs last disabled at (26363): [] __irq_exit_rcu+0x145/0x1c0 [ 11.783171][ T225] Preemption disabled at: [ 11.783172][ T225] [] vprintk_emit+0x31b/0x3e0 [ 11.783179][ T225] CPU: 2 UID: 0 PID: 225 Comm: echo Tainted: G W 7.2.0-virtme #1 PREEMPT(full) [ 11.783184][ T225] Tainted: [W]=WARN [ 11.783186][ T225] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 11.783188][ T225] Call Trace: [ 11.783191][ T225] [ 11.783193][ T225] dump_stack_lvl+0x6f/0xa0 [ 11.783200][ T225] ? vprintk_emit+0x31b/0x3e0 [ 11.783203][ T225] __might_resched.cold+0x1fe/0x2c1 [ 11.783209][ T225] ? perf_trace_sched_switch+0x7c0/0x7c0 [ 11.783215][ T225] ? __kmalloc_noprof+0xdb/0x760 [ 11.783222][ T225] __kmalloc_noprof+0x443/0x760 [ 11.783225][ T225] ? alloc_buf.isra.0+0x4b/0x260 [ 11.783234][ T225] ? do_raw_spin_unlock+0x59/0x250 [ 11.783237][ T225] alloc_buf.isra.0+0x4b/0x260 [ 11.783242][ T225] put_chars+0x1e1/0x2f0 [ 11.783247][ T225] ? __send_to_port+0x420/0x420 [ 11.783249][ T225] ? printk_get_next_message+0x2fe/0x7d0 [ 11.783255][ T225] ? rcu_read_lock_any_held+0x3c/0x90 [ 11.783259][ T225] ? validate_chain+0x38b/0xc20 [ 11.783266][ T225] hvc_console_print+0x292/0x780 [ 11.783270][ T225] ? __lock_acquire+0x518/0xc20 [ 11.783272][ T225] ? __lock_acquire+0x518/0xc20 [ 11.783279][ T225] ? hvc_write+0x3a0/0x3a0 [ 11.783285][ T225] ? rcu_is_watching+0x16/0xd0 [ 11.783289][ T225] ? lock_acquire+0x13c/0x160 [ 11.783296][ T225] console_emit_next_record+0x252/0x4f0 [ 11.783302][ T225] ? devkmsg_read+0x4e0/0x4e0 [ 11.783309][ T225] ? rcu_is_watching+0x16/0xd0 [ 11.783313][ T225] ? lock_acquire+0x13c/0x160 [ 11.783319][ T225] console_flush_one_record+0x46f/0x710 [ 11.783326][ T225] ? console_emit_next_record+0x4f0/0x4f0 [ 11.783328][ T225] ? __lock_acquire+0x518/0xc20 [ 11.783337][ T225] console_unlock+0xee/0x1f0 [ 11.783342][ T225] ? console_flush_one_record+0x710/0x710 [ 11.783344][ T225] ? rcu_is_watching+0x16/0xd0 [ 11.783348][ T225] ? lock_acquire+0x60/0x160 [ 11.783354][ T225] ? __down_trylock_console_sem+0x5e/0xa0 [ 11.783356][ T225] ? vprintk_emit+0x320/0x3e0 [ 11.783361][ T225] vprintk_emit+0x37c/0x3e0 [ 11.783367][ T225] ? wake_up_klogd_work_func+0x90/0x90 [ 11.783372][ T225] ? _copy_from_iter+0x1bb/0x1810 [ 11.783381][ T225] devkmsg_emit.constprop.0+0xbc/0xf1 [ 11.783386][ T225] ? vprintk_emit.cold+0x107/0x107 [ 11.783393][ T225] ? __kmalloc_noprof+0x302/0x760 [ 11.783396][ T225] ? idr_get_free+0x830/0x830 [ 11.783401][ T225] ? devkmsg_write+0xd1/0x2c0 [ 11.783406][ T225] ? _copy_from_iter+0x1bb/0x1810 [ 11.783410][ T225] devkmsg_write.cold+0x5a/0x8b [ 11.783415][ T225] ? vprintk_default+0x20/0x20 [ 11.783417][ T225] ? handle_pte_fault+0x426/0x710 [ 11.783424][ T225] ? do_numa_page.isra.0+0xa70/0xa70 [ 11.783428][ T225] ? vprintk_default+0x20/0x20 [ 11.783432][ T225] new_sync_write+0x33e/0x760 [ 11.783439][ T225] ? new_sync_read+0x750/0x750 [ 11.783442][ T225] ? lock_vma_under_rcu+0x159/0x410 [ 11.783456][ T225] vfs_write+0x6a2/0xbd0 [ 11.783463][ T225] ksys_write+0x116/0x250 [ 11.783468][ T225] ? __ia32_sys_read+0xc0/0xc0 [ 11.783471][ T225] ? rcu_is_watching+0x16/0xd0 [ 11.783475][ T225] ? rcu_is_watching+0x16/0xd0 [ 11.783481][ T225] do_syscall_64+0xff/0x530 [ 11.783484][ T225] ? exc_page_fault+0xee/0x100 [ 11.783489][ T225] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 11.783492][ T225] RIP: 0033:0x7f59e0d4754e [ 11.783498][ T225] Code: 4d 89 d8 e8 b4 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 c3 83 e2 39 83 fa 08 75 e7 e8 03 ff ff ff 0f 1f 00 f3 0f 1e fa [ 11.783500][ T225] RSP: 002b:00007fff05af1430 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 [ 11.783504][ T225] RAX: ffffffffffffffda RBX: 00007f59e0ec8580 RCX: 00007f59e0d4754e [ 11.783507][ T225] RDX: 0000000000000021 RSI: 0000556aabe84060 RDI: 0000000000000001 [ 11.783511][ T225] RBP: 00007fff05af1440 R08: 0000000000000000 R09: 0000000000000000 [ 11.783512][ T225] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000021 [ 11.783514][ T225] R13: 0000000000000021 R14: 0000556aabe84060 R15: 00007f59e0ec8668 [ 11.783527][ T225]