the scheduled -EINVAL for invalid timevals in setitimer
PATCH 1/1 the scheduled -EINVAL for invalid timevals in setitimer
As scheduled, do_setitimer() now returns -EINVAL for invalid timeval.
---
Documentation/feature-removal-schedule.txt | 12 ---- kernel/itimer.c | 58 --------------------- 2 files changed, 2 insertions(+), 68 deletions(-)
Documentation/feature-removal-schedule.txt renamed from Documentation/feature-removal-schedule.txt.old +0 -12
@@ -104,18 +104,6 @@ Who: Adrian Bunk <[email protected]> --------------------------- -What: Usage of invalid timevals in setitimer -When: March 2007 -Why: POSIX requires to validate timevals in the setitimer call. This - was never done by Linux. The invalid (e.g. negative timevals) were - silently converted to more or less random timeouts and intervals. - Until the removal a per boot limited number of warnings is printed - and the timevals are sanitized. - -Who: Thomas Gleixner <[email protected]> - ---------------------------- - What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports (temporary transition config option provided until then) The transition config option will also be removed at the same time.
kernel/itimer.c renamed from kernel/itimer.c.old +2 -56
76 lines not on this page · raw message
Quoted 3 lines · Adrian Bunk
As scheduled,
do_setitimer()now returns-EINVALfor invalid timeval.Signed-off-by Adrian Bunk <[email protected]>
Ha, you beat me by a minute :)
kernel/itimer.c int do_setitimer(int which, struct itime · line 157
Quoted 4 lines
kernel/itimer.c renamed from kernel/itimer.c.old +2
-1-check_itimerval (value); +if (unlikely (!timeval_valid (&value->it_value) || !timeval_valid (&value->it_interval))) +return -EINVAL ;
Please make this:
+ if (!timeval_valid(&value->it_value) ||
+ !timeval_valid(&value->it_interval))
+ return -EINVAL;
tglx
PATCH 1/1 the scheduled -EINVAL for invalid timevals in setitimer
Quoted 14 lines · Thomas Gleixner
Quoted 3 lines · Adrian Bunk
As scheduled,
do_setitimer()now returns-EINVALfor invalid timeval.Signed-off-by Adrian Bunk <[email protected]>Ha, you beat me by a minute :)
Review
Quoted 4 lines
(quoted diff) +2
-1- check_itimerval(value); + if (unlikely(!timeval_valid(&value->it_value) || !timeval_valid(&value->it_interval))) + return -EINVAL;Please make this:
Review
Quoted 3 lines
(quoted diff) +3
-0+ if (!timeval_valid(&value->it_value) || + !timeval_valid(&value->it_interval)) + return -EINVAL;
Updated patch below.
Quoted 1 line
tglx
cu
Adrian
<-- snip -->
As scheduled, do_setitimer() now returns -EINVAL for invalid timeval.
---
Documentation/feature-removal-schedule.txt | 12 ---- kernel/itimer.c | 59 +-------------------- 2 files changed, 3 insertions(+), 68 deletions(-)
As scheduled, do_setitimer() now returns -EINVAL for invalid timeval.
---
Documentation/feature-removal-schedule.txt | 12 ---- kernel/itimer.c | 58 --------------------- 2 files changed, 2 insertions(+), 68 deletions(-)
Documentation/feature-removal-schedule.txt renamed from Documentation/feature-removal-schedule.txt.old +0 -12
@@ -104,18 +104,6 @@ Who: Adrian Bunk <[email protected]> --------------------------- -What: Usage of invalid timevals in setitimer -When: March 2007 -Why: POSIX requires to validate timevals in the setitimer call. This - was never done by Linux. The invalid (e.g. negative timevals) were - silently converted to more or less random timeouts and intervals. - Until the removal a per boot limited number of warnings is printed - and the timevals are sanitized. - -Who: Thomas Gleixner <[email protected]> - ---------------------------- - What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports (temporary transition config option provided until then) The transition config option will also be removed at the same time.
kernel/itimer.c renamed from kernel/itimer.c.old +3 -56
77 lines not on this page · raw message
Quoted 3 lines · Adrian Bunk
As scheduled,
do_setitimer()now returns-EINVALfor invalid timeval.Signed-off-by Adrian Bunk <[email protected]>
Quoted 6 lines · On Sun, 15 Apr 2007 05:29:22 +0200 Thomas Gleixner <[email protected]> wrote:
Quoted 3 lines · Adrian Bunk
As scheduled,
do_setitimer()now returns-EINVALfor invalid timeval.Signed-off-by Adrian Bunk <[email protected]>Acked-by Thomas Gleixner <[email protected]>
Worried-about-by: me
I guess if it starts biting people we can revert it from 2.6.22.x.