Skip to content

Commit 601f748

Browse files
kuba-moogregkh
authored andcommitted
net: account alternate interface name memory
[ Upstream commit 5d26cff ] 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>
1 parent d804db3 commit 601f748

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/rtnetlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3637,7 +3637,7 @@ static int rtnl_alt_ifname(int cmd, struct net_device *dev, struct nlattr *attr,
36373637
if (err)
36383638
return err;
36393639

3640-
alt_ifname = nla_strdup(attr, GFP_KERNEL);
3640+
alt_ifname = nla_strdup(attr, GFP_KERNEL_ACCOUNT);
36413641
if (!alt_ifname)
36423642
return -ENOMEM;
36433643

0 commit comments

Comments
 (0)