taskstats: expose taskstats to all netspace

Upstream: no

iotop cannot run inside container for taskstats not supporting net
namespace, in order to fix it we set netnsok filed of taskstats object
to true.

Signed-off-by: brookxu <brookxu@tencent.com>
Signed-off-by: katrinzhou <katrinzhou@tencent.com>
Signed-off-by: Kairui Song <kasong@tencent.com>
This commit is contained in:
brookxu 2022-04-24 16:38:42 +08:00 committed by Kairui Song
parent 801f14febd
commit 4cbaa1e2bb
1 changed files with 1 additions and 0 deletions

View File

@ -686,6 +686,7 @@ static struct genl_family family __ro_after_init = {
.name = TASKSTATS_GENL_NAME,
.version = TASKSTATS_GENL_VERSION,
.module = THIS_MODULE,
.netnsok = true,
.ops = taskstats_ops,
.n_ops = ARRAY_SIZE(taskstats_ops),
.resv_start_op = CGROUPSTATS_CMD_GET + 1,