summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-03-09 21:29:13 +0300
committerJakub Kicinski <kuba@kernel.org>2022-03-11 07:15:20 +0300
commit5d26cff5bdbebdf98ba48217c078ff102536f134 (patch)
treef932ba2bfcdb367f99f8e45c36bd3c7e6652659d /net/core
parent1926407a4ab0e59d5a27bed7b82029b356d80fa0 (diff)
downloadlinux-5d26cff5bdbebdf98ba48217c078ff102536f134.tar.xz
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@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c2
1 files changed, 1 insertions, 1 deletions
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;