> -----Original Message----- > From: Sergey Temerkhanov <[email protected]> > Sent: Tuesday, October 13, 2026 2:12 AM > To: [email protected] > Subject: [PATCH RESEND iwl-net v6 1/7] ice: Protect the control PF pointer > with RCU and a rwsem > > Mark adapter->ctrl_pf as __rcu and route every reader through > rcu_dereference_check(), publishing it with rcu_assign_pointer(). Readers > that can run in an RCU read-side critical section are wrapped accordingly. > > Add adapter->ctrl_pf_lock for the sleepable users which cannot sit in an RCU > read-side critical section, namely the PTP hardware semaphore in > ice_ptp_lock()/ice_ptp_unlock() and the TX reference clock paths in > ice_txclk.c. Pass the resolved control PF into ice_txclk_enable_peer() so it > is looked up once under that lock. > > The pointer is still only ever published and never cleared, so there is no > functional change here. This only puts the annotations and the locking in > place for the lifetime handling that follows. > > Signed-off-by: Sergey Temerkhanov <[email protected]> > Reviewed-by: Arkadiusz Kubalewski <[email protected]> > Reviewed-by: Aleksandr Loktionov <[email protected]> > --- > drivers/net/ethernet/intel/ice/ice.h | 25 +++++- > drivers/net/ethernet/intel/ice/ice_adapter.c | 1 + > drivers/net/ethernet/intel/ice/ice_adapter.h | 5 +- > drivers/net/ethernet/intel/ice/ice_ptp.c | 82 +++++++++++++------- > drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 23 ++++++ > drivers/net/ethernet/intel/ice/ice_txclk.c | 20 +++-- > 6 files changed, 119 insertions(+), 37 deletions(-)
Tested-by: Alexander Nowlin <[email protected]>
