[ 10.538227][ T157] netconsole selftest: netcons_ZCd3M [ 10.538250][ T157] BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:322 [ 10.538253][ T157] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 157, name: bash [ 10.538255][ T157] preempt_count: 1, expected: 0 [ 10.538256][ T157] RCU nest depth: 0, expected: 0 [ 10.538257][ T157] locks held by bash/157: 4, last CPU#0: [ 10.538260][ T157] #0: ffffffffa5b99cc0 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x320/0x3e0 [ 10.538273][ T157] #1: ffffffffa5b99d38 (console_srcu){....}-{0:0}, at: console_flush_one_record+0x106/0x710 [ 10.538278][ T157] #2: ffffffffa5a89660 (console_owner){....}-{0:0}, at: console_lock_spinning_enable+0x40/0x60 [ 10.538282][ T157] #3: ffffffffa5a89560 (printk_legacy_map-wait-type-override){....}-{3:3}, at: console_emit_next_record+0x202/0x4f0 [ 10.538286][ T157] irq event stamp: 113538 [ 10.538288][ T157] hardirqs last enabled at (113537): [] __down_trylock_console_sem+0x86/0xa0 [ 10.538291][ T157] hardirqs last disabled at (113538): [] console_emit_next_record+0x3f8/0x4f0 [ 10.538293][ T157] softirqs last enabled at (113330): [] restore_fpregs_from_user+0x1cf/0x490 [ 10.538297][ T157] softirqs last disabled at (113328): [] restore_fpregs_from_user+0xc3/0x490 [ 10.538299][ T157] Preemption disabled at: [ 10.538300][ T157] [] vprintk_emit+0x31b/0x3e0 [ 10.538306][ T157] CPU: 0 UID: 0 PID: 157 Comm: bash Tainted: G W 7.2.0-virtme #1 PREEMPT(full) [ 10.538310][ T157] Tainted: [W]=WARN [ 10.538311][ T157] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 10.538313][ T157] Call Trace: [ 10.538315][ T157] [ 10.538316][ T157] dump_stack_lvl+0x6f/0xa0 [ 10.538321][ T157] ? vprintk_emit+0x31b/0x3e0 [ 10.538323][ T157] __might_resched.cold+0x1fe/0x2c1 [ 10.538329][ T157] ? perf_trace_sched_switch+0x7c0/0x7c0 [ 10.538333][ T157] ? __kmalloc_noprof+0xdb/0x760 [ 10.538338][ T157] __kmalloc_noprof+0x443/0x760 [ 10.538340][ T157] ? alloc_buf.isra.0+0x4b/0x260 [ 10.538346][ T157] ? do_raw_spin_unlock+0x59/0x250 [ 10.538348][ T157] alloc_buf.isra.0+0x4b/0x260 [ 10.538351][ T157] put_chars+0x1e1/0x2f0 [ 10.538355][ T157] ? __send_to_port+0x420/0x420 [ 10.538356][ T157] ? printk_get_next_message+0x2fe/0x7d0 [ 10.538359][ T157] ? rcu_read_lock_any_held+0x3c/0x90 [ 10.538362][ T157] ? validate_chain+0x38b/0xc20 [ 10.538367][ T157] hvc_console_print+0x292/0x780 [ 10.538370][ T157] ? __lock_acquire+0x518/0xc20 [ 10.538371][ T157] ? __lock_acquire+0x518/0xc20 [ 10.538375][ T157] ? hvc_write+0x3a0/0x3a0 [ 10.538378][ T157] ? rcu_is_watching+0x16/0xd0 [ 10.538381][ T157] ? lock_acquire+0x13c/0x160 [ 10.538385][ T157] console_emit_next_record+0x252/0x4f0 [ 10.538389][ T157] ? devkmsg_read+0x4e0/0x4e0 [ 10.538393][ T157] ? rcu_is_watching+0x16/0xd0 [ 10.538395][ T157] ? lock_acquire+0x13c/0x160 [ 10.538399][ T157] console_flush_one_record+0x46f/0x710 [ 10.538403][ T157] ? console_emit_next_record+0x4f0/0x4f0 [ 10.538404][ T157] ? __lock_acquire+0x518/0xc20 [ 10.538409][ T157] console_unlock+0xee/0x1f0 [ 10.538412][ T157] ? console_flush_one_record+0x710/0x710 [ 10.538413][ T157] ? rcu_is_watching+0x16/0xd0 [ 10.538416][ T157] ? lock_acquire+0x60/0x160 [ 10.538419][ T157] ? __down_trylock_console_sem+0x5e/0xa0 [ 10.538421][ T157] ? vprintk_emit+0x320/0x3e0 [ 10.538424][ T157] vprintk_emit+0x37c/0x3e0 [ 10.538427][ T157] ? wake_up_klogd_work_func+0x90/0x90 [ 10.538430][ T157] ? _copy_from_iter+0x1bb/0x1810 [ 10.538436][ T157] devkmsg_emit.constprop.0+0xbc/0xf1 [ 10.538440][ T157] ? vprintk_emit.cold+0x107/0x107 [ 10.538444][ T157] ? __kmalloc_noprof+0x302/0x760 [ 10.538446][ T157] ? idr_get_free+0x830/0x830 [ 10.538450][ T157] ? devkmsg_write+0xd1/0x2c0 [ 10.538452][ T157] ? _copy_from_iter+0x1bb/0x1810 [ 10.538455][ T157] devkmsg_write.cold+0x5a/0x8b [ 10.538458][ T157] ? vprintk_default+0x20/0x20 [ 10.538460][ T157] ? __lock_acquire+0x518/0xc20 [ 10.538462][ T157] ? vfs_lock_file+0x1b0/0x1b0 [ 10.538466][ T157] ? vprintk_default+0x20/0x20 [ 10.538469][ T157] new_sync_write+0x33e/0x760 [ 10.538474][ T157] ? new_sync_read+0x750/0x750 [ 10.538475][ T157] ? rcu_read_lock_any_held+0x3c/0x90 [ 10.538483][ T157] vfs_write+0x6a2/0xbd0 [ 10.538487][ T157] ksys_write+0x116/0x250 [ 10.538490][ T157] ? __ia32_sys_read+0xc0/0xc0 [ 10.538492][ T157] ? do_raw_spin_unlock+0x59/0x250 [ 10.538494][ T157] ? rcu_is_watching+0x16/0xd0 [ 10.538498][ T157] do_syscall_64+0xff/0x530 [ 10.538500][ T157] ? exc_page_fault+0xee/0x100 [ 10.538503][ T157] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 10.538505][ T157] RIP: 0033:0x7f3a9cf5454e [ 10.538509][ T157] 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 [ 10.538512][ T157] RSP: 002b:00007ffdf48d7aa0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 [ 10.538515][ T157] RAX: ffffffffffffffda RBX: 00007f3a9d0d5580 RCX: 00007f3a9cf5454e [ 10.538516][ T157] RDX: 0000000000000023 RSI: 000056186f17d490 RDI: 0000000000000001 [ 10.538517][ T157] RBP: 00007ffdf48d7ab0 R08: 0000000000000000 R09: 0000000000000000 [ 10.538518][ T157] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000023 [ 10.538519][ T157] R13: 0000000000000023 R14: 000056186f17d490 R15: 0000000000000000 [ 10.538526][ T157] [ 11.287881][ T157] netconsole selftest: netcons_ZCd3M