Skip to content

Commit 429679d

Browse files
kuba-moodavem330
authored andcommitted
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: 950ab53 ("net: page_pool: implement GET in the netlink API") Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1ca1ba4 commit 429679d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/core/page_pool_user.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ netdev_nl_page_pool_get_dump(struct sk_buff *skb, struct netlink_callback *cb,
9494
state->pp_id = pool->user.id;
9595
err = fill(skb, pool, info);
9696
if (err)
97-
break;
97+
goto out;
9898
}
9999

100100
state->pp_id = 0;
101101
}
102+
out:
102103
mutex_unlock(&page_pools_lock);
103104
rtnl_unlock();
104105

0 commit comments

Comments
 (0)