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

From: Cong Wang
Date: Tue Apr 30 2019 - 17:25:14 EST


On Mon, Apr 29, 2019 at 10:38 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:

Hmm, why not just check tp->root against NULL in mall_classify()?

Also, which is the offending commit here? Please add a Fixes: tag.

Thanks.