--- x/net/sched/sch_taprio.c
+++ y/net/sched/sch_taprio.c
@@ -787,6 +787,7 @@ static struct sk_buff *taprio_dequeue_tc
 	int num_tc = netdev_get_num_tc(dev);
 	struct sk_buff *skb;
 	int tc;
+	int loop = 0;
 
 	for (tc = num_tc - 1; tc >= 0; tc--) {
 		int first_txq = q->cur_txq[tc];
@@ -805,6 +806,8 @@ static struct sk_buff *taprio_dequeue_tc
 
 			if (skb)
 				return skb;
+			if (loop++ > 50)
+				return NULL;
 		} while (q->cur_txq[tc] != first_txq);
 	}