четверг

[Bug 2140514] Re: [SRU] Fix ice PTP crash on suspend/resume

** Tags added: kernel-daily-bug

--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/2140514

Title:
[SRU] Fix ice PTP crash on suspend/resume

Status in HWE Next:
In Progress
Status in linux package in Ubuntu:
Confirmed
Status in linux-oem-6.17 package in Ubuntu:
Invalid
Status in linux source package in Noble:
Confirmed
Status in linux-oem-6.17 source package in Noble:
In Progress
Status in linux source package in Questing:
Confirmed
Status in linux-oem-6.17 source package in Questing:
Invalid
Status in linux source package in Resolute:
Confirmed
Status in linux-oem-6.17 source package in Resolute:
Invalid

Bug description:
SRU Justification:

[ Impact ]

Intel E810 network adapters experience kernel NULL pointer dereference
crashes during system resume when PTP is enabled. This occurs due to a
race condition where PTP periodic work attempts to access vsi->rx_rings
while VSI structures are being rebuilt, causing system instability and
potential data loss during suspend/resume cycles.

The crash occurs in this sequence:
1. System suspend triggers ice_ptp_prepare_for_reset() which cancels PTP work
2. ice_ptp_rebuild() immediately queues PTP work before VSI rebuild
3. PTP work executes and accesses NULL vsi->rx_rings
4. System crashes with NULL pointer dereference

[ Fix ]

Cherry-pick upstream commit:
- 8be3a229a6112 ("ice: Fix PTP NULL pointer dereference during VSI rebuild")
from https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git dev-queue

The fix keeps PTP work cancelled during rebuild and only queues it after
VSI rebuild completes. Adds ice_ptp_queue_work() helper function to
encapsulate proper timing of PTP work queue.

[ Test Plan ]

1. System with Intel E810 network adapter (ice driver)
2. Enable PTP: ptp4l -i <interface> -m
3. Suspend system: systemctl suspend
4. Resume system
5. Verify no kernel crash in dmesg (check for NULL pointer dereference in ice_ptp_update_cached_phctime)
6. Verify network connectivity restored: ping <target>
7. Verify PTP synchronization working: ptp4l shows proper sync
8. Repeat suspend/resume cycle multiple times to ensure stability

[ Where problems could occur ]

The patch changes when PTP work is queued during VSI rebuild. If there's
an error in the timing logic, PTP synchronization might be delayed after
resume, though the delay would be minimal (sub-second).

Risk is very low because:
- The fix only affects the suspend/resume path, not normal operation
- PTP work is still queued, just at the correct time (after VSI rebuild)
- The helper function includes proper state checking (ICE_PTP_READY)
- Change is isolated to PTP subsystem

[ Other Info ]

This issue affects systems using Intel E810 NICs with PTP enabled,
particularly in environments requiring frequent suspend/resume cycles
(laptops, power-managed servers).

The upstream commit is in the Intel Wired LAN maintainer's tree
(next-queue) and expected to be merged to mainline in the next cycle.

To manage notifications about this bug go to:
https://bugs.launchpad.net/hwe-next/+bug/2140514/+subscriptions

Комментариев нет:

Отправить комментарий