summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2019-07-24 08:23:23 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-09 14:11:04 +0200
commitb9a1ac8e7c03fd09992352c7fb1a61cbbb9ad52b (patch)
tree72ad02b9b8b364fea1f0171a83e844c360581899 /Makefile
parent04f4cd7c0063a265cd25796d98f340d85bcab45d (diff)
lib/timerqueue: Rely on rbtree semantics for next timer
commit 511885d7061eda3eb1faf3f57dcc936ff75863f1 upstream. Simplify the timerqueue code by using cached rbtrees and rely on the tree leftmost node semantics to get the timer with earliest expiration time. This is a drop in conversion, and therefore semantics remain untouched. The runtime overhead of cached rbtrees is be pretty much the same as the current head->next method, noting that when removing the leftmost node, a common operation for the timerqueue, the rb_next(leftmost) is O(1) as well, so the next timer will either be the right node or its parent. Therefore no extra pointer chasing. Finally, the size of the struct timerqueue_head remains the same. Passes several hours of rcutorture. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20190724152323.bojciei3muvfxalm@linux-r8p5 Reference: CVE-2021-20317 Signed-off-by: Nobuhiro Iwamatsu (CIP) <nobuhiro1.iwamatsu@toshiba.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions