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

From: David Miller
Date: Sun May 05 2019 - 13:01:28 EST


From: Matteo Croce <mcroce@xxxxxxxxxx>
Date: Thu, 2 May 2019 17:13:18 +0200

> When a cgroup 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:
...
> Suggested-by: Cong Wang <xiyou.wangcong@xxxxxxxxx>
> Fixes: ed76f5edccc9 ("net: sched: protect filter_chain list with filter_chain_lock mutex")
> Signed-off-by: Matteo Croce <mcroce@xxxxxxxxxx>

Applied, thanks.