lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEA6p_CbHS3xRZaArjxJX0WYZrd_4gfNK01Le4e87NQWc6vy8A@mail.gmail.com>
Date:   Wed, 24 Feb 2021 18:16:04 -0800
From:   Wei Wang <weiwan@...gle.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Alexander Duyck <alexanderduyck@...com>,
        Eric Dumazet <edumazet@...gle.com>,
        "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>, Paolo Abeni <pabeni@...hat.com>,
        Hannes Frederic Sowa <hannes@...essinduktion.org>,
        Martin Zaharinov <micron10@...il.com>
Subject: Re: [PATCH net] net: fix race between napi kthread mode and busy poll

On Wed, Feb 24, 2021 at 5:40 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Wed, 24 Feb 2021 17:06:13 -0800 Wei Wang wrote:
> > I really have a hard time reproducing the warning Martin was seeing in
> > his setup. The difference between my setup and his is that mine uses
> > mlx4 driver, while Martin is using ixgbe driver.
> >
> > To keep everyone up to date with Martin's previous email, with this
> > patch applied to 5.11.1, the following warning is triggered when
> > enabling threaded mode without enabling busy poll:
> > echo 1 > /sys/class/net/eth0/threaded
> > echo 1 > /sys/class/net/eth1/threaded
> > echo 1 > /sys/class/net/eth2/threaded
> > echo 1 > /sys/class/net/eth3/threaded
> >
> > Warning message:
> > [...]
> >
> > This is the line in net/core/dev.c:6993
> >  WARN_ON(!list_empty(&napi->poll_list));
> > in napi_threaded wait()
> >
> > Martin, do you think the driver version you are using could be at fault here?
>
> We do kthread_run() meaning the thread gets immediately woken up, even
> when sirq is polling the NAPI and owns it. Right?

Indeed. Good catch! Changing it to kthread_create() should solve the
issue I think. We were using kthread_run() because kthread_create()
messes up certain thread stats if I remember it correctly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ