Skip to content

Commit 1ad84a1

Browse files
minimaxwellkuba-moo
authored andcommitted
net: ethtool: phy: Don't set the context dev pointer for unfiltered DUMP
The context info allows continuing DUMP requests, shall they fill the netlink buffer. In the case of filtered DUMP requests, a reference on the netdev is grabbed in the .start() callback and release in .done(). Unfiltered DUMP request don't need the dev pointer to be set in the context info, doing so will trigger an unwanted netdev_put() in .done(). Reported-by: [email protected] Closes: https://lore.kernel.org/netdev/[email protected]/ Fixes: 17194be ("net: ethtool: Introduce a command to list PHYs on an interface") Signed-off-by: Maxime Chevallier <[email protected]> Reviewed-by: Vadim Fedorenko <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 06a104d commit 1ad84a1

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

net/ethtool/phy.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ static int ethnl_phy_dump_one_dev(struct sk_buff *skb, struct net_device *dev,
251251
int ret = 0;
252252
void *ehdr;
253253

254-
pri->base.dev = dev;
255-
256254
if (!dev->link_topo)
257255
return 0;
258256

0 commit comments

Comments
 (0)