[RFC 14/18] limits: track RLIMIT_SIGPENDING actual max
From: Topi Miettinen
Date: Mon Jun 13 2016 - 15:48:30 EST
Track maximum number of pending signals, presented in /proc/self/limits.
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..c8fbccd 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;
+ /* XXX resource limits apply per task, not per user */
+ bump_rlimit(RLIMIT_SIGPENDING, atomic_read(&user->sigpending));
}
return q;
--
2.8.1