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

From: Cong Wang
Date: Thu May 02 2019 - 12:31:57 EST

On Thu, May 2, 2019 at 1:51 AM Matteo Croce <mcroce@xxxxxxxxxx> wrote:
> 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>

Acked-by: Cong Wang <xiyou.wangcong@xxxxxxxxx>

Thanks for the update!