diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-03-09 10:29:13 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-13 20:59:09 +0200 |
commit | 601f748029f35f1e4065a87406dd855142e22c81 (patch) | |
tree | 0ae39e06fc2a44c1cac53905473abc8531818e28 /net/core | |
parent | d804db3dafd11a2973d0d3ce38ef844d8c10a22a (diff) | |
download | linux-stable-601f748029f35f1e4065a87406dd855142e22c81.tar.gz linux-stable-601f748029f35f1e4065a87406dd855142e22c81.tar.bz2 linux-stable-601f748029f35f1e4065a87406dd855142e22c81.zip |
net: account alternate interface name memory
[ Upstream commit 5d26cff5bdbebdf98ba48217c078ff102536f134 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 91d7a5a5a08d..a8c319dc224a 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -3637,7 +3637,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; |