ice: Don't double unplug aux on peer initiated reset
Subsystems (2)
PATCH 1/1 ice: Don't double unplug aux on peer initiated reset
In the IDC callback that is accessed when the aux drivers request a reset, the function to unplug the aux devices is called. This function is also called in the ice_prepare_for_reset function. This double call is causing a NULL pointer dereference.
The correct place to unplug the aux devices for a reset is in the prepare_for_reset function, as this is a common place for all reset flows. It also has built in protection from being called twice in a single reset instance before the aux devices are replugged.
--- drivers/net/ethernet/intel/ice/ice_main.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/intel/ice/ice_main.c +0 -2
@@ -2397,8 +2397,6 @@ int ice_schedule_reset(struct ice_pf *pf, enum ice_reset_req reset)return -EBUSY ; } -ice_unplug_aux_dev (pf); -switch (reset) {case ICE_RESET_PFR :set_bit (ICE_PFR_REQ , pf->state);
Signature · 6 lines
2.35.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 3 lines · Dave Ertman
In the IDC callback that is accessed when the aux drivers request a reset, the function to unplug the aux devices is called. This function is also called in the
ice_prepare_for_resetfunction. This double call is causing
nit: double space after dot
Quoted 1 line
a NULL pointer dereference.
Can you include the splat related to this null ptr deref? it's always a good practice.
Quoted 32 lines
The correct place to unplug the aux devices for a reset is in the
prepare_for_resetfunction, as this is a common place for all reset flows. It also has built in protection from being called twice in a single reset instance before the aux devices are replugged.Fixes f9f5301e7e2d4 ("ice: Register auxiliary device to provide RDMA")Signed-off-by Dave Ertman <[email protected]>--- drivers/net/ethernet/intel/ice/ice_main.c | 2 -- 1 file changed, 2 deletions(-)drivers/net/ethernet/intel/ice/ice_main.c +0
-2@@ -2397,8 +2397,6 @@ int ice_schedule_reset(struct ice_pf *pf, enum ice_reset_req reset)return -EBUSY ; } -ice_unplug_aux_dev (pf); -switch (reset) {case ICE_RESET_PFR :set_bit (ICE_PFR_REQ , pf->state);Signature · 6 lines
2.35.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan