l2tp: protect tunnel->del_work by ref_count
authorAlexander Couzens <lynxis@fe80.eu>
Mon, 28 Sep 2015 09:32:42 +0000 (11:32 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 13 Nov 2015 18:15:37 +0000 (13:15 -0500)
commit3ebbc131d67cd4b513073c868d953436da430331
treed5e40a6c24bf87287110842cc65bb1c0009c1e76
parentffb04e43c08ae23a4b3995ee77cc7fcc17a7afba
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: Sasha Levin <sasha.levin@oracle.com>
net/l2tp/l2tp_core.c