xfrm: Fix negative device refcount on offload failure.
authorSteffen Klassert <steffen.klassert@secunet.com>
Mon, 4 Sep 2017 08:59:55 +0000 (10:59 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 11 Sep 2017 08:36:51 +0000 (10:36 +0200)
commit67a63387b1417b5954eedb15f638f1f0bee3da49
tree0e8e662a925704338f1ba7dc2e90d3d1c1fb81ba
parentc5d4d7d83165ae863954b113c7f403d8b58febed
xfrm: Fix negative device refcount on offload failure.

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