Re: [BUG] timer_migration interface accepts any number as input in 2.6.30-git9
- From: Arun R Bharadwaj <arun@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Jun 2009 15:51:26 +0530
* poornima nayak <mpnayak@xxxxxxxxxxxxxxxxxx> [2009-06-17 14:42:16]:
Hi
Timer migration interface /proc/sys/kernel/timer_migration in
2.6.30-git9 accepts any numerical value as input.
Steps to reproduce
1. echo -6666666 > /proc/sys/kernel/timer_migration
2. cat /proc/sys/kernel/timer_migration
-6666666
1. echo 44444444444444444444444444444444444444444444444444444444444 > /proc/sys/kernel/timer_migration
2. cat /proc/sys/kernel/timer_migration
-1357789412
Expected behavior: Should 'echo: write error: Invalid argument' while
setting any value other then 0 & 1
Regards
Poornima
Hi Poornima,
Thanks for reporting the bug.
Hope this patch removes the bug.
The patch is based against the latest -tip/master.
--arun
Signed-off-by: Arun R Bharadwaj <arun@xxxxxxxxxxxxxxxxxx>
---
kernel/sysctl.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: linux.trees.git/kernel/sysctl.c
===================================================================
--- linux.trees.git.orig/kernel/sysctl.c
+++ linux.trees.git/kernel/sysctl.c
@@ -335,7 +335,10 @@ static struct ctl_table kern_table[] = {
.data = &sysctl_timer_migration,
.maxlen = sizeof(unsigned int),
.mode = 0644,
- .proc_handler = &proc_dointvec,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ .extra2 = &one,
},
#endif
{
--
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/
- Follow-Ups:
- Re: [BUG] timer_migration interface accepts any number as input in 2.6.30-git9
- From: poornima nayak
- Re: [BUG] timer_migration interface accepts any number as input in 2.6.30-git9
- From: Amerigo Wang
- Re: [BUG] timer_migration interface accepts any number as input in 2.6.30-git9
- References:
- [BUG] timer_migration interface accepts any number as input in 2.6.30-git9
- From: poornima nayak
- [BUG] timer_migration interface accepts any number as input in 2.6.30-git9
- Prev by Date: Re: [bug] __nf_ct_refresh_acct(): WARNING: at lib/list_debug.c:30 __list_add+0x7d/0xad()
- Next by Date: Re: [PATCH 2/6] atmel-mci: Platform configuration to the the atmel-mci driver
- Previous by thread: [BUG] timer_migration interface accepts any number as input in 2.6.30-git9
- Next by thread: Re: [BUG] timer_migration interface accepts any number as input in 2.6.30-git9
- Index(es):
Relevant Pages
|