[ 9.130656][ T167] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 9.130712][ T167] BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:322 [ 9.130714][ T167] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 167, name: key-management_ [ 9.130716][ T167] preempt_count: 1, expected: 0 [ 9.130717][ T167] RCU nest depth: 0, expected: 0 [ 9.130718][ T167] locks held by key-management_/167: 5, last CPU#3: [ 9.130720][ T167] #0: ff11000017021d90 (sk_lock-AF_INET){+.+.}-{0:0}, at: do_tcp_setsockopt+0xaf1/0x2880 [ 9.130732][ T167] #1: ffffffff9a579cc0 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x320/0x3e0 [ 9.130738][ T167] #2: ffffffff9a579d38 (console_srcu){....}-{0:0}, at: console_flush_one_record+0x106/0x710 [ 9.130742][ T167] #3: ffffffff9a499660 (console_owner){....}-{0:0}, at: console_lock_spinning_enable+0x40/0x60 [ 9.130746][ T167] #4: ffffffff9a499560 (printk_legacy_map-wait-type-override){....}-{3:3}, at: console_emit_next_record+0x1df/0x4c0 [ 9.130749][ T167] irq event stamp: 281834 [ 9.130750][ T167] hardirqs last enabled at (281833): [] __down_trylock_console_sem+0x86/0xa0 [ 9.130753][ T167] hardirqs last disabled at (281834): [] console_emit_next_record+0x3d4/0x4c0 [ 9.130754][ T167] softirqs last enabled at (281826): [] do_tcp_setsockopt+0xaf1/0x2880 [ 9.130756][ T167] softirqs last disabled at (281824): [] lock_sock_nested+0x54/0xf0 [ 9.130760][ T167] Preemption disabled at: [ 9.130761][ T167] [] vprintk_emit+0x31b/0x3e0 [ 9.130766][ T167] CPU: 3 UID: 0 PID: 167 Comm: key-management_ Tainted: G W 7.2.0-virtme #1 PREEMPT(full) [ 9.130769][ T167] Tainted: [W]=WARN [ 9.130771][ T167] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 9.130772][ T167] Call Trace: [ 9.130774][ T167] [ 9.130775][ T167] dump_stack_lvl+0x6f/0xa0 [ 9.130781][ T167] ? vprintk_emit+0x31b/0x3e0 [ 9.130783][ T167] __might_resched.cold+0x1fe/0x2c1 [ 9.130787][ T167] ? perf_trace_sched_switch+0x7c0/0x7c0 [ 9.130793][ T167] ? __kmalloc_noprof+0xdb/0x760 [ 9.130799][ T167] __kmalloc_noprof+0x443/0x760 [ 9.130802][ T167] ? alloc_buf.isra.0+0x4b/0x260 [ 9.130807][ T167] ? do_raw_spin_unlock+0x59/0x250 [ 9.130810][ T167] alloc_buf.isra.0+0x4b/0x260 [ 9.130813][ T167] put_chars+0x1e1/0x2f0 [ 9.130816][ T167] ? check_prev_add+0x316/0xe90 [ 9.130818][ T167] ? __send_to_port+0x420/0x420 [ 9.130821][ T167] ? validate_chain+0x34a/0xc20 [ 9.130826][ T167] hvc_console_print+0x292/0x780 [ 9.130832][ T167] ? hvc_write+0x3a0/0x3a0 [ 9.130835][ T167] ? rcu_is_watching+0x16/0xd0 [ 9.130839][ T167] ? lock_acquire+0x13c/0x160 [ 9.130842][ T167] console_emit_next_record+0x22f/0x4c0 [ 9.130846][ T167] ? devkmsg_read+0x4b0/0x4b0 [ 9.130848][ T167] ? console_flush_one_record+0x106/0x710 [ 9.130851][ T167] ? rcu_is_watching+0x16/0xd0 [ 9.130853][ T167] ? lock_acquire+0x13c/0x160 [ 9.130857][ T167] console_flush_one_record+0x46f/0x710 [ 9.130861][ T167] ? console_emit_next_record+0x4c0/0x4c0 [ 9.130863][ T167] ? __lock_acquire+0x518/0xc20 [ 9.130868][ T167] console_unlock+0xee/0x1f0 [ 9.130871][ T167] ? console_flush_one_record+0x710/0x710 [ 9.130872][ T167] ? rcu_is_watching+0x16/0xd0 [ 9.130875][ T167] ? lock_acquire+0x60/0x160 [ 9.130878][ T167] ? __down_trylock_console_sem+0x5e/0xa0 [ 9.130880][ T167] ? vprintk_emit+0x320/0x3e0 [ 9.130883][ T167] vprintk_emit+0x37c/0x3e0 [ 9.130886][ T167] ? wake_up_klogd_work_func+0x90/0x90 [ 9.130889][ T167] ? __lock_release.isra.0+0x69/0x1a0 [ 9.130893][ T167] _printk+0xc7/0x100 [ 9.130897][ T167] ? snapshot_read.cold+0x21/0x21 [ 9.130898][ T167] ? ___ratelimit+0x4e7/0xa00 [ 9.130904][ T167] ? idr_get_free+0x830/0x830 [ 9.130908][ T167] tcp_ao_add_cmd.cold+0x82/0xa8 [ 9.130913][ T167] ? tcp_ao_cache_traffic_keys.isra.0+0x800/0x800 [ 9.130916][ T167] ? rcu_lockdep_current_cpu_online+0x3f/0x1b0 [ 9.130919][ T167] ? trace_raw_output_rcu_invoke_kfree_bulk_callback+0x52/0x130 [ 9.130922][ T167] ? rcu_lockdep_current_cpu_online+0x3f/0x1b0 [ 9.130934][ T167] ? __lock_release.isra.0+0x69/0x1a0 [ 9.130936][ T167] ? mark_held_locks+0x40/0x70 [ 9.130940][ T167] do_tcp_setsockopt+0x163a/0x2880 [ 9.130944][ T167] ? tcp_sock_set_maxseg+0x80/0x80 [ 9.130947][ T167] ? _copy_from_user+0x42/0x90 [ 9.130951][ T167] ? rcu_lockdep_current_cpu_online+0x3f/0x1b0 [ 9.130954][ T167] ? rcu_read_lock_any_held+0x30/0x90 [ 9.130956][ T167] ? lockdep_hardirqs_on_prepare.part.0+0x110/0x160 [ 9.130959][ T167] ? mark_usage+0x61/0x170 [ 9.130961][ T167] ? __lock_acquire+0x518/0xc20 [ 9.130967][ T167] do_sock_setsockopt+0x115/0x490 [ 9.130970][ T167] ? __lock_release.isra.0+0x69/0x1a0 [ 9.130972][ T167] ? put_user_ifreq+0x90/0x90 [ 9.130976][ T167] ? __fget_files+0x1e3/0x460 [ 9.130981][ T167] __sys_setsockopt+0xe4/0x150 [ 9.130986][ T167] __x64_sys_setsockopt+0xbd/0x180 [ 9.130988][ T167] ? trace_irq_enable.constprop.0+0x9b/0x160 [ 9.130991][ T167] ? lockdep_hardirqs_on+0x91/0x130 [ 9.130993][ T167] ? do_syscall_64+0xa6/0x530 [ 9.130996][ T167] do_syscall_64+0xff/0x530 [ 9.130997][ T167] ? exc_page_fault+0xee/0x100 [ 9.131000][ T167] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 9.131002][ T167] RIP: 0033:0x7fbaca6ca2de [ 9.131006][ T167] 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.131008][ T167] RSP: 002b:00007ffde6cbf5f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 9.131010][ T167] RAX: ffffffffffffffda RBX: 0000000000412850 RCX: 00007fbaca6ca2de [ 9.131012][ T167] RDX: 0000000000000026 RSI: 0000000000000006 RDI: 0000000000000009 [ 9.131013][ T167] RBP: 00000000000000c8 R08: 0000000000000120 R09: 0000000000000000 [ 9.131014][ T167] R10: 00007ffde6cbf610 R11: 0000000000000246 R12: 000000000101000a [ 9.131015][ T167] R13: 0000000000000082 R14: 0000000000000038 R15: 00007fbabc000e30 [ 9.131021][ T167] [ 9.162546][ T167] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 9.162859][ T167] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 9.163217][ T167] TCP: AO key ifindex 200 != sk bound ifindex 2 [ 9.163582][ T167] TCP: AO key ifindex 200 != sk bound ifindex 2