]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: fix error flow in case of add state fails
authorAviad Yehezkel <aviadye@mellanox.com>
Thu, 18 Jan 2018 13:41:51 +0000 (15:41 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 19 Jan 2018 05:44:22 +0000 (06:44 +0100)
commit25ceca25b555e03fa9648ef7a87d0416c32e02d6
tree5a82ca3b3f6e651b76341476530f26c39f42a222
parent012fbd4b8dd55efe3fb175a51d15f078bdb9de29
xfrm: fix error flow in case of add state fails

If add state fails in case of device offload, netdev refcount
will be negative since gc task is attempting to dev_free this state.
This is fixed by putting NULL in state dev field.

Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Signed-off-by: Boris Pismeny <borisp@mellanox.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_device.c