Skip to content

Commit

Permalink
sched: sysctl, proc_dointvec_minmax() expects int values for
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Eric Dumazet authored and Ingo Molnar committed Dec 18, 2007
1 parent c7af77b commit 73c4efd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit 73c4efd

Please sign in to comment.