diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-07-19 21:06:08 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-07-19 21:06:08 +0200 |
commit | 66e4b63624fcfa47f4d4e0d451f22a8f67902426 (patch) | |
tree | d7164cbc6d3500da31638496db69635287ad5c11 /arch | |
parent | Merge tag 'sched-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
parent | timer: Fix wheel index calculation on last level (diff) | |
download | linux-66e4b63624fcfa47f4d4e0d451f22a8f67902426.tar.xz linux-66e4b63624fcfa47f4d4e0d451f22a8f67902426.zip |
Merge tag 'timers-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into master
Pull timer fixes from Thomas Gleixner:
"Two fixes for the timer wheel:
- A timer which is already expired at enqueue time can set the
base->next_expiry value backwards. As a consequence base->clk can
be set back as well. This can lead to timers expiring early. Add a
sanity check to prevent this.
- When a timer is queued with an expiry time beyond the wheel
capacity then it should be queued in the bucket of the last wheel
level which is expiring last.
The code adjusted the expiry time to the maximum wheel capacity,
which is only correct when the wheel clock is 0. Aside of that the
check whether the delta is larger than wheel capacity does not
check the delta, it checks the expiry value itself. As a result
timers can expire at random.
Fix this by checking the right variable and adjust expiry time so
it becomes base->clock plus capacity which places it into the
outmost bucket in the last wheel level"
* tag 'timers-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
timer: Fix wheel index calculation on last level
timer: Prevent base->clk from moving backward
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions