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] [day] [month] [year] [list]
Message-ID: <d4d89a4b-acd2-4bf1-8652-5f180df7d742@davidwei.uk>
Date: Mon, 24 Mar 2025 11:25:25 -0700
From: David Wei <dw@...idwei.uk>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jesper Dangaard Brouer
 <hawk@...nel.org>, Stanislav Fomichev <stfomichev@...il.com>
Subject: Re: [PATCH net] net: page_pool: replace ASSERT_RTNL() in
 page_pool_init()

On 2025-03-24 07:18, Andrew Lunn wrote:
> On Sun, Mar 23, 2025 at 06:46:39PM -0700, David Wei wrote:
>> Replace a stray ASSERT_RTNL() in page_pool_init() with
>> netdev_assert_locked().
>>
>> Fixes: 1d22d3060b9b ("net: drop rtnl_lock for queue_mgmt operations")
>> Signed-off-by: David Wei <dw@...idwei.uk>
>> ---
>>  net/core/page_pool.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
>> index f5e908c9e7ad..2f469b02ea31 100644
>> --- a/net/core/page_pool.c
>> +++ b/net/core/page_pool.c
>> @@ -281,7 +281,7 @@ static int page_pool_init(struct page_pool *pool,
>>  		 * configuration doesn't change while we're initializing
>>  		 * the page_pool.
>>  		 */
>> -		ASSERT_RTNL();
>> +		netdev_assert_locked(params->netdev);
> 
> Adding a bit more context:
> 
>         if (pool->slow.flags & PP_FLAG_ALLOW_UNREADABLE_NETMEM) {
>                 /* We rely on rtnl_lock()ing to make sure netdev_rx_queue
>                  * configuration doesn't change while we're initializing
>                  * the page_pool.
>                  */
>                 ASSERT_RTNL();
> 
> If ASSERT_RTNL() is now wrong, you also need to update the comment.

Thanks, I'll update the docs too after switching to
netdev_ops_assert_locked().

> 
> 	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ