From: Andrii Nakryiko <andrii.nakryiko@gmail.com> To: "Toke Høiland-Jørgensen" <toke@redhat.com> Cc: Daniel Borkmann <daniel@iogearbox.net>, Alexei Starovoitov <ast@fb.com>, bpf <bpf@vger.kernel.org>, Networking <netdev@vger.kernel.org>, Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Subject: Re: [PATCH bpf] xdp: Handle device unregister for devmap_hash map type Date: Fri, 18 Oct 2019 09:28:28 -0700 [thread overview] Message-ID: <CAEf4BzZxszYrXCEpDqe6Gi9FggUOnDiQjP9BQTq=EcszwSghKA@mail.gmail.com> (raw) In-Reply-To: <87mudye45s.fsf@toke.dk> On Fri, Oct 18, 2019 at 3:31 AM Toke Høiland-Jørgensen <toke@redhat.com> wrote: > > Andrii Nakryiko <andrii.nakryiko@gmail.com> writes: > > > On Wed, Oct 16, 2019 at 9:07 AM Toke Høiland-Jørgensen <toke@redhat.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@I-love.SAKURA.ne.jp> > >> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.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 >
prev parent reply other threads:[~2019-10-18 16:28 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-16 13:28 Toke Høiland-Jørgensen 2019-10-16 16:24 ` Martin Lau 2019-10-17 10:27 ` Toke Høiland-Jørgensen 2019-10-16 20:09 ` Tetsuo Handa 2019-10-17 10:28 ` Toke Høiland-Jørgensen 2019-10-17 15:23 ` Alexei Starovoitov 2019-10-17 15:40 ` Toke Høiland-Jørgensen 2019-10-17 19:17 ` Andrii Nakryiko 2019-10-18 10:31 ` Toke Høiland-Jørgensen 2019-10-18 16:28 ` Andrii Nakryiko [this message]
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='CAEf4BzZxszYrXCEpDqe6Gi9FggUOnDiQjP9BQTq=EcszwSghKA@mail.gmail.com' \ --to=andrii.nakryiko@gmail.com \ --cc=ast@fb.com \ --cc=bpf@vger.kernel.org \ --cc=daniel@iogearbox.net \ --cc=netdev@vger.kernel.org \ --cc=penguin-kernel@i-love.sakura.ne.jp \ --cc=toke@redhat.com \ --subject='Re: [PATCH bpf] xdp: Handle device unregister for devmap_hash map type' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).