Bug 179891

Summary: Kernel oops/panic trying to unload qla2xxx driver
Product: SCSI Drivers Reporter: himanshu.madhani (himanshu.madhani@qlogic.com)
Component: QLOGIC QLA2XXXAssignee: drivers_other
Status: NEW ---    
Severity: high CC: szg00000
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.7.3 Subsystem:
Regression: No Bisected commit-id:

Description himanshu.madhani@cavium.com 2016-10-21 18:54:53 UTC
Hello, 

I am getting kernel panic trying to unload qla2xxx driver. Stack trace indicates driver is trying to remove "node_name" and "port_name" sysfs attributes.

Oct 21 11:13:15 dut5108 kernel: [70633.103113] ------------[ cut here ]------------
Oct 21 11:13:15 dut5108 kernel: [70633.103142] WARNING: CPU: 6 PID: 39232 at fs/kernfs/dir.c:1455 kernfs_remove_by_name_ns+0x8b/0xa0
Oct 21 11:13:15 dut5108 kernel: [70633.103145] kernfs: can not remove 'node_name', no directory
Oct 21 11:13:15 dut5108 kernel: [70633.103146] Modules linked in: scst_qla2xxx(O) scst_vdisk(OE) scst(OE) dlm qla2xxx(O) libcrc32c configfs scsi_transport_fc xt_tcpudp ip6table_filter ip6_tables iptable_filter ip_tables x_tables appletalk ipx p8023 p8022 psnap llc intel_rapl sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel ipmi_ssif serio_raw aes_x86_64 lrw gf128mul ipmi_si glue_helper hpilo ioatdma ablk_helper acpi_power_meter ipmi_msghandler cryptd dca lpc_ich mac_hid autofs4 tg3 hpsa ptp psmouse scsi_transport_sas pata_acpi pps_core wmi [last unloaded: dlm]
Oct 21 11:13:15 dut5108 kernel: [70633.103226] CPU: 6 PID: 39232 Comm: kworker/6:2 Tainted: G      D    OE   4.7.3 #1
Oct 21 11:13:15 dut5108 kernel: [70633.103228] Hardware name: HP ProLiant DL380p Gen8, BIOS P70 03/01/2013
Oct 21 11:13:15 dut5108 kernel: [70633.103240] Workqueue: fc_wq_6 fc_starget_delete [scsi_transport_fc]
Oct 21 11:13:15 dut5108 kernel: [70633.103243]  0000000000000286 000000007cc8b0fb ffff880ff22efbe0 ffffffff813e4403
Oct 21 11:13:15 dut5108 kernel: [70633.103261]  ffff880ff22efc30 0000000000000000 ffff880ff22efc20 ffffffff8108091b
Oct 21 11:13:15 dut5108 kernel: [70633.103266]  000005aff22efc98 0000000000000001 ffffffffc01f7b15 ffff881fda83f1e0
Oct 21 11:13:15 dut5108 kernel: [70633.103271] Call Trace:
Oct 21 11:13:15 dut5108 kernel: [70633.103279]  [<ffffffff813e4403>] dump_stack+0x63/0x90
Oct 21 11:13:15 dut5108 kernel: [70633.103286]  [<ffffffff8108091b>] __warn+0xcb/0xf0
Oct 21 11:13:15 dut5108 kernel: [70633.103291]  [<ffffffff8108099f>] warn_slowpath_fmt+0x5f/0x80
Oct 21 11:13:15 dut5108 kernel: [70633.103296]  [<ffffffff811f9e2a>] ? __slab_free+0x9a/0x2d0
Oct 21 11:13:15 dut5108 kernel: [70633.103301]  [<ffffffff8129c0ab>] kernfs_remove_by_name_ns+0x8b/0xa0
Oct 21 11:13:15 dut5108 kernel: [70633.103305]  [<ffffffff8129d965>] sysfs_remove_file_ns+0x15/0x20
Oct 21 11:13:15 dut5108 kernel: [70633.103311]  [<ffffffff8153e2b9>] device_remove_file+0x19/0x20
Oct 21 11:13:15 dut5108 kernel: [70633.103316]  [<ffffffff815487fe>] attribute_container_remove_attrs+0x4e/0x70
Oct 21 11:13:15 dut5108 kernel: [70633.103321]  [<ffffffff81548932>] attribute_container_class_device_del+0x12/0x20
Oct 21 11:13:15 dut5108 kernel: [70633.103325]  [<ffffffff81548b2e>] transport_remove_classdev+0x4e/0x60
Oct 21 11:13:15 dut5108 kernel: [70633.103330]  [<ffffffff81548ae0>] ? transport_add_class_device+0x40/0x40
Oct 21 11:13:15 dut5108 kernel: [70633.103334]  [<ffffffff8154851e>] attribute_container_device_trigger+0xce/0xe0
Oct 21 11:13:15 dut5108 kernel: [70633.103633]  [<ffffffff81548a95>] transport_remove_device+0x15/0x20
Oct 21 11:13:15 dut5108 kernel: [70633.103643]  [<ffffffff815a8b35>] scsi_target_reap_ref_release+0x25/0x40
Oct 21 11:13:15 dut5108 kernel: [70633.103648]  [<ffffffff815aa22c>] scsi_target_reap+0x2c/0x30
Oct 21 11:13:15 dut5108 kernel: [70633.103651]  [<ffffffff815acf18>] scsi_remove_target+0x198/0x1e0
Oct 21 11:13:15 dut5108 kernel: [70633.103658]  [<ffffffffc01f20a2>] fc_starget_delete+0x22/0x30 [scsi_transport_fc]
Oct 21 11:13:15 dut5108 kernel: [70633.103665]  [<ffffffff8109a94b>] process_one_work+0x16b/0x480
Oct 21 11:13:15 dut5108 kernel: [70633.103669]  [<ffffffff8109acab>] worker_thread+0x4b/0x500
Oct 21 11:13:15 dut5108 kernel: [70633.103697]  [<ffffffff8109ac60>] ? process_one_work+0x480/0x480
Oct 21 11:13:15 dut5108 kernel: [70633.103702]  [<ffffffff8109ac60>] ? process_one_work+0x480/0x480
Oct 21 11:13:15 dut5108 kernel: [70633.103706]  [<ffffffff810a0eb8>] kthread+0xd8/0xf0
Oct 21 11:13:15 dut5108 kernel: [70633.103713]  [<ffffffff8182905f>] ret_from_fork+0x1f/0x40
Oct 21 11:13:15 dut5108 kernel: [70633.103717]  [<ffffffff810a0de0>] ? kthread_create_on_node+0x1a0/0x1a0
Oct 21 11:13:15 dut5108 kernel: [70633.103720] ---[ end trace 7203c37c9de82e22 ]---
Oct 21 11:13:15 dut5108 kernel: [70633.103723] ------------[ cut here ]------------
Oct 21 11:13:15 dut5108 kernel: [70633.103728] WARNING: CPU: 6 PID: 39232 at fs/kernfs/dir.c:1455 kernfs_remove_by_name_ns+0x8b/0xa0
Oct 21 11:13:15 dut5108 kernel: [70633.103730] kernfs: can not remove 'port_name', no directory
Oct 21 11:13:15 dut5108 kernel: [70633.103732] Modules linked in: scst_qla2xxx(O) scst_vdisk(OE) scst(OE) dlm qla2xxx(O) libcrc32c configfs scsi_transport_fc xt_tcpudp ip6table_filter ip6_tables iptable_filter ip_tables x_tables appletalk ipx p8023 p8022 psnap llc intel_rapl sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel ipmi_ssif serio_raw aes_x86_64 lrw gf128mul ipmi_si glue_helper hpilo ioatdma ablk_helper acpi_power_meter ipmi_msghandler cryptd dca lpc_ich mac_hid autofs4 tg3 hpsa ptp psmouse scsi_transport_sas pata_acpi pps_core wmi [last unloaded: dlm]
Oct 21 11:13:15 dut5108 kernel: [70633.103783] CPU: 6 PID: 39232 Comm: kworker/6:2 Tainted: G      D W  OE   4.7.3 #1
Oct 21 11:13:15 dut5108 kernel: [70633.103785] Hardware name: HP ProLiant DL380p Gen8, BIOS P70 03/01/2013
Oct 21 11:13:15 dut5108 kernel: [70633.103791] Workqueue: fc_wq_6 fc_starget_delete [scsi_transport_fc]
Oct 21 11:13:15 dut5108 kernel: [70633.103793]  0000000000000286 000000007cc8b0fb ffff880ff22efbe0 ffffffff813e4403
Oct 21 11:13:15 dut5108 kernel: [70633.103798]  ffff880ff22efc30 0000000000000000 ffff880ff22efc20 ffffffff8108091b
Oct 21 11:13:15 dut5108 kernel: [70633.103802]  000005aff22efc98 0000000000000002 ffffffffc01f7b0b ffff881fda83f1e0
Oct 21 11:13:15 dut5108 kernel: [70633.103806] Call Trace:
Oct 21 11:13:15 dut5108 kernel: [70633.103811]  [<ffffffff813e4403>] dump_stack+0x63/0x90
Oct 21 11:13:15 dut5108 kernel: [70633.103816]  [<ffffffff8108091b>] __warn+0xcb/0xf0
Oct 21 11:13:15 dut5108 kernel: [70633.103821]  [<ffffffff8108099f>] warn_slowpath_fmt+0x5f/0x80
Oct 21 11:13:15 dut5108 kernel: [70633.103825]  [<ffffffff811f9e2a>] ? __slab_free+0x9a/0x2d0
Oct 21 11:13:15 dut5108 kernel: [70633.103829]  [<ffffffff8129c0ab>] kernfs_remove_by_name_ns+0x8b/0xa0
Oct 21 11:13:15 dut5108 kernel: [70633.103834]  [<ffffffff8129d965>] sysfs_remove_file_ns+0x15/0x20
Oct 21 11:13:15 dut5108 kernel: [70633.103838]  [<ffffffff8153e2b9>] device_remove_file+0x19/0x20
Oct 21 11:13:15 dut5108 kernel: [70633.103843]  [<ffffffff815487fe>] attribute_container_remove_attrs+0x4e/0x70
Oct 21 11:13:15 dut5108 kernel: [70633.103847]  [<ffffffff81548932>] attribute_container_class_device_del+0x12/0x20
Oct 21 11:13:15 dut5108 kernel: [70633.103852]  [<ffffffff81548b2e>] transport_remove_classdev+0x4e/0x60
Oct 21 11:13:15 dut5108 kernel: [70633.103857]  [<ffffffff81548ae0>] ? transport_add_class_device+0x40/0x40
Oct 21 11:13:15 dut5108 kernel: [70633.103861]  [<ffffffff8154851e>] attribute_container_device_trigger+0xce/0xe0
Oct 21 11:13:15 dut5108 kernel: [70633.103866]  [<ffffffff81548a95>] transport_remove_device+0x15/0x20
Oct 21 11:13:15 dut5108 kernel: [70633.103871]  [<ffffffff815a8b35>] scsi_target_reap_ref_release+0x25/0x40
Oct 21 11:13:15 dut5108 kernel: [70633.103876]  [<ffffffff815aa22c>] scsi_target_reap+0x2c/0x30
Oct 21 11:13:15 dut5108 kernel: [70633.103879]  [<ffffffff815acf18>] scsi_remove_target+0x198/0x1e0
Oct 21 11:13:15 dut5108 kernel: [70633.103886]  [<ffffffffc01f20a2>] fc_starget_delete+0x22/0x30 [scsi_transport_fc]
Oct 21 11:13:15 dut5108 kernel: [70633.103891]  [<ffffffff8109a94b>] process_one_work+0x16b/0x480
Oct 21 11:13:15 dut5108 kernel: [70633.103895]  [<ffffffff8109acab>] worker_thread+0x4b/0x500
Oct 21 11:13:15 dut5108 kernel: [70633.103900]  [<ffffffff8109ac60>] ? process_one_work+0x480/0x480
Oct 21 11:13:15 dut5108 kernel: [70633.103905]  [<ffffffff8109ac60>] ? process_one_work+0x480/0x480
Oct 21 11:13:15 dut5108 kernel: [70633.103909]  [<ffffffff810a0eb8>] kthread+0xd8/0xf0
Oct 21 11:13:15 dut5108 kernel: [70633.103914]  [<ffffffff8182905f>] ret_from_fork+0x1f/0x40
Oct 21 11:13:15 dut5108 kernel: [70633.103918]  [<ffffffff810a0de0>] ? kthread_create_on_node+0x1a0/0x1a0
Oct 21 11:13:15 dut5108 kernel: [70633.103921] ---[ end trace 7203c37c9de82e23 ]---


Any help trying to figure out why driver would be tripping into node_name and port_name sysfs nodes.
Comment 1 himanshu.madhani@cavium.com 2016-10-21 18:56:10 UTC
Please let me know if any other logs are required to understand this interaction issue with sysfs and unload operation.