OSDN Git Service

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)
commit2c6ad20b581e37d6331010ee1d28b3307c90ba0a
tree0fb3b7875cbcb3fdf333b7ac6470d97d8387e2c9
parent1b51d8271973e4966078f0c1a5cb061ae9a424d2
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