chengshan / rpms / kernel

Forked from rpms/kernel 2 years ago
Clone
Blob Blame History Raw
centosplus kernel patch [bug#14413]

commit 35b42da69e35536da603a50e40aa6c41b2f7b0f8
Author: Cong Wang <xiyou.wangcong@gmail.com>
Date:   Fri Jun 22 14:33:16 2018 -0700

    net_sched: remove a bogus warning in hfsc
    
    In update_vf():
    
      cftree_remove(cl);
      update_cfmin(cl->cl_parent);
    
    the cl_cfmin of cl->cl_parent is intentionally updated to 0
    when that parent only has one child. And if this parent is
    root qdisc, we could end up, in hfsc_schedule_watchdog(),
    that we can't decide the next schedule time for qdisc watchdog.
    But it seems safe that we can just skip it, as this watchdog is
    not always scheduled anyway.
    
    Thanks to Marco for testing all the cases, nothing is broken.
    
    Reported-by: Marco Berizzi <pupilla@libero.it>
    Tested-by: Marco Berizzi <pupilla@libero.it>
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Applied-by: Akemi Yagi <toracat@centos.org>


--- a/net/sched/sch_hfsc.c	2018-06-15 13:57:32.000000000 -0700
+++ b/net/sched/sch_hfsc.c	2018-07-14 10:42:59.460218077 -0700
@@ -1382,8 +1382,8 @@ hfsc_schedule_watchdog(struct Qdisc *sch
 		if (next_time == 0 || next_time > q->root.cl_cfmin)
 			next_time = q->root.cl_cfmin;
 	}
-	WARN_ON(next_time == 0);
-	qdisc_watchdog_schedule(&q->watchdog, next_time);
+	if (next_time)
+		qdisc_watchdog_schedule(&q->watchdog, next_time);
 }
 
 static int