[ 11.124529][ T166] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 11.124621][ T166] BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:322 [ 11.124623][ T166] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 166, name: key-management_ [ 11.124625][ T166] preempt_count: 1, expected: 0 [ 11.124626][ T166] RCU nest depth: 0, expected: 0 [ 11.124627][ T166] locks held by key-management_/166: 5, last CPU#2: [ 11.124629][ T166] #0: ff1100000f92d690 (sk_lock-AF_INET6){+.+.}-{0:0}, at: do_tcp_setsockopt+0xaf1/0x2880 [ 11.124642][ T166] #1: ffffffff91779cc0 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x320/0x3e0 [ 11.124648][ T166] #2: ffffffff91779d38 (console_srcu){....}-{0:0}, at: console_flush_one_record+0x106/0x710 [ 11.124652][ T166] #3: ffffffff91699660 (console_owner){....}-{0:0}, at: console_lock_spinning_enable+0x40/0x60 [ 11.124655][ T166] #4: ffffffff91699560 (printk_legacy_map-wait-type-override){....}-{3:3}, at: console_emit_next_record+0x1df/0x4c0 [ 11.124659][ T166] irq event stamp: 276430 [ 11.124660][ T166] hardirqs last enabled at (276429): [] __down_trylock_console_sem+0x86/0xa0 [ 11.124662][ T166] hardirqs last disabled at (276430): [] console_emit_next_record+0x3d4/0x4c0 [ 11.124664][ T166] softirqs last enabled at (276422): [] do_tcp_setsockopt+0xaf1/0x2880 [ 11.124666][ T166] softirqs last disabled at (276420): [] lock_sock_nested+0x54/0xf0 [ 11.124670][ T166] Preemption disabled at: [ 11.124670][ T166] [] vprintk_emit+0x31b/0x3e0 [ 11.124677][ T166] CPU: 2 UID: 0 PID: 166 Comm: key-management_ Tainted: G W 7.2.0-virtme #1 PREEMPT(full) [ 11.124680][ T166] Tainted: [W]=WARN [ 11.124681][ T166] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 11.124683][ T166] Call Trace: [ 11.124684][ T166] [ 11.124686][ T166] dump_stack_lvl+0x6f/0xa0 [ 11.124691][ T166] ? vprintk_emit+0x31b/0x3e0 [ 11.124694][ T166] __might_resched.cold+0x1fe/0x2c1 [ 11.124698][ T166] ? perf_trace_sched_switch+0x7c0/0x7c0 [ 11.124702][ T166] ? __kmalloc_noprof+0xdb/0x760 [ 11.124707][ T166] __kmalloc_noprof+0x443/0x760 [ 11.124709][ T166] ? alloc_buf.isra.0+0x4b/0x260 [ 11.124715][ T166] ? do_raw_spin_unlock+0x59/0x250 [ 11.124718][ T166] alloc_buf.isra.0+0x4b/0x260 [ 11.124721][ T166] put_chars+0x1e1/0x2f0 [ 11.124723][ T166] ? check_prev_add+0x316/0xe90 [ 11.124725][ T166] ? __send_to_port+0x420/0x420 [ 11.124729][ T166] ? validate_chain+0x34a/0xc20 [ 11.124733][ T166] hvc_console_print+0x292/0x780 [ 11.124740][ T166] ? hvc_write+0x3a0/0x3a0 [ 11.124742][ T166] ? rcu_is_watching+0x16/0xd0 [ 11.124746][ T166] ? lock_acquire+0x13c/0x160 [ 11.124750][ T166] console_emit_next_record+0x22f/0x4c0 [ 11.124754][ T166] ? devkmsg_read+0x4b0/0x4b0 [ 11.124756][ T166] ? console_flush_one_record+0x106/0x710 [ 11.124759][ T166] ? rcu_is_watching+0x16/0xd0 [ 11.124761][ T166] ? lock_acquire+0x13c/0x160 [ 11.124765][ T166] console_flush_one_record+0x46f/0x710 [ 11.124769][ T166] ? console_emit_next_record+0x4c0/0x4c0 [ 11.124771][ T166] ? __lock_acquire+0x518/0xc20 [ 11.124776][ T166] console_unlock+0xee/0x1f0 [ 11.124778][ T166] ? console_flush_one_record+0x710/0x710 [ 11.124780][ T166] ? rcu_is_watching+0x16/0xd0 [ 11.124782][ T166] ? lock_acquire+0x60/0x160 [ 11.124786][ T166] ? __down_trylock_console_sem+0x5e/0xa0 [ 11.124788][ T166] ? vprintk_emit+0x320/0x3e0 [ 11.124791][ T166] vprintk_emit+0x37c/0x3e0 [ 11.124794][ T166] ? wake_up_klogd_work_func+0x90/0x90 [ 11.124797][ T166] ? __lock_release.isra.0+0x69/0x1a0 [ 11.124801][ T166] _printk+0xc7/0x100 [ 11.124805][ T166] ? snapshot_read.cold+0x21/0x21 [ 11.124806][ T166] ? ___ratelimit+0x4e7/0xa00 [ 11.124812][ T166] ? idr_get_free+0x830/0x830 [ 11.124816][ T166] tcp_ao_add_cmd.cold+0x82/0xa8 [ 11.124821][ T166] ? tcp_ao_cache_traffic_keys.isra.0+0x800/0x800 [ 11.124824][ T166] ? rcu_lockdep_current_cpu_online+0x3f/0x1b0 [ 11.124827][ T166] ? trace_raw_output_rcu_invoke_kfree_bulk_callback+0x5a/0x130 [ 11.124830][ T166] ? rcu_lockdep_current_cpu_online+0x3f/0x1b0 [ 11.124842][ T166] ? __lock_release.isra.0+0x69/0x1a0 [ 11.124844][ T166] ? mark_held_locks+0x40/0x70 [ 11.124848][ T166] do_tcp_setsockopt+0x163a/0x2880 [ 11.124852][ T166] ? tcp_sock_set_maxseg+0x80/0x80 [ 11.124855][ T166] ? _copy_from_user+0x42/0x90 [ 11.124859][ T166] ? rcu_lockdep_current_cpu_online+0x3f/0x1b0 [ 11.124862][ T166] ? rcu_read_lock_any_held+0x30/0x90 [ 11.124864][ T166] ? lockdep_hardirqs_on_prepare.part.0+0x110/0x160 [ 11.124867][ T166] ? mark_usage+0x61/0x170 [ 11.124869][ T166] ? __lock_acquire+0x518/0xc20 [ 11.124875][ T166] do_sock_setsockopt+0x115/0x490 [ 11.124878][ T166] ? __lock_release.isra.0+0x69/0x1a0 [ 11.124881][ T166] ? put_user_ifreq+0x90/0x90 [ 11.124884][ T166] ? __fget_files+0x1e3/0x460 [ 11.124890][ T166] __sys_setsockopt+0xe4/0x150 [ 11.124895][ T166] __x64_sys_setsockopt+0xbd/0x180 [ 11.124897][ T166] ? trace_irq_enable.constprop.0+0x9b/0x160 [ 11.124900][ T166] ? lockdep_hardirqs_on+0x91/0x130 [ 11.124902][ T166] ? do_syscall_64+0xa6/0x530 [ 11.124905][ T166] do_syscall_64+0xff/0x530 [ 11.124906][ T166] ? irq_exit_rcu+0x1a/0x30 [ 11.124910][ T166] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 11.124913][ T166] RIP: 0033:0x7f4123c4c2de [ 11.124917][ T166] Code: 55 48 63 c9 48 63 ff 45 89 c9 48 89 e5 48 83 ec 08 6a 2c e8 94 72 f7 ff c9 c3 66 90 f3 0f 1e fa 49 89 ca b8 36 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 0a c3 66 0f 1f 84 00 00 00 00 00 48 8b 15 e1 [ 11.124919][ T166] RSP: 002b:00007ffe01db43b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 11.124921][ T166] RAX: ffffffffffffffda RBX: 0000000000412854 RCX: 00007f4123c4c2de [ 11.124923][ T166] RDX: 0000000000000026 RSI: 0000000000000006 RDI: 000000000000000a [ 11.124924][ T166] RBP: 000000000000000a R08: 0000000000000120 R09: 0000000000000000 [ 11.124925][ T166] R10: 00007ffe01db43d0 R11: 0000000000000246 R12: 00000000000000c8 [ 11.124926][ T166] R13: 0000000000000044 R14: 00007f4114000e30 R15: 0000000000000080 [ 11.124932][ T166] [ 11.151112][ T166] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 11.151452][ T166] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 11.151795][ T166] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 11.152259][ T166] TCP: AO key ifindex 200 != sk bound ifindex 2