From 2d6ec25539b0e7a4b4ad670abbcb3ec27b33e8ce Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Wed, 5 Jan 2022 09:08:49 -0800 Subject: [PATCH] netlink: do not allocate a device refcount tracker in ethnl_default_notify() 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") Signed-off-by: Eric Dumazet Reported-by: Johannes Berg Tested-by: Johannes Berg Link: https://lore.kernel.org/r/20220105170849.2610470-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski --- net/ethtool/netlink.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c index ea23659fab28..5fe8f4ae2ceb 100644 --- a/net/ethtool/netlink.c +++ b/net/ethtool/netlink.c @@ -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); -- 2.25.1