Re: [PATCH] l2tp: Fix possible NULL pointer dereference

From: David Miller
Date: Tue May 07 2019 - 15:18:56 EST


From: YueHaibing <yuehaibing@xxxxxxxxxx>
Date: Mon, 6 May 2019 22:44:04 +0800

> BUG: unable to handle kernel NULL pointer dereference at 0000000000000128
. ..
> ---[ end trace 8322b2b8bf83f8e1
>
> If alloc_workqueue fails in l2tp_init, l2tp_net_ops
> is unregistered on failure path. Then l2tp_exit_net
> is called which will flush NULL workqueue, this patch
> add a NULL check to fix it.
>
> Fixes: 67e04c29ec0d ("l2tp: unregister l2tp_net_ops on failure path")
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>

Applied and queued up for -stable, thanks.