datapath: Fix deadlock on STT device destroy.
authorPravin B Shelar <pshelar@nicira.com>
Tue, 12 Jan 2016 04:13:40 +0000 (20:13 -0800)
committerPravin B Shelar <pshelar@nicira.com>
Tue, 12 Jan 2016 19:43:18 +0000 (11:43 -0800)
commit33ae5c6d9a6e87e7e2439d0cf4a7725417db714b
treeda135fd3f9480b383db3362efe7a26351977875a
parentc09f24035a64d000ce2fe6796dc54c17697ad8a5
datapath: Fix deadlock on STT device destroy.

STT unregisters nf-hook when there are no other STT devices
left in the namespace. On some kernel versions the nf-unreg API
take RTNL lock, but it is already taken in the tunnel device
destroy code path which results in deadlock. To fix the issue
I moved the unreg call into net-exit.

VMware-BZ: #1582410
Reported-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Joe Stringer <joe@ovn.org>
datapath/linux/compat/stt.c