kernel crash when pfkey module is unloaded

From: sudheer anumolu
Date: Tue Oct 18 2016 - 11:15:05 EST


Hi All

When i remove my pfkey module , i get the following kernel crash.

Can someone tell what could be happening to kernel. None of the stack
trace belongs to my pfkey module.

Kernel : Ubuntu 3.19.0-59 kernel

I made sure that pfkey module wont get any queries from kernel , still
it crashes.

I could see the error "unable to handle kernel paging request" but
want to know how this is could be happening.


# dmesg
[602242.866983] NET: Unregistered protocol family 15
[602242.866986] NET: Registered protocol family 15
[602242.907802] BUG: unable to handle kernel paging request at ffffffffc061e580
[602242.907807] IP: [<ffffffff8169431d>] sock_poll+0x4d/0x120
[602242.907811] PGD 1c19067 PUD 1c1b067 PMD 80bbfc067 PTE 0
[602242.907814] Oops: 0000 [#1] SMP
[602242.907815] Modules linked in: xt_policy xfrm4_mode_tunnel
xfrm_user xfrm4_tunnel tunnel4 ipcomp xfrm_ipcomp ah4
liquidio_ipsec(OE-) authenc esp4 xfrm4_mode_transport deflate ctr
twofish_generic twofish_avx_x86_64 twofish_x86_64_3way twofish_x86_64
twofish_common camellia_generic camellia_aesni_avx_x86_64
camellia_x86_64 serpent_avx_x86_64 serpent_sse2_x86_64 xts
serpent_generic blowfish_generic blowfish_x86_64 blowfish_common
cast5_avx_x86_64 cast5_generic cast_common des3_ede_x86_64 des_generic
cmac xcbc rmd160 crypto_null af_key xfrm_algo ipt_MASQUERADE
nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT
nf_reject_ipv4 xt_CHECKSUM iptable_mangle xt_tcpudp bridge stp llc
ip6table_filter ip6_tables iptable_filter ip_tables ebtable_nat
ebtables x_tables bnep rfcomm bluetooth ipmi_ssif ftdi_sio usbserial
intel_rapl iosf_mbi x86_pkg_temp_thermal intel_powerclamp coretemp
kvm_intel kvm dcdbas crct10dif_pclmul crc32_pclmul aesni_intel
aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd lpc_ich ipmi_si
wmi ipmi_msghandler ie31200_edac 8250_fintek mac_hid edac_core
parport_pc ppdev lp parport hid_generic usbhid hid tg3 ahci ptp
libahci pps_core nvme [last unloaded: pfkey]
[602242.907854] CPU: 1 PID: 16930 Comm: charon Tainted: G OE
3.19.0-59-generic #66~14.04.1-Ubuntu
[602242.907856] Hardware name: Dell Inc. PowerEdge T110 II/0PM2CW,
BIOS 2.8.0 06/24/2014
[602242.907857] task: ffff880809a28000 ti: ffff8807d2bc4000 task.ti:
ffff8807d2bc4000
[602242.907858] RIP: 0010:[<ffffffff8169431d>] [<ffffffff8169431d>]
sock_poll+0x4d/0x120
[602242.907860] RSP: 0018:ffff8807d2bc7ae8 EFLAGS: 00010246
[602242.907860] RAX: ffffffffc061e540 RBX: ffff8807e1f2c000 RCX:
ffff880802c77701
[602242.907861] RDX: ffff8807d2bc7c98 RSI: ffff8807e1f2c000 RDI:
ffff880802c77700
[602242.907862] RBP: ffff8807d2bc7b18 R08: ffff880802c77700 R09:
0000000180240005
[602242.907863] R10: ffffffff81072756 R11: ffffea0002c75600 R12:
ffff880802c77700
[602242.907863] R13: ffff8807d87d5400 R14: 0000000000000000 R15:
ffff8807d2bc7c98
[602242.907865] FS: 00007fc5bf65b700(0000) GS:ffff88083fc40000(0000)
knlGS:0000000000000000
[602242.907866] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[602242.907866] CR2: ffffffffc061e580 CR3: 00000007d1a72000 CR4:
00000000001407e0
[602242.907867] Stack:
[602242.907868] ffff8807d2bc7b18 0000000000000000 0000000000000000
ffff8807d2bc7bc4
[602242.907869] ffff8807d2bc7bac 0000000000000000 ffff8807d2bc7f38
ffffffff81204422
[602242.907871] 00000000000200da 00007fc5bf65ad40 ffff8807d2bc7fd8
ffff880809a28000
[602242.907872] Call Trace:
[602242.907876] [<ffffffff81204422>] do_sys_poll+0x332/0x5b0
[602242.907880] [<ffffffff810ace66>] ? check_preempt_wakeup+0x146/0x240
[602242.907882] [<ffffffff8109f3bd>] ? check_preempt_curr+0x8d/0xa0
[602242.907884] [<ffffffff812030c0>] ? poll_select_copy_remaining+0x130/0x130
[602242.907885] [<ffffffff812030c0>] ? poll_select_copy_remaining+0x130/0x130
[602242.907887] [<ffffffff812030c0>] ? poll_select_copy_remaining+0x130/0x130
[602242.907888] [<ffffffff812030c0>] ? poll_select_copy_remaining+0x130/0x130
[602242.907891] [<ffffffff811ee11e>] ? new_sync_read+0x7e/0xb0
[602242.907893] [<ffffffff811ef318>] ? __vfs_read+0x18/0x50
[602242.907894] [<ffffffff811ef3d6>] ? vfs_read+0x86/0x140
[602242.907896] [<ffffffff81204775>] SyS_poll+0x65/0x100
[602242.907899] [<ffffffff817bdbcd>] system_call_fastpath+0x16/0x1b
[602242.907900] Code: d0 00 00 00 4c 8b 6b 20 41 8b 95 d4 00 00 00 85
d2 74 0b 41 8b 85 d0 00 00 00 85 c0 75 28 48 8b 43 28 4c 89 fa 48 89
de 4c 89 e7 <ff> 50 40 48 83 c4 08 44 09 f0 5b 41 5c 41 5d 41 5e 41 5f
5d c3
[602242.907915] RIP [<ffffffff8169431d>] sock_poll+0x4d/0x120
[602242.907916] RSP <ffff8807d2bc7ae8>
[602242.907917] CR2: ffffffffc061e580
[602242.907919] ---[ end trace 28dc756b8c0cda91 ]---
[602242.970994] PFKEY module is now unloaded



Thanks
Sudheer