]> www.infradead.org Git - users/willy/xarray.git/commit
xfrm: Fix unregister netdevice hang on hardware offload.
authorSteffen Klassert <steffen.klassert@secunet.com>
Thu, 20 Jun 2024 06:47:24 +0000 (08:47 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 25 Jun 2024 08:02:55 +0000 (10:02 +0200)
commit07b87f9eea0c30675084d50c82532d20168da009
tree128673010004e4c21a816d38d32402b60f782725
parent15f5fe9e84839dcc9eaa69b08ced9d24cb464369
xfrm: Fix unregister netdevice hang on hardware offload.

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.

Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/xfrm/xfrm_state.c