[ 9.973185][ T166] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 9.973248][ T166] BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:322 [ 9.973250][ T166] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 166, name: key-management_ [ 9.973252][ T166] preempt_count: 1, expected: 0 [ 9.973253][ T166] RCU nest depth: 0, expected: 0 [ 9.973254][ T166] locks held by key-management_/166: 5, last CPU#2: [ 9.973255][ T166] #0: ff1100000fc62b10 (sk_lock-AF_INET){+.+.}-{0:0}, at: do_tcp_setsockopt+0xaf1/0x2880 [ 9.973269][ T166] #1: ffffffffb4379cc0 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x320/0x3e0 [ 9.973276][ T166] #2: ffffffffb4379d38 (console_srcu){....}-{0:0}, at: console_flush_one_record+0x106/0x710 [ 9.973280][ T166] #3: ffffffffb4299660 (console_owner){....}-{0:0}, at: console_lock_spinning_enable+0x40/0x60 [ 9.973284][ T166] #4: ffffffffb4299560 (printk_legacy_map-wait-type-override){....}-{3:3}, at: console_emit_next_record+0x1df/0x4c0 [ 9.973288][ T166] irq event stamp: 328938 [ 9.973289][ T166] hardirqs last enabled at (328937): [] __down_trylock_console_sem+0x86/0xa0 [ 9.973292][ T166] hardirqs last disabled at (328938): [] console_emit_next_record+0x3d4/0x4c0 [ 9.973294][ T166] softirqs last enabled at (328930): [] do_tcp_setsockopt+0xaf1/0x2880 [ 9.973295][ T166] softirqs last disabled at (328928): [] lock_sock_nested+0x54/0xf0 [ 9.973299][ T166] Preemption disabled at: [ 9.973300][ T166] [] vprintk_emit+0x31b/0x3e0 [ 9.973307][ T166] CPU: 2 UID: 0 PID: 166 Comm: key-management_ Tainted: G W 7.2.0-virtme #1 PREEMPT(full) [ 9.973311][ T166] Tainted: [W]=WARN [ 9.973312][ T166] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 9.973314][ T166] Call Trace: [ 9.973315][ T166] [ 9.973317][ T166] dump_stack_lvl+0x6f/0xa0 [ 9.973323][ T166] ? vprintk_emit+0x31b/0x3e0 [ 9.973326][ T166] __might_resched.cold+0x1fe/0x2c1 [ 9.973330][ T166] ? perf_trace_sched_switch+0x7c0/0x7c0 [ 9.973335][ T166] ? __kmalloc_noprof+0xdb/0x760 [ 9.973340][ T166] __kmalloc_noprof+0x443/0x760 [ 9.973342][ T166] ? alloc_buf.isra.0+0x4b/0x260 [ 9.973348][ T166] ? do_raw_spin_unlock+0x59/0x250 [ 9.973351][ T166] alloc_buf.isra.0+0x4b/0x260 [ 9.973355][ T166] put_chars+0x1e1/0x2f0 [ 9.973357][ T166] ? check_prev_add+0x316/0xe90 [ 9.973359][ T166] ? __send_to_port+0x420/0x420 [ 9.973362][ T166] ? validate_chain+0x34a/0xc20 [ 9.973367][ T166] hvc_console_print+0x292/0x780 [ 9.973374][ T166] ? hvc_write+0x3a0/0x3a0 [ 9.973377][ T166] ? rcu_is_watching+0x16/0xd0 [ 9.973381][ T166] ? lock_acquire+0x13c/0x160 [ 9.973385][ T166] console_emit_next_record+0x22f/0x4c0 [ 9.973389][ T166] ? devkmsg_read+0x4b0/0x4b0 [ 9.973391][ T166] ? console_flush_one_record+0x106/0x710 [ 9.973394][ T166] ? rcu_is_watching+0x16/0xd0 [ 9.973397][ T166] ? lock_acquire+0x13c/0x160 [ 9.973400][ T166] console_flush_one_record+0x46f/0x710 [ 9.973405][ T166] ? console_emit_next_record+0x4c0/0x4c0 [ 9.973406][ T166] ? __lock_acquire+0x518/0xc20 [ 9.973412][ T166] console_unlock+0xee/0x1f0 [ 9.973414][ T166] ? console_flush_one_record+0x710/0x710 [ 9.973416][ T166] ? rcu_is_watching+0x16/0xd0 [ 9.973419][ T166] ? lock_acquire+0x60/0x160 [ 9.973422][ T166] ? __down_trylock_console_sem+0x5e/0xa0 [ 9.973424][ T166] ? vprintk_emit+0x320/0x3e0 [ 9.973427][ T166] vprintk_emit+0x37c/0x3e0 [ 9.973431][ T166] ? wake_up_klogd_work_func+0x90/0x90 [ 9.973434][ T166] ? __lock_release.isra.0+0x69/0x1a0 [ 9.973438][ T166] _printk+0xc7/0x100 [ 9.973441][ T166] ? snapshot_read.cold+0x21/0x21 [ 9.973443][ T166] ? ___ratelimit+0x4e7/0xa00 [ 9.973449][ T166] ? idr_get_free+0x830/0x830 [ 9.973454][ T166] tcp_ao_add_cmd.cold+0x82/0xa8 [ 9.973465][ T166] ? tcp_ao_cache_traffic_keys.isra.0+0x800/0x800 [ 9.973469][ T166] ? rcu_lockdep_current_cpu_online+0x3f/0x1b0 [ 9.973471][ T166] ? trace_raw_output_rcu_invoke_kfree_bulk_callback+0x52/0x130 [ 9.973475][ T166] ? rcu_lockdep_current_cpu_online+0x3f/0x1b0 [ 9.973487][ T166] ? __lock_release.isra.0+0x69/0x1a0 [ 9.973489][ T166] ? mark_held_locks+0x40/0x70 [ 9.973494][ T166] do_tcp_setsockopt+0x163a/0x2880 [ 9.973498][ T166] ? tcp_sock_set_maxseg+0x80/0x80 [ 9.973501][ T166] ? _copy_from_user+0x42/0x90 [ 9.973505][ T166] ? rcu_lockdep_current_cpu_online+0x3f/0x1b0 [ 9.973508][ T166] ? rcu_read_lock_any_held+0x30/0x90 [ 9.973511][ T166] ? lockdep_hardirqs_on_prepare.part.0+0x110/0x160 [ 9.973514][ T166] ? mark_usage+0x61/0x170 [ 9.973516][ T166] ? __lock_acquire+0x518/0xc20 [ 9.973522][ T166] do_sock_setsockopt+0x115/0x490 [ 9.973525][ T166] ? __lock_release.isra.0+0x69/0x1a0 [ 9.973528][ T166] ? put_user_ifreq+0x90/0x90 [ 9.973531][ T166] ? __fget_files+0x1e3/0x460 [ 9.973537][ T166] __sys_setsockopt+0xe4/0x150 [ 9.973542][ T166] __x64_sys_setsockopt+0xbd/0x180 [ 9.973544][ T166] ? trace_irq_enable.constprop.0+0x9b/0x160 [ 9.973548][ T166] ? lockdep_hardirqs_on+0x91/0x130 [ 9.973549][ T166] ? do_syscall_64+0xa6/0x530 [ 9.973552][ T166] do_syscall_64+0xff/0x530 [ 9.973554][ T166] ? irq_exit_rcu+0x1a/0x30 [ 9.973558][ T166] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 9.973560][ T166] RIP: 0033:0x7f7b089d32de [ 9.973565][ 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 [ 9.973567][ T166] RSP: 002b:00007fffc3b2f198 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 9.973570][ T166] RAX: ffffffffffffffda RBX: 0000000000412632 RCX: 00007f7b089d32de [ 9.973571][ T166] RDX: 0000000000000026 RSI: 0000000000000006 RDI: 0000000000000009 [ 9.973572][ T166] RBP: 00000000000000c8 R08: 0000000000000120 R09: 0000000000000000 [ 9.973573][ T166] R10: 00007fffc3b2f1b0 R11: 0000000000000246 R12: 000000000101000a [ 9.973574][ T166] R13: 0000000000000082 R14: 0000000000000045 R15: 00007f7afc000e30 [ 9.973581][ T166] [ 10.005079][ T166] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 10.005537][ T166] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 10.005891][ T166] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 10.006322][ T166] TCP: AO key ifindex 200 != sk bound ifindex 2