l2tp: protect tunnel->del_work by ref_count
authorAlexander Couzens <lynxis@fe80.eu>
Mon, 28 Sep 2015 09:32:42 +0000 (11:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Oct 2015 00:45:53 +0000 (09:45 +0900)
commit91f536c1fa37c84e4771d28b1aee198cd08a41c5
tree9a9e41ad33f154351ae5dc1ab850ec39c4089188
parent67e128d68505fa37da2b9ae6b532f11db1624a2f
l2tp: protect tunnel->del_work by ref_count

[ Upstream commit 06a15f51cf3618e32a73871ee6a547ef7fd902b5 ]

There is a small chance that tunnel_free() is called before tunnel->del_work scheduled
resulting in a zero pointer dereference.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Acked-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/l2tp/l2tp_core.c