]> git.baikalelectronics.ru Git - kernel.git/commit
memcg: enable accounting for scm_fp_list objects
authorVasily Averin <vvs@virtuozzo.com>
Mon, 19 Jul 2021 10:44:56 +0000 (13:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jul 2021 13:00:38 +0000 (06:00 -0700)
commit816be591014e015e647afb1845102f21a0e7d962
tree0fb3b7875cbcb3fdf333b7ac6470d97d8387e2c9
parentd71bee83f678d615015e46372a09324b8aea8a79
memcg: enable accounting for scm_fp_list objects

unix sockets allows to send file descriptors via SCM_RIGHTS type messages.
Each such send call forces kernel to allocate up to 2Kb memory for
struct scm_fp_list.

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 <vvs@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/scm.c