Repository navigation
Commit 1a010e2
sched/rt: Check integer overflow at usec to nsec conversion
Example of unhandled overflows:
# echo 18446744073709651 > cpu.rt_runtime_us
# cat cpu.rt_runtime_us
99
# echo 18446744073709900 > cpu.rt_period_us
# cat cpu.rt_period_us
348
After this patch they will fail with -EINVAL.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/155125501739.293431.5252197504404771496.stgit@buzz
Signed-off-by: Ingo Molnar <mingo@kernel.org>1 parent bee9853 commit 1a010e2
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2555 | 2555 | | |
2556 | 2556 | | |
2557 | 2557 | | |
| 2558 | + | |
| 2559 | + | |
2558 | 2560 | | |
2559 | 2561 | | |
2560 | 2562 | | |
| |||
2575 | 2577 | | |
2576 | 2578 | | |
2577 | 2579 | | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
2578 | 2583 | | |
2579 | 2584 | | |
2580 | 2585 | | |
| |||
0 commit comments