Skip to contentSkip to conversation

netlink: do not allocate a device refcount tracker in ethnl_default_notify()

PATCH Applied Eric Dumazet 2 participants 2 messages Jan 5, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netlink: do not allocate a device refcount tracker in ethnl_default_notify()

From: Eric Dumazet <[email protected]>

As reported by Johannes, the tracker allocated in ethnl_default_notify() is not really needed, as this function is not expected to change a device reference count.

Fixes e4b8954074f6 ("netlink: add net device refcount tracker to struct ethnl_req_info")
---
 net/ethtool/netlink.c | 1 -
 1 file changed, 1 deletion(-)
net/ethtool/netlink.c +0 -1
index ea23659fab28c734d1a8c11d857b3795f104beec..5fe8f4ae2cebc48eed6d0ce2b9d6607546e66bd6 100644
@@ -627,7 +627,6 @@ static void ethnl_default_notify(struct net_device *dev, unsigned int cmd,
 	}
 
 	req_info->dev = dev;
-	netdev_tracker_alloc(dev, &req_info->dev_tracker, GFP_KERNEL);
 	req_info->flags |= ETHTOOL_FLAG_COMPACT_BITSETS;
 
 	ethnl_init_reply_data(reply_data, ops, dev);
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
#1 lore raw
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 6 lines · On Wed, 5 Jan 2022 09:08:49 -0800 you wrote:

From: Eric Dumazet <[email protected]>

As reported by Johannes, the tracker allocated in ethnl_default_notify() is not really needed, as this function is not expected to change a device reference count.

Quoted 6 lines
Fixes e4b8954074f6 ("netlink: add net device refcount tracker to struct ethnl_req_info")

[...]

Here is the summary with links:
- [net-next] netlink: do not allocate a device refcount tracker in ethnl_default_notify()

    https://git.kernel.org/netdev/net-next/c/2d6ec25539b0

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html