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: <6a17c309-65bd-45a2-a3b2-b1cee9fb5c3d@kernel.org>
Date: Sun, 9 Jun 2024 09:31:02 +0200
From: Jesper Dangaard Brouer <hawk@...nel.org>
To: Somnath Kotur <somnath.kotur@...adcom.com>,
 Mina Almasry <almasrymina@...gle.com>
Cc: David Wei <dw@...idwei.uk>, Ilias Apalodimas
 <ilias.apalodimas@...aro.org>, netdev@...r.kernel.org,
 Jakub Kicinski <kuba@...nel.org>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next v1] page_pool: remove WARN_ON() with OR



On 06/06/2024 10.58, Somnath Kotur wrote:
> On Wed, Jun 5, 2024 at 10:01 PM Mina Almasry <almasrymina@...gle.com> wrote:
>>
>> On Wed, Jun 5, 2024 at 9:20 AM David Wei <dw@...idwei.uk> wrote:
>>>
>>> Having an OR in WARN_ON() makes me sad because it's impossible to tell
>>> which condition is true when triggered.
>>>
>>> Split a WARN_ON() with an OR in page_pool_disable_direct_recycling().
>>>
>>> Signed-off-by: David Wei <dw@...idwei.uk>
>>
>> Reviewed-by: Mina Almasry <almasrymina@...gle.com>
>>
> Reviewed-by: Somnath Kotur <somnath.kotur@...adcom.com>


LGTM

Acked-by: Jesper Dangaard Brouer <hawk@...nel.org>

>>> ---
>>>   net/core/page_pool.c | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
>>> index f4444b4e39e6..3927a0a7fa9a 100644
>>> --- a/net/core/page_pool.c
>>> +++ b/net/core/page_pool.c
>>> @@ -1027,8 +1027,8 @@ static void page_pool_disable_direct_recycling(struct page_pool *pool)
>>>          /* To avoid races with recycling and additional barriers make sure
>>>           * pool and NAPI are unlinked when NAPI is disabled.
>>>           */
>>> -       WARN_ON(!test_bit(NAPI_STATE_SCHED, &pool->p.napi->state) ||
>>> -               READ_ONCE(pool->p.napi->list_owner) != -1);
>>> +       WARN_ON(!test_bit(NAPI_STATE_SCHED, &pool->p.napi->state));
>>> +       WARN_ON(READ_ONCE(pool->p.napi->list_owner) != -1);
>>>
>>>          WRITE_ONCE(pool->p.napi, NULL);
>>>   }
>>> --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ