memcg: accounting for fasync_cache
Subsystems (4)
PATCH 6/9 memcg: accounting for fasync_cache
Objects can be created from memcg-limited tasks
but its misuse may lead to host OOM.
Signed-off-by Vasily Averin <[email protected]>
--- fs/fcntl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/fcntl.c +2 -1
@@ -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 ; }
Signature · 1 line
1.8.3.1