]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
xfrm: handle NETDEV_UNREGISTER for xfrm device
authorRaed Salem <raeds@mellanox.com>
Sun, 2 Feb 2020 11:19:34 +0000 (13:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2020 13:28:18 +0000 (15:28 +0200)
commit 03891f820c2117b19e80b370281eb924a09cf79f upstream.

This patch to handle the asynchronous unregister
device event so the device IPsec offload resources
could be cleanly released.

Fixes: e4db5b61c572 ("xfrm: policy: remove pcpu policy cache")
Signed-off-by: Raed Salem <raeds@mellanox.com>
Reviewed-by: Boris Pismenny <borisp@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/xfrm/xfrm_device.c

index 5611b75210208cd3594922ede88f7c13c393cf3f..8634ce6771421c203e82ebd9fd90aa4bb2d24930 100644 (file)
@@ -332,6 +332,7 @@ static int xfrm_dev_event(struct notifier_block *this, unsigned long event, void
                return xfrm_dev_feat_change(dev);
 
        case NETDEV_DOWN:
+       case NETDEV_UNREGISTER:
                return xfrm_dev_down(dev);
        }
        return NOTIFY_DONE;