From: Vasily Averin Date: Mon, 19 Jul 2021 10:44:44 +0000 (+0300) Subject: memcg: enable accounting for VLAN group array X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a89893dd7b08fa85bcf643ca742ab388e001c08e;p=linux.git memcg: enable accounting for VLAN group array vlan array consume up to 8 pages of memory per net device. It makes sense to account for them to restrict the host's memory consumption from inside the memcg-limited container. Signed-off-by: Vasily Averin Signed-off-by: David S. Miller --- diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 4cdf8416869d1..55275ef9a31a7 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -67,7 +67,7 @@ static int vlan_group_prealloc_vid(struct vlan_group *vg, return 0; size = sizeof(struct net_device *) * VLAN_GROUP_ARRAY_PART_LEN; - array = kzalloc(size, GFP_KERNEL); + array = kzalloc(size, GFP_KERNEL_ACCOUNT); if (array == NULL) return -ENOBUFS;