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:44:47 +0000 (09:44 +0900)
commit9bbb3d0d1d76d867a8425756e22b1af6d9654a1c
treeedfd798f5bdeb75938be7b1e846ba6baaedf276a
parent61ce1520149bb1cfdc9a2946a1b6a33119742881
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