l2tp: protect tunnel->del_work by ref_count

commit 06a15f51cf upstream.

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: Luis Henriques <luis.henriques@canonical.com>
This commit is contained in:
Alexander Couzens 2015-09-28 11:32:42 +02:00 • committed by Luis Henriques
commit 915d86a871