]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
netfilter: xt_cgroup: shrink size of v2 path
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 4 Sep 2018 10:07:55 +0000 (12:07 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit72c89b2b892b9d98ce9a6482228241c52d900ed1
tree2ff4d0fdaef63aef664e27339d922840933b4d90
parent8cf701f0e1598a88ba5b9b2dbc378409bdd211ab
netfilter: xt_cgroup: shrink size of v2 path

BugLink: https://bugs.launchpad.net/bugs/1838349
[ Upstream commit 0d704967f4a49cc2212350b3e4a8231f8b4283ed ]

cgroup v2 path field is PATH_MAX which is too large, this is placing too
much pressure on memory allocation for people with many rules doing
cgroup v1 classid matching, side effects of this are bug reports like:

https://bugzilla.kernel.org/show_bug.cgi?id=200639

This patch registers a new revision that shrinks the cgroup path to 512
bytes, which is the same approach we follow in similar extensions that
have a path field.

Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/uapi/linux/netfilter/xt_cgroup.h
net/netfilter/xt_cgroup.c