[PATCH 2/2] posix-timers: Exposes DELAYTIMER_MAX constant used to govern overruns

From: Daniel Church
Date: Fri Jan 23 2015 - 13:04:10 EST


POSIX.1-2001 specification of timer_getoverrun() supports constant
DELAYTIMER_MAX which prevents overflow and caps overrun count. Exposes
delaytimer_max value to userland via /proc/sys/kernel/delaytimer_max such
that GLIBC can support DELAYTIMER_MAX constant.

Signed-off-by: Daniel Church <dchurch@xxxxxxxxxxx>
---
kernel/sysctl.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 137c7f6..b283808 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -63,6 +63,7 @@
#include <linux/binfmts.h>
#include <linux/sched/sysctl.h>
#include <linux/kexec.h>
+#include <linux/posix-timers.h>

#include <asm/uaccess.h>
#include <asm/processor.h>
@@ -761,6 +762,13 @@ static struct ctl_table kern_table[] = {
},
#endif
{
+ .procname = "delaytimer_max",
+ .data = &delaytimer_max,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
+ },
+ {
.procname = "pid_max",
.data = &pid_max,
.maxlen = sizeof (int),
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/