projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1926407
)
net: account alternate interface name memory
author
Jakub Kicinski
<kuba@kernel.org>
Wed, 9 Mar 2022 18:29:13 +0000
(10:29 -0800)
committer
Jakub Kicinski
<kuba@kernel.org>
Fri, 11 Mar 2022 04:15:20 +0000
(20:15 -0800)
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>
net/core/rtnetlink.c
patch
|
blob
|
history
diff --git
a/net/core/rtnetlink.c
b/net/core/rtnetlink.c
index
a759f9e
..
aa05e89
100644
(file)
--- 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;