android_kernel_xiaomi_sm7250/net/xfrm
Nicolas Dichtel 153bd25686 xfrm interface: fix management of phydev
commit 22d6552f827ef76ade3edf6bbb3f05048a0a7d8b upstream.

With the current implementation, phydev cannot be removed:

$ ip link add dummy type dummy
$ ip link add xfrm1 type xfrm dev dummy if_id 1
$ ip l d dummy
 kernel:[77938.465445] unregister_netdevice: waiting for dummy to become free. Usage count = 1

Manage it like in ip tunnels, ie just keep the ifindex. Not that the side
effect, is that the phydev is now optional.

Fixes: f203b76d78 ("xfrm: Add virtual xfrm interfaces")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Julien Floret <julien.floret@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-13 08:52:42 +01:00
..
Kconfig
Makefile
xfrm_algo.c
xfrm_device.c
xfrm_hash.c
xfrm_hash.h
xfrm_input.c xfrm: release device reference for invalid state 2019-12-13 08:51:03 +01:00
xfrm_interface.c xfrm interface: fix management of phydev 2019-12-13 08:52:42 +01:00
xfrm_ipcomp.c
xfrm_output.c
xfrm_policy.c
xfrm_proc.c
xfrm_replay.c
xfrm_state.c
xfrm_sysctl.c
xfrm_user.c