Bluetooth: Fix incorrect strncpy() in hidp_setup_hid()
[firefly-linux-kernel-4.4.55.git] / net / sched / sch_qfq.c
index 103343408593589e8f2343987f3f4b44afca5edb..f86bc727b98fb4d65a0f462acd3888d8c07aba17 100644 (file)
@@ -829,7 +829,10 @@ static void qfq_update_start(struct qfq_sched *q, struct qfq_class *cl)
                if (mask) {
                        struct qfq_group *next = qfq_ffs(q, mask);
                        if (qfq_gt(roundedF, next->F)) {
-                               cl->S = next->F;
+                               if (qfq_gt(limit, next->F))
+                                       cl->S = next->F;
+                               else /* preserve timestamp correctness */
+                                       cl->S = limit;
                                return;
                        }
                }