On Fri, Oct 18, 2019 at 3:31 AM Toke Høiland-Jørgensen <t...@redhat.com> wrote:
>
> Andrii Nakryiko <andrii.nakry...@gmail.com> writes:
>
> > On Wed, Oct 16, 2019 at 9:07 AM Toke Høiland-Jørgensen <t...@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-ker...@i-love.sakura.ne.jp>
> >> Signed-off-by: Toke Høiland-Jørgensen <t...@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
>

Reply via email to