public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Davide Caratti <dcaratti@redhat.com>
To: Cong Wang <xiyou.wangcong@gmail.com>, netdev@vger.kernel.org
Cc: chrism@mellanox.com, willy@infradead.org,
	Li Shuang <shuali@redhat.com>, Vlad Buslov <vladbu@mellanox.com>
Subject: Re: [Patch net 2/3] idr: introduce idr_for_each_entry_continue_ul()
Date: Fri, 28 Jun 2019 23:14:53 +0200	[thread overview]
Message-ID: <5f04b3f5b5d54a86f151f17d83bfe4931433ec33.camel@redhat.com> (raw)
In-Reply-To: <20190628180343.8230-3-xiyou.wangcong@gmail.com>

On Fri, 2019-06-28 at 11:03 -0700, Cong Wang wrote:
> 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++.

hello Cong,

I confirm that this patch fixes the infinite loop when dumping TC flower
rule with handle 0xffffffff on kernel 5.2.0-0.rc5.git0.1.fc31.i686.

Tested-by: Davide Caratti <dcaratti@redhat.com>

thanks!
-- 
davide


  reply	other threads:[~2019-06-28 21:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 18:03 [Patch net 0/3] idr: fix overflow cases on 32-bit CPU Cong Wang
2019-06-28 18:03 ` [Patch net 1/3] idr: fix overflow case for idr_for_each_entry_ul() Cong Wang
2019-06-28 18:03 ` [Patch net 2/3] idr: introduce idr_for_each_entry_continue_ul() Cong Wang
2019-06-28 21:14   ` Davide Caratti [this message]
2019-06-28 18:03 ` [Patch net 3/3] selftests: add a test case for cls_lower handle overflow Cong Wang
2019-07-02  2:16 ` [Patch net 0/3] idr: fix overflow cases on 32-bit CPU David Miller
2019-07-02  2:37   ` Matthew Wilcox
2019-07-02  2:39     ` David Miller
2019-07-02  3:12     ` Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f04b3f5b5d54a86f151f17d83bfe4931433ec33.camel@redhat.com \
    --to=dcaratti@redhat.com \
    --cc=chrism@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=shuali@redhat.com \
    --cc=vladbu@mellanox.com \
    --cc=willy@infradead.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox