* [PATCH 6/9] memcg: accounting for fasync_cache
@ 2021-03-09 8:04 Vasily Averin
0 siblings, 0 replies; only message in thread
From: Vasily Averin @ 2021-03-09 8:04 UTC (permalink / raw)
To: cgroups, linux-mm; +Cc: Johannes Weiner, Michal Hocko, Vladimir Davydov
Objects can be created from memcg-limited tasks
but its misuse may lead to host OOM.
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
fs/fcntl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/fcntl.c b/fs/fcntl.c
index dfc72f1..7941559 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -1049,7 +1049,8 @@ static int __init fcntl_init(void)
__FMODE_EXEC | __FMODE_NONOTIFY));
fasync_cache = kmem_cache_create("fasync_cache",
- sizeof(struct fasync_struct), 0, SLAB_PANIC, NULL);
+ sizeof(struct fasync_struct), 0,
+ SLAB_PANIC | SLAB_ACCOUNT, NULL);
return 0;
}
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-09 8:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 8:04 [PATCH 6/9] memcg: accounting for fasync_cache Vasily Averin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox