• Steffen Klassert's avatar
    xfrm: Fix unregister netdevice hang on hardware offload. · 07b87f9e
    Steffen Klassert authored
    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: d77e38e6 ("xfrm: Add an IPsec hardware offloading API")
    Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
    07b87f9e
xfrm.h 58.1 KB