Skip to content

Commit 73c4efd

Browse files
Eric DumazetIngo Molnar
authored andcommitted
sched: sysctl, proc_dointvec_minmax() expects int values for
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> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent c7af77b commit 73c4efd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kernel/sysctl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ static struct ctl_table root_table[] = {
225225
};
226226

227227
#ifdef CONFIG_SCHED_DEBUG
228-
static unsigned long min_sched_granularity_ns = 100000; /* 100 usecs */
229-
static unsigned long max_sched_granularity_ns = NSEC_PER_SEC; /* 1 second */
230-
static unsigned long min_wakeup_granularity_ns; /* 0 usecs */
231-
static unsigned long max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */
228+
static int min_sched_granularity_ns = 100000; /* 100 usecs */
229+
static int max_sched_granularity_ns = NSEC_PER_SEC; /* 1 second */
230+
static int min_wakeup_granularity_ns; /* 0 usecs */
231+
static int max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */
232232
#endif
233233

234234
static struct ctl_table kern_table[] = {

0 commit comments

Comments
 (0)