* [Intel-wired-lan] [PATCH net] ice: Don't double unplug aux on peer initiated reset
@ 2022-08-08 22:22 Dave Ertman
2022-08-09 8:57 ` Maciej Fijalkowski
0 siblings, 1 reply; 2+ messages in thread
From: Dave Ertman @ 2022-08-08 22:22 UTC (permalink / raw)
To: intel-wired-lan
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.
Fixes: f9f5301e7e2d4 ("ice: Register auxiliary device to provide RDMA")
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index eb40526ee179..9afcf030201e 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -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);
--
2.35.1
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Intel-wired-lan] [PATCH net] ice: Don't double unplug aux on peer initiated reset
2022-08-08 22:22 [Intel-wired-lan] [PATCH net] ice: Don't double unplug aux on peer initiated reset Dave Ertman
@ 2022-08-09 8:57 ` Maciej Fijalkowski
0 siblings, 0 replies; 2+ messages in thread
From: Maciej Fijalkowski @ 2022-08-09 8:57 UTC (permalink / raw)
To: Dave Ertman; +Cc: intel-wired-lan
On Mon, Aug 08, 2022 at 03:22:51PM -0700, Dave Ertman wrote:
> 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
nit: double space after dot
> a NULL pointer dereference.
Can you include the splat related to this null ptr deref? it's always a
good practice.
>
> 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.
>
> Fixes: f9f5301e7e2d4 ("ice: Register auxiliary device to provide RDMA")
> Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index eb40526ee179..9afcf030201e 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -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);
> --
> 2.35.1
>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-09 8:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-08 22:22 [Intel-wired-lan] [PATCH net] ice: Don't double unplug aux on peer initiated reset Dave Ertman
2022-08-09 8:57 ` Maciej Fijalkowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox