* [PATCH net] page_pool: fix netlink dump stop/resume
@ 2024-03-01 1:13 Jakub Kicinski
2024-03-01 8:43 ` Eric Dumazet
2024-03-04 10:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2024-03-01 1:13 UTC (permalink / raw)
To: davem; +Cc: netdev, edumazet, pabeni, Jakub Kicinski, hawk
If message fills up we need to stop writing. 'break' will
only get us out of the iteration over pools of a single
netdev, we need to also stop walking netdevs.
This results in either infinite dump, or missing pools,
depending on whether message full happens on the last
netdev (infinite dump) or non-last (missing pools).
Fixes: 950ab53b77ab ("net: page_pool: implement GET in the netlink API")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: hawk@kernel.org
---
net/core/page_pool_user.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/core/page_pool_user.c b/net/core/page_pool_user.c
index ffe5244e5597..278294aca66a 100644
--- a/net/core/page_pool_user.c
+++ b/net/core/page_pool_user.c
@@ -94,11 +94,12 @@ netdev_nl_page_pool_get_dump(struct sk_buff *skb, struct netlink_callback *cb,
state->pp_id = pool->user.id;
err = fill(skb, pool, info);
if (err)
- break;
+ goto out;
}
state->pp_id = 0;
}
+out:
mutex_unlock(&page_pools_lock);
rtnl_unlock();
--
2.43.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] page_pool: fix netlink dump stop/resume
2024-03-01 1:13 [PATCH net] page_pool: fix netlink dump stop/resume Jakub Kicinski
@ 2024-03-01 8:43 ` Eric Dumazet
2024-03-04 10:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2024-03-01 8:43 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, pabeni, hawk
On Fri, Mar 1, 2024 at 2:13 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> If message fills up we need to stop writing. 'break' will
> only get us out of the iteration over pools of a single
> netdev, we need to also stop walking netdevs.
>
> This results in either infinite dump, or missing pools,
> depending on whether message full happens on the last
> netdev (infinite dump) or non-last (missing pools).
>
> Fixes: 950ab53b77ab ("net: page_pool: implement GET in the netlink API")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] page_pool: fix netlink dump stop/resume
2024-03-01 1:13 [PATCH net] page_pool: fix netlink dump stop/resume Jakub Kicinski
2024-03-01 8:43 ` Eric Dumazet
@ 2024-03-04 10:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-04 10:20 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, hawk
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Thu, 29 Feb 2024 17:13:31 -0800 you wrote:
> If message fills up we need to stop writing. 'break' will
> only get us out of the iteration over pools of a single
> netdev, we need to also stop walking netdevs.
>
> This results in either infinite dump, or missing pools,
> depending on whether message full happens on the last
> netdev (infinite dump) or non-last (missing pools).
>
> [...]
Here is the summary with links:
- [net] page_pool: fix netlink dump stop/resume
https://git.kernel.org/netdev/net/c/429679dcf7d9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-04 10:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-01 1:13 [PATCH net] page_pool: fix netlink dump stop/resume Jakub Kicinski
2024-03-01 8:43 ` Eric Dumazet
2024-03-04 10:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).