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: <CANn89iK918nE4vCS2WUC2qFoH8YkCPXThytgKszSi3Edr0S8jQ@mail.gmail.com>
Date:   Fri, 20 May 2022 14:53:40 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev <netdev@...r.kernel.org>, Paolo Abeni <pabeni@...hat.com>,
        David Miller <davem@...emloft.net>
Subject: Re: [PATCH net-next] net: avoid strange behavior with skb_defer_max
 == 1

On Wed, May 18, 2022 at 11:55 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> When user sets skb_defer_max to 1 the kick threshold is 0
> (half of 1). If we increment queue length before the check
> the kick will never happen, and the skb may get stranded.
> This is likely harmless but can be avoided by moving the
> increment after the check. This way skb_defer_max == 1
> will always kick. Still a silly config to have, but
> somehow that feels more correct.
>
> While at it drop a comment which seems to be outdated
> or confusing, and wrap the defer_count write with
> a WRITE_ONCE() since it's read on the fast path
> that avoids taking the lock.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---

SGTM thanks.

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ