* [PATCH] sysctl : proc_dointvec_minmax() expects int values for min/max guard values
@ 2007-12-12 10:22 Eric Dumazet
2007-12-12 10:33 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2007-12-12 10:22 UTC (permalink / raw)
To: Andrew Morton; +Cc: Ingo Molnar, linux kernel
min_sched_granularity_ns, max_sched_granularity_ns, min_wakeup_granularity_ns
and max_wakeup_granularity_ns are declared "unsigned long".
This is incorrect since proc_dointvec_minmax() expects plain "int" guard values.
This bug only triggers on big endian 64 bit arches.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 8ac5171..707a26b 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -225,10 +225,10 @@ static struct ctl_table root_table[] = {
};
#ifdef CONFIG_SCHED_DEBUG
-static unsigned long min_sched_granularity_ns = 100000; /* 100 usecs */
-static unsigned long max_sched_granularity_ns = NSEC_PER_SEC; /* 1 second */
-static unsigned long min_wakeup_granularity_ns; /* 0 usecs */
-static unsigned long max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */
+static int min_sched_granularity_ns = 100000; /* 100 usecs */
+static int max_sched_granularity_ns = NSEC_PER_SEC; /* 1 second */
+static int min_wakeup_granularity_ns; /* 0 usecs */
+static int max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */
#endif
static struct ctl_table kern_table[] = {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-12 10:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-12 10:22 [PATCH] sysctl : proc_dointvec_minmax() expects int values for min/max guard values Eric Dumazet
2007-12-12 10:33 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox