RE: [Intel-wired-lan] [PATCH net] ice: fix PTP Call Trace during PTP release
From: Rinitha, SX <hidden>
Date: 2026-06-02 16:39:02
Also in:
intel-wired-lan
-----Original Message-----
From: Intel-wired-lan <redacted> On Behalf Of Aleksandr Loktionov
Sent: 27 March 2026 12:53
To: intel-wired-lan@lists.osuosl.org; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Loktionov, Aleksandr <redacted>
Cc: netdev@vger.kernel.org; Greenwalt, Paul <redacted>
Subject: [Intel-wired-lan] [PATCH net] ice: fix PTP Call Trace during PTP release
From: Paul Greenwalt <redacted>
If a PF reset occurs when the PTP state is ICE_PTP_UNINIT, then
ice_ptp_rebuild() will update the state to ICE_PTP_ERROR. This will result in the following PTP release call trace during driver unload:
kernel BUG at lib/list_debug.c:52!
ice_ptp_release+0x332/0x3c0 [ice]
ice_deinit_features.part.0+0x10e/0x120 [ice]
ice_remove+0x100/0x220 [ice]
This was observed when passing PF1 through to a VM. ice_ptp_init() fails because ctrl_pf is NULL and sets the state to ICE_PTP_UNINIT.
Fix by detecting the ICE_PTP_UNINIT state in ice_ptp_rebuild() and returning without error, preventing the invalid state transition to ICE_PTP_ERROR. The only valid path to ICE_PTP_ERROR is from ICE_PTP_RESETTING after a failed rebuild.
Fixes: 8293e4cb2ff5 ("ice: introduce PTP state machine")
Cc: stable@vger.kernel.org
Signed-off-by: Paul Greenwalt <redacted>
Signed-off-by: Aleksandr Loktionov <redacted>
---
drivers/net/ethernet/intel/ice/ice_ptp.c | 5 +++++
1 file changed, 5 insertions(+)Tested-by: Rinitha S <redacted> (A Contingent worker at Intel)