[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ1PR11MB629795751E9CAB28897DF34A9B842@SJ1PR11MB6297.namprd11.prod.outlook.com>
Date: Fri, 25 Apr 2025 17:33:27 +0000
From: "Salin, Samuel" <samuel.salin@...el.com>
To: "Tantilov, Emil S" <emil.s.tantilov@...el.com>, "Zaremba, Larysa"
<larysa.zaremba@...el.com>, "intel-wired-lan@...ts.osuosl.org"
<intel-wired-lan@...ts.osuosl.org>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>
CC: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>, "Chittim, Madhu"
<madhu.chittim@...el.com>, "Hay, Joshua A" <joshua.a.hay@...el.com>, "Kubiak,
Michal" <michal.kubiak@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David
S. Miller" <davem@...emloft.net>, "Dumazet, Eric" <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Simon
Horman" <horms@...nel.org>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [Intel-wired-lan] [PATCH iwl-net] idpf: protect shutdown from
reset
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Tantilov, Emil S
> Sent: Wednesday, April 16, 2025 10:04 AM
> To: Zaremba, Larysa <larysa.zaremba@...el.com>; intel-wired-
> lan@...ts.osuosl.org; Nguyen, Anthony L <anthony.l.nguyen@...el.com>
> Cc: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>; Chittim,
> Madhu <madhu.chittim@...el.com>; Hay, Joshua A
> <joshua.a.hay@...el.com>; Kubiak, Michal <michal.kubiak@...el.com>;
> Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>; Andrew Lunn
> <andrew+netdev@...n.ch>; David S. Miller <davem@...emloft.net>;
> Dumazet, Eric <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>;
> Paolo Abeni <pabeni@...hat.com>; Simon Horman <horms@...nel.org>;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [Intel-wired-lan] [PATCH iwl-net] idpf: protect shutdown from
> reset
>
>
>
> On 4/10/2025 4:52 AM, Larysa Zaremba wrote:
> > Before the referenced commit, the shutdown just called idpf_remove(),
> > this way IDPF_REMOVE_IN_PROG was protecting us from the serv_task
> > rescheduling reset. Without this flag set the shutdown process is
> > vulnerable to HW reset or any other triggering conditions (such as
> > default mailbox being destroyed).
> >
> > When one of conditions checked in idpf_service_task becomes true,
> > vc_event_task can be rescheduled during shutdown, this leads to
> > accessing freed memory e.g. idpf_req_rel_vector_indexes() trying to
> > read
> > vport->q_vector_idxs. This in turn causes the system to become defunct
> > during e.g. systemctl kexec.
> >
> > Considering using IDPF_REMOVE_IN_PROG would lead to more heavy
> > shutdown process, instead just cancel the serv_task before cancelling
> > adapter->serv_task before cancelling adapter->vc_event_task to ensure
> > adapter->that
> > reset will not be scheduled while we are doing a shutdown.
> >
> > Fixes: 4c9106f4906a ("idpf: fix adapter NULL pointer dereference on
> > reboot")
> > Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> > Signed-off-by: Larysa Zaremba <larysa.zaremba@...el.com>
> > ---
> Reviewed-by: Emil Tantilov <emil.s.tantilov@...el.com>
Tested-by: Samuel Salin <Samuel.salin@...el.com>
Powered by blists - more mailing lists