]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0070-x86-platform-UV-Convert-timers-to-use-timer_setup.patch
KPTI: add follow-up fixes
[pve-kernel.git] / patches / kernel / 0070-x86-platform-UV-Convert-timers-to-use-timer_setup.patch
CommitLineData
321d628a
FG
1From 6d96a02c961d41d82738bce9806c430d99acc9f8 Mon Sep 17 00:00:00 2001
2From: Kees Cook <keescook@chromium.org>
3Date: Mon, 16 Oct 2017 16:22:31 -0700
e4cdf2a5 4Subject: [PATCH 070/241] x86/platform/UV: Convert timers to use timer_setup()
321d628a
FG
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9CVE-2017-5754
10
11In preparation for unconditionally passing the struct timer_list pointer to
12all timer callbacks, switch to using the new timer_setup() and from_timer()
13to pass the timer pointer explicitly.
14
15Signed-off-by: Kees Cook <keescook@chromium.org>
16Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17Cc: Dimitri Sivanich <sivanich@hpe.com>
18Cc: Russ Anderson <rja@hpe.com>
19Cc: Mike Travis <mike.travis@hpe.com>
20Link: https://lkml.kernel.org/r/20171016232231.GA100493@beast
21
22(cherry picked from commit 376f3bcebdc999cc737d9052109cc33b573b3a8b)
23Signed-off-by: Andy Whitcroft <apw@canonical.com>
24Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
25(cherry picked from commit 869cbd2b31024e70d574527b8c6851bf2ebbe483)
26Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
27---
28 arch/x86/kernel/apic/x2apic_uv_x.c | 5 ++---
29 1 file changed, 2 insertions(+), 3 deletions(-)
30
31diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
32index 0d57bb9079c9..c0b694810ff4 100644
33--- a/arch/x86/kernel/apic/x2apic_uv_x.c
34+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
35@@ -920,9 +920,8 @@ static __init void uv_rtc_init(void)
36 /*
37 * percpu heartbeat timer
38 */
39-static void uv_heartbeat(unsigned long ignored)
40+static void uv_heartbeat(struct timer_list *timer)
41 {
42- struct timer_list *timer = &uv_scir_info->timer;
43 unsigned char bits = uv_scir_info->state;
44
45 /* Flip heartbeat bit: */
46@@ -947,7 +946,7 @@ static int uv_heartbeat_enable(unsigned int cpu)
47 struct timer_list *timer = &uv_cpu_scir_info(cpu)->timer;
48
49 uv_set_cpu_scir_bits(cpu, SCIR_CPU_HEARTBEAT|SCIR_CPU_ACTIVITY);
50- setup_pinned_timer(timer, uv_heartbeat, cpu);
51+ timer_setup(timer, uv_heartbeat, TIMER_PINNED);
52 timer->expires = jiffies + SCIR_CPU_HB_INTERVAL;
53 add_timer_on(timer, cpu);
54 uv_cpu_scir_info(cpu)->enabled = 1;
55--
562.14.2
57