net: fix NULL pointer in skb_segment_list
[platform/kernel/linux-rpi.git] / net / sched / sch_atm.c
index 7d85181..3373716 100644 (file)
@@ -397,10 +397,13 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                                result = tcf_classify(skb, NULL, 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;
@@ -576,7 +579,6 @@ static void atm_tc_reset(struct Qdisc *sch)
        pr_debug("atm_tc_reset(sch %p,[qdisc %p])\n", sch, p);
        list_for_each_entry(flow, &p->flows, list)
                qdisc_reset(flow->q);
-       sch->q.qlen = 0;
 }
 
 static void atm_tc_destroy(struct Qdisc *sch)