projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5d4d7d
)
xfrm: Fix negative device refcount on offload failure.
author
Steffen Klassert
<steffen.klassert@secunet.com>
Mon, 4 Sep 2017 08:59:55 +0000
(10:59 +0200)
committer
Steffen Klassert
<steffen.klassert@secunet.com>
Mon, 11 Sep 2017 08:36:51 +0000
(10:36 +0200)
Reset the offload device at the xfrm_state if the device was
not able to offload the state. Otherwise we drop the device
refcount twice.
Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API")
Reported-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_device.c
patch
|
blob
|
history
diff --git
a/net/xfrm/xfrm_device.c
b/net/xfrm/xfrm_device.c
index acf00104ef312b563be9f3aa9698fa2a9dbdfea7..30e5746085b8fcfc5aa8abc7a8a23753c510a630 100644
(file)
--- a/
net/xfrm/xfrm_device.c
+++ b/
net/xfrm/xfrm_device.c
@@
-91,6
+91,7
@@
int xfrm_dev_state_add(struct net *net, struct xfrm_state *x,
}
if (!dev->xfrmdev_ops || !dev->xfrmdev_ops->xdo_dev_state_add) {
+ xso->dev = NULL;
dev_put(dev);
return 0;
}