[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzZxszYrXCEpDqe6Gi9FggUOnDiQjP9BQTq=EcszwSghKA@mail.gmail.com>
Date: Fri, 18 Oct 2019 09:28:28 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Toke Høiland-Jørgensen <toke@...hat.com>
Cc: Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...com>, bpf <bpf@...r.kernel.org>,
Networking <netdev@...r.kernel.org>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Subject: Re: [PATCH bpf] xdp: Handle device unregister for devmap_hash map type
On Fri, Oct 18, 2019 at 3:31 AM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
>
> Andrii Nakryiko <andrii.nakryiko@...il.com> writes:
>
> > On Wed, Oct 16, 2019 at 9:07 AM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
> >>
> >> It seems I forgot to add handling of devmap_hash type maps to the device
> >> unregister hook for devmaps. This omission causes devices to not be
> >> properly released, which causes hangs.
> >>
> >> Fix this by adding the missing handler.
> >>
> >> Fixes: 6f9d451ab1a3 ("xdp: Add devmap_hash map type for looking up devices by hashed index")
> >> Reported-by: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
> >> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>
> >> ---
> >> kernel/bpf/devmap.c | 34 ++++++++++++++++++++++++++++++++++
> >> 1 file changed, 34 insertions(+)
> >>
> >
> > [...]
> >
> >> +
> >> + while (dev) {
> >> + odev = (netdev == dev->dev) ? dev : NULL;
> >> + dev = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu(&dev->index_hlist)),
> >
> > Please run scripts/checkpatch.pl, this looks like a rather long line.
>
> That was a deliberate departure from the usual line length, actually. I
> don't think it helps readability to split that into three lines just to
> adhere to a strict line length requirement...
Wouldn't local variable make it even more readable?
>
> -Toke
>
Powered by blists - more mailing lists