Subject: Re: [PATCH v2 ipsec] xfrm: Fix unregister netdevice hang on hardware offload.

From: Steffen Klassert <[email-masked]>
Date: Wed, 26 Jun 2024 13:30:40 +0200

On Mon, Jun 24, 2024 at 01:27:51PM +0300, Leon Romanovsky wrote:
> On Thu, Jun 20, 2024 at 08:47:24AM +0200, Steffen Klassert wrote:
> > When offloading xfrm states to hardware, the offloading
> > device is attached to the skbs secpath. If a skb is free
> > is deferred, an unregister netdevice hangs because the
> > netdevice is still refcounted.
> > 
> > Fix this by removing the netdevice from the xfrm states
> > when the netdevice is unregistered. To find all xfrm states
> > that need to be cleared we add another list where skbs
> > linked to that are unlinked from the lists (deleted)
> > but not yet freed.
> > 
> > Changes in v2:
> > 
> > - Fix build with CONFIG_XFRM_OFFLOAD disabled.
> > - Fix two typos in the commit message.
> 
> Changelog should be after "---" trailer marker.

I've hand edited it out.

> > Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API")
> > Signed-off-by: Steffen Klassert <[email-masked]>

Now applied to the ipsec tree.