[PATCH 11/14] resource limits: track highwater mark of number of pending signals
From: Topi Miettinen
Date: Fri Jul 15 2016 - 06:38:39 EST
Track maximum number of pending signals, to be able to configure
RLIMIT_SIGPENDING resource limits. The information is available
with taskstats and cgroupstats netlink socket.
Signed-off-by: Topi Miettinen <toiwoton@xxxxxxxxx>
---
kernel/signal.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/signal.c b/kernel/signal.c
index 96e9bc4..670d609 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -387,6 +387,8 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimi
INIT_LIST_HEAD(&q->list);
q->flags = 0;
q->user = user;
+ task_update_resource_highwatermark(t, RLIMIT_SIGPENDING,
+ atomic_read(&user->sigpending));
}
return q;
--
2.8.1