Re: [PATCH net] cls_matchall: avoid panic when receiving a packet before filter set

From: David Miller
Date: Sat May 04 2019 - 01:00:12 EST

From: Matteo Croce <mcroce@xxxxxxxxxx>
Date: Thu, 2 May 2019 10:51:05 +0200

> When a matchall classifier is added, there is a small time interval in
> which tp->root is NULL. If we receive a packet in this small time slice
> a NULL pointer dereference will happen, leading to a kernel panic:
> Fix this by adding a NULL check in mall_classify().
> Fixes: ed76f5edccc9 ("net: sched: protect filter_chain list with filter_chain_lock mutex")
> Signed-off-by: Matteo Croce <mcroce@xxxxxxxxxx>

Applied and queued up for -stable, thanks.