xfrm: Fix leak of dev tracker
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 19 Apr 2023 12:19:08 +0000 (15:19 +0300)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 21 Apr 2023 06:54:04 +0000 (08:54 +0200)
commitec8f32ad9a65a8cbb465b69e154aaec9d2fe45c4
tree5cb59b164733ae2cd520c0c375156096314a9c53
parent94b95dfaa814f565d92f5a65f0ff12a483095522
xfrm: Fix leak of dev tracker

At the stage of direction checks, the netdev reference tracker is
already initialized, but released with wrong *_put() call.

Fixes: 919e43fad516 ("xfrm: add an interface to offload policy")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_device.c