net: sched: atm: dont intepret cls results when asked to drop
authorJamal Hadi Salim <jhs@mojatatu.com>
Sun, 1 Jan 2023 21:57:43 +0000 (16:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 10:59:14 +0000 (11:59 +0100)
commitf02327a4877a06cbc8277e22d4834cb189565187
treed0b3779ecfe25afff1e42b08f10a3d2c102081a8
parent95da1882ce9372ba20278f87cdb7a34f9812c4b5
net: sched: atm: dont intepret cls results when asked to drop

[ Upstream commit a2965c7be0522eaa18808684b7b82b248515511b ]

If asked to drop a packet via TC_ACT_SHOT it is unsafe to assume
res.class contains a valid pointer
Fixes: b0188d4dbe5f ("[NET_SCHED]: sch_atm: Lindent")

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_atm.c