| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
- From: Kees Cook <[email protected]>
- Date: Mon, 16 Oct 2017 16:22:31 -0700
- Subject: [PATCH] x86/platform/UV: Convert timers to use timer_setup()
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- CVE-2017-5754
- In preparation for unconditionally passing the struct timer_list pointer to
- all timer callbacks, switch to using the new timer_setup() and from_timer()
- to pass the timer pointer explicitly.
- Signed-off-by: Kees Cook <[email protected]>
- Signed-off-by: Thomas Gleixner <[email protected]>
- Cc: Dimitri Sivanich <[email protected]>
- Cc: Russ Anderson <[email protected]>
- Cc: Mike Travis <[email protected]>
- Link: https://lkml.kernel.org/r/20171016232231.GA100493@beast
- (cherry picked from commit 376f3bcebdc999cc737d9052109cc33b573b3a8b)
- Signed-off-by: Andy Whitcroft <[email protected]>
- Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
- (cherry picked from commit 869cbd2b31024e70d574527b8c6851bf2ebbe483)
- Signed-off-by: Fabian Grünbichler <[email protected]>
- ---
- arch/x86/kernel/apic/x2apic_uv_x.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
- diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
- index 0d57bb9079c9..c0b694810ff4 100644
- --- a/arch/x86/kernel/apic/x2apic_uv_x.c
- +++ b/arch/x86/kernel/apic/x2apic_uv_x.c
- @@ -920,9 +920,8 @@ static __init void uv_rtc_init(void)
- /*
- * percpu heartbeat timer
- */
- -static void uv_heartbeat(unsigned long ignored)
- +static void uv_heartbeat(struct timer_list *timer)
- {
- - struct timer_list *timer = &uv_scir_info->timer;
- unsigned char bits = uv_scir_info->state;
-
- /* Flip heartbeat bit: */
- @@ -947,7 +946,7 @@ static int uv_heartbeat_enable(unsigned int cpu)
- struct timer_list *timer = &uv_cpu_scir_info(cpu)->timer;
-
- uv_set_cpu_scir_bits(cpu, SCIR_CPU_HEARTBEAT|SCIR_CPU_ACTIVITY);
- - setup_pinned_timer(timer, uv_heartbeat, cpu);
- + timer_setup(timer, uv_heartbeat, TIMER_PINNED);
- timer->expires = jiffies + SCIR_CPU_HB_INTERVAL;
- add_timer_on(timer, cpu);
- uv_cpu_scir_info(cpu)->enabled = 1;
- --
- 2.14.2
|