Cong Wang d39d714969 idr: introduce idr_for_each_entry_continue_ul()
Similarly, other callers of idr_get_next_ul() suffer the same
overflow bug as they don't handle it properly either.

Introduce idr_for_each_entry_continue_ul() to help these callers
iterate from a given ID.

cls_flower needs more care here because it still has overflow when
does arg->cookie++, we have to fold its nested loops into one
and remove the arg->cookie++.

Fixes: 01683a146999 ("net: sched: refactor flower walk to iterate over idr")
Fixes: 12d6066c3b29 ("net/mlx5: Add flow counters idr")
Reported-by: Li Shuang <shuali@redhat.com>
Cc: Davide Caratti <dcaratti@redhat.com>
Cc: Vlad Buslov <vladbu@mellanox.com>
Cc: Chris Mi <chrism@mellanox.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Tested-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-07-01 19:15:46 -07:00
..
2019-06-21 09:58:42 -07:00
2019-06-21 09:58:42 -07:00
2019-06-08 12:52:42 -07:00
2019-06-21 11:03:33 -07:00
2019-06-21 10:20:19 -07:00
2019-06-21 09:58:42 -07:00
2019-06-22 14:08:47 -07:00
2019-06-21 09:58:42 -07:00
2019-05-31 08:34:32 -07:00
2019-06-25 03:41:03 +08:00
2019-06-21 10:18:16 -07:00
2019-06-21 09:58:42 -07:00
2019-06-08 12:52:42 -07:00
2019-06-22 09:42:29 -07:00
2019-06-22 09:39:03 -07:00
2019-06-21 09:58:42 -07:00
2019-06-10 18:07:39 +02:00
2019-06-20 11:56:35 +02:00