Track maximum size of message queues, to be able to configure RLIMIT_MSGQUEUE resource limits. The information is available with taskstats and cgroupstats netlink socket.
Signed-off-by: Topi Miettinen <toiwo...@gmail.com> --- ipc/mqueue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ipc/mqueue.c b/ipc/mqueue.c index ade739f..037ea47 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -287,6 +287,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb, /* all is ok */ info->user = get_uid(u); + update_resource_highwatermark(RLIMIT_MSGQUEUE, u->mq_bytes); } else if (S_ISDIR(mode)) { inc_nlink(inode); /* Some things misbehave if size == 0 on a directory */ -- 2.8.1