Re: [PATCH bpf] xdp: Handle device unregister for devmap_hash map type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 18, 2019 at 3:31 AM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote:
>
> Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> writes:
>
> > On Wed, Oct 16, 2019 at 9:07 AM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx>
> >> Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>
> >> ---
> >>  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
>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux