[Impact] The system hang after resume from S3. Error logs: kernel: igb 0000:02:00.0: disabling already-disabled device kernel: WARNING: CPU: 0 PID: 277 at drivers/pci/pci.c:2248 pci_disable_device+0xc4/0xf0 kernel: RIP: 0010:pci_disable_device+0xc4/0xf0 kernel: Call Trace: kernel: <TASK> kernel: igb_io_error_detected+0x3e/0x60 kernel: report_error_detected+0xd6/0x1c0 kernel: ? __pfx_report_normal_detected+0x10/0x10 kernel: report_normal_detected+0x16/0x30 kernel: pci_walk_bus+0x74/0xa0 kernel: pcie_do_recovery+0xb9/0x340 kernel: ? __pfx_aer_root_reset+0x10/0x10 kernel: aer_process_err_devices+0x168/0x220 kernel: aer_isr+0x1b5/0x1e0 kernel: ? __pfx_irq_thread_fn+0x10/0x10 kernel: irq_thread_fn+0x21/0x70 kernel: irq_thread+0xf8/0x1c0 kernel: ? __pfx_irq_thread_dtor+0x10/0x10 kernel: ? __pfx_irq_thread+0x10/0x10 kernel: kthread+0xef/0x120 kernel: ? __pfx_kthread+0x10/0x10 kernel: ret_from_fork+0x29/0x50 kernel: </TASK> kernel: ---[ end trace 0000000000000000 ]---
[Fix] The pci io error detected ops is called before the driver resumed. Avoid this race condition to fix the issue.
[Test] Tested on hardware, the system suspend/resume OK.
[Where problems could occur] It may break igb driver.
The commit is included in 6.5-rc1, SRU for Jammy, Lunar and OEM-6.1
[Impact] pci/pci. c:2248 pci_disable_ device+ 0xc4/0xf0 disable_ device+ 0xc4/0xf0 error_detected+ 0x3e/0x60 error_detected+ 0xd6/0x1c0 normal_ detected+ 0x10/0x10 normal_ detected+ 0x16/0x30 bus+0x74/ 0xa0 recovery+ 0xb9/0x340 root_reset+ 0x10/0x10 err_devices+ 0x168/0x220 thread_ fn+0x10/ 0x10 fn+0x21/ 0x70 0xf8/0x1c0 thread_ dtor+0x10/ 0x10 thread+ 0x10/0x10 0x10/0x10 fork+0x29/ 0x50
The system hang after resume from S3.
Error logs:
kernel: igb 0000:02:00.0: disabling already-disabled device
kernel: WARNING: CPU: 0 PID: 277 at drivers/
kernel: RIP: 0010:pci_
kernel: Call Trace:
kernel: <TASK>
kernel: igb_io_
kernel: report_
kernel: ? __pfx_report_
kernel: report_
kernel: pci_walk_
kernel: pcie_do_
kernel: ? __pfx_aer_
kernel: aer_process_
kernel: aer_isr+0x1b5/0x1e0
kernel: ? __pfx_irq_
kernel: irq_thread_
kernel: irq_thread+
kernel: ? __pfx_irq_
kernel: ? __pfx_irq_
kernel: kthread+0xef/0x120
kernel: ? __pfx_kthread+
kernel: ret_from_
kernel: </TASK>
kernel: ---[ end trace 0000000000000000 ]---
[Fix]
The pci io error detected ops is called before the driver resumed.
Avoid this race condition to fix the issue.
[Test]
Tested on hardware, the system suspend/resume OK.
[Where problems could occur]
It may break igb driver.
The commit is included in 6.5-rc1, SRU for Jammy, Lunar and OEM-6.1