From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751354AbeAPDoN (ORCPT + 1 other); Mon, 15 Jan 2018 22:44:13 -0500 Received: from terminus.zytor.com ([65.50.211.136]:48659 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751139AbeAPDoL (ORCPT ); Mon, 15 Jan 2018 22:44:11 -0500 Date: Mon, 15 Jan 2018 19:40:51 -0800 From: tip-bot for Thomas Gleixner Message-ID: Cc: peterz@infradead.org, frederic@kernel.org, hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org, anna-maria@linutronix.de, hch@lst.de, tglx@linutronix.de, john.stultz@linaro.org, linux-kernel@vger.kernel.org Reply-To: peterz@infradead.org, hpa@zytor.com, frederic@kernel.org, hch@lst.de, anna-maria@linutronix.de, torvalds@linux-foundation.org, mingo@kernel.org, tglx@linutronix.de, john.stultz@linaro.org, linux-kernel@vger.kernel.org In-Reply-To: <20171221104205.7269-3-anna-maria@linutronix.de> References: <20171221104205.7269-3-anna-maria@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] hrtimer: Correct blatantly incorrect comment Git-Commit-ID: d05ca13b8d3f685667b3b1748fa89285466270c5 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Commit-ID: d05ca13b8d3f685667b3b1748fa89285466270c5 Gitweb: https://git.kernel.org/tip/d05ca13b8d3f685667b3b1748fa89285466270c5 Author: Thomas Gleixner AuthorDate: Thu, 21 Dec 2017 11:41:31 +0100 Committer: Ingo Molnar CommitDate: Tue, 16 Jan 2018 02:35:44 +0100 hrtimer: Correct blatantly incorrect comment The protection of a hrtimer which runs its callback against migration to a different CPU has nothing to do with hard interrupt context. The protection against migration of a hrtimer running the expiry callback is the pointer in the cpu_base which holds a pointer to the currently running timer. This pointer is evaluated in the code which potentially switches the timer base and makes sure it's kept on the CPU on which the callback is running. Reported-by: Anna-Maria Gleixner Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Gleixner Reviewed-by: Frederic Weisbecker Cc: Christoph Hellwig Cc: John Stultz Cc: Linus Torvalds Cc: Peter Zijlstra Cc: keescook@chromium.org Link: http://lkml.kernel.org/r/20171221104205.7269-3-anna-maria@linutronix.de Signed-off-by: Ingo Molnar --- kernel/time/hrtimer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 1d06d2b..7687355 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1195,9 +1195,9 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base, timer->is_rel = false; /* - * Because we run timers from hardirq context, there is no chance - * they get migrated to another cpu, therefore its safe to unlock - * the timer base. + * The timer is marked as running in the CPU base, so it is + * protected against migration to a different CPU even if the lock + * is dropped. */ raw_spin_unlock(&cpu_base->lock); trace_hrtimer_expire_entry(timer, now);