summaryrefslogtreecommitdiff
path: root/net/xfrm
diff options
context:
space:
mode:
authorRaed Salem <raeds@mellanox.com>2020-02-02 14:19:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-02 17:34:31 +0300
commita6001a07098525ada40c5c3e63c811e69a11c565 (patch)
treefc023d1776545462ba2ef7394c3ca8293a441050 /net/xfrm
parentcd195db9143211386cbf521e2bea8484a0ed6b90 (diff)
downloadlinux-a6001a07098525ada40c5c3e63c811e69a11c565.tar.xz
xfrm: handle NETDEV_UNREGISTER for xfrm device
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>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c
index 4e458fd9236a..c58557193527 100644
--- a/net/xfrm/xfrm_device.c
+++ b/net/xfrm/xfrm_device.c
@@ -187,6 +187,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;