Patch "net: sched: atm: dont intepret cls results when asked to drop" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: sched: atm: dont intepret cls results when asked to drop

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-sched-atm-dont-intepret-cls-results-when-asked-t.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f32f7d5cdc2515b7a4d53857e223ad17c1c59c2f
Author: Jamal Hadi Salim <jhs@xxxxxxxxxxxx>
Date:   Sun Jan 1 16:57:43 2023 -0500

    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@xxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 794c7377cd7e..95967ce1f370 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -396,10 +396,13 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
 				result = tcf_classify(skb, fl, &res, true);
 				if (result < 0)
 					continue;
+				if (result == TC_ACT_SHOT)
+					goto done;
+
 				flow = (struct atm_flow_data *)res.class;
 				if (!flow)
 					flow = lookup_flow(sch, res.classid);
-				goto done;
+				goto drop;
 			}
 		}
 		flow = NULL;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux