[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220309182914.423834-2-kuba@kernel.org>
Date: Wed, 9 Mar 2022 10:29:13 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, dsahern@...il.com, jiri@...nulli.us,
Jakub Kicinski <kuba@...nel.org>,
George Shuklin <george.shuklin@...il.com>
Subject: [PATCH net-next 1/2] net: account alternate interface name memory
George reports that altnames can eat up kernel memory.
We should charge that memory appropriately.
Reported-by: George Shuklin <george.shuklin@...il.com>
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
---
net/core/rtnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index a759f9e0a847..aa05e89cc47c 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3658,7 +3658,7 @@ static int rtnl_alt_ifname(int cmd, struct net_device *dev, struct nlattr *attr,
if (err)
return err;
- alt_ifname = nla_strdup(attr, GFP_KERNEL);
+ alt_ifname = nla_strdup(attr, GFP_KERNEL_ACCOUNT);
if (!alt_ifname)
return -ENOMEM;
--
2.34.1
Powered by blists - more mailing lists