Kernel panic at lpfc_dev_loss_tmo_callbk() with NULL pointer dereference after FC link down and up

Solution Verified - Updated -

Issue

  • The system panicked with a NULL pointer dereference in lpfc_dev_loss_tmo_callbk() after the FC links of an lpfc HBA went down and came back up.
[  389.807380]  rport-6:0-6: blocked FC remote port time out: removing rport
[  389.807386]  rport-6:0-4: blocked FC remote port time out: removing rport
[  389.807388]  rport-6:0-5: blocked FC remote port time out: removing rport
[  389.807390]  rport-6:0-3: blocked FC remote port time out: removing rport
[  389.807391]  rport-6:0-2: blocked FC remote port time out: removing rport
[  389.807393]  rport-6:0-1: blocked FC remote port time out: removing rport
[  389.807394]  rport-6:0-0: blocked FC remote port time out: removing rport
[  389.807397] **** lpfc_rport_invalid: Null vport on ndlp xff2377d8866cf200, DID xfffc01 rport xff2377d8866da000 SID xffffffff
[  389.807402] BUG: kernel NULL pointer dereference, address: 0000000000000000
[  389.807403] #PF: supervisor read access in kernel mode
[  389.807404] #PF: error_code(0x0000) - not-present page
[  389.807406] PGD c124d59067 P4D 0 
[  389.807408] Oops: 0000 [#1] PREEMPT SMP NOPTI
[  389.807410] CPU: 48 PID: 997 Comm: kworker/48:1 Kdump: loaded Not tainted 5.14.0-570.119.1.el9_6.x86_64 #1
[  389.807412] Hardware name: Dell Inc. PowerEdge R7725/0KRFPX, BIOS 1.7.6 05/04/2026
[  389.807413] Workqueue: fc_wq_6 fc_rport_final_delete [scsi_transport_fc]
[  389.807423] RIP: 0010:lpfc_dev_loss_tmo_callbk+0x54/0x420 [lpfc]
[  389.807443] Code: 01 00 00 0f b7 8d b4 00 00 00 48 c7 c2 58 d4 12 c1 48 89 fb 44 8b 8d 98 00 00 00 44 8b 85 a0 00 00 00 be 80 00 00 00 4c 89 e7 <4d> 8b 2c 24 e8 93 04 04 00 48 8b 95 10 01 00 00 8b 82 2c 03 00 00
[  389.807443] RSP: 0018:ff5f8ea41b553e20 EFLAGS: 00010286
[  389.807445] RAX: ff2377d8866da538 RBX: ff2377d8866da000 RCX: 000000000000ffff
[  389.807446] RDX: ffffffffc112d458 RSI: 0000000000000080 RDI: 0000000000000000
[  389.807446] RBP: ff2377d8866cf200 R08: 0000000000fffc01 R09: 0000000000000000
[  389.807447] R10: ff5f8ea41b553d00 R11: ffffffffaa3e1888 R12: 0000000000000000
[  389.807447] R13: ff2377d8866da000 R14: ff237894c4426000 R15: 0000000000000000
[  389.807448] FS:  0000000000000000(0000) GS:ff2379579d400000(0000) knlGS:0000000000000000
[  389.807448] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  389.807449] CR2: 0000000000000000 CR3: 000000030940e004 CR4: 0000000000771ef0
[  389.807449] PKRU: 55555554
[  389.807450] Call Trace:
[  389.807451]  <TASK>
[  389.807453]  ? show_trace_log_lvl+0x1c4/0x2df
[  389.807458]  ? show_trace_log_lvl+0x1c4/0x2df
[  389.807460]  ? fc_rport_final_delete+0xe7/0x1b0 [scsi_transport_fc]
[  389.807463]  ? __die_body.cold+0x8/0xd
[  389.807464]  ? page_fault_oops+0x134/0x170
[  389.807467]  ? _prb_read_valid+0x81/0xe0
[  389.807470]  ? exc_page_fault+0x62/0x150
[  389.807472]  ? asm_exc_page_fault+0x22/0x30
[  389.807477]  ? lpfc_dev_loss_tmo_callbk+0x54/0x420 [lpfc]
[  389.807487]  fc_rport_final_delete+0xe7/0x1b0 [scsi_transport_fc]
[  389.807491]  process_one_work+0x194/0x380
[  389.807494]  worker_thread+0x2fe/0x410
[  389.807496]  ? __pfx_worker_thread+0x10/0x10
[  389.807497]  kthread+0xdd/0x100
[  389.807498]  ? __pfx_kthread+0x10/0x10
[  389.807499]  ret_from_fork+0x29/0x50
[  389.807502]  </TASK>
[...]
[  389.807550] CR2: 0000000000000000

Environment

  • Red Hat Enterprise Linux 8.6 8.8, 8.10
  • Red Hat Enterprise Linux 9.2, 9.4, 9.6, 9.8, 9.9, 9.10
  • Red Hat Enterprise Linux 10.0, 10.2, 10.3
  • Seen on 9.6.z kernel-5.14.0-570.119.1.el9_6 but not limited
  • Emulex (Broadcom) FC HBA with the lpfc driver, connected to an FC switch

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content