diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-06 08:35:30 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-06 08:35:30 +0100 |
commit | d38e781ea035456c742605fb21d0dd3c755b7b0b (patch) | |
tree | 53bda2561a47f747ab4caf1119993cc181780db7 /net/sched/sch_htb.c | |
parent | mei: Move uuid_le_cmp() to its only user (diff) | |
parent | Linux 6.2-rc7 (diff) | |
download | linux-d38e781ea035456c742605fb21d0dd3c755b7b0b.tar.xz linux-d38e781ea035456c742605fb21d0dd3c755b7b0b.zip |
Merge 6.2-rc7 into char-misc-next
We need the char-misc driver fixes in here as other patches depend on
them.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r-- | net/sched/sch_htb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index f46643850df8..cc28e41fb745 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -431,7 +431,10 @@ static void htb_activate_prios(struct htb_sched *q, struct htb_class *cl) while (cl->cmode == HTB_MAY_BORROW && p && mask) { m = mask; while (m) { - int prio = ffz(~m); + unsigned int prio = ffz(~m); + + if (WARN_ON_ONCE(prio > ARRAY_SIZE(p->inner.clprio))) + break; m &= ~(1 << prio); if (p->inner.clprio[prio].feed.rb_node) |