Commit 429679dc authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

page_pool: fix netlink dump stop/resume

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: 950ab53b ("net: page_pool: implement GET in the netlink API")
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ca1ba46
...@@ -94,11 +94,12 @@ netdev_nl_page_pool_get_dump(struct sk_buff *skb, struct netlink_callback *cb, ...@@ -94,11 +94,12 @@ netdev_nl_page_pool_get_dump(struct sk_buff *skb, struct netlink_callback *cb,
state->pp_id = pool->user.id; state->pp_id = pool->user.id;
err = fill(skb, pool, info); err = fill(skb, pool, info);
if (err) if (err)
break; goto out;
} }
state->pp_id = 0; state->pp_id = 0;
} }
out:
mutex_unlock(&page_pools_lock); mutex_unlock(&page_pools_lock);
rtnl_unlock(); rtnl_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment