[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220208143812.01f03686@gandalf.local.home>
Date: Tue, 8 Feb 2022 14:38:12 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Boqun Feng <boqun.feng@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Byungchul Park <byungchul.park@....com>,
"Paul E. McKenney" <paul.mckenney@...aro.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Radoslaw Burny <rburny@...gle.com>, Tejun Heo <tj@...nel.org>,
Lai Jiangshan <jiangshanlai@...il.com>
Subject: Re: [PATCH 04/12] workqueue: Protect lockdep functions with #ifdef
On Tue, 8 Feb 2022 10:42:00 -0800
Namhyung Kim <namhyung@...nel.org> wrote:
> With upcoming lock tracepoints config, it'd define some of lockdep
> functions without enabling CONFIG_LOCKDEP actually. The existing code
> assumes those functions will be removed by the preprocessor but it's
> not the case anymore. Let's protect the code with #ifdef's explicitly.
>
> Cc: Tejun Heo <tj@...nel.org>
> Cc: Lai Jiangshan <jiangshanlai@...il.com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
> kernel/workqueue.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 33f1106b4f99..405e27385f74 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -2279,8 +2279,11 @@ __acquires(&pool->lock)
>
> raw_spin_unlock_irq(&pool->lock);
>
> +#ifdef CONFIG_LOCKDEP
> lock_map_acquire(&pwq->wq->lockdep_map);
> lock_map_acquire(&lockdep_map);
> +#endif
Same here:
lock_map_acquire_raw() ?
That is always a nop when CONFIG_LOCKDEP is not set.
-- Steve
Powered by blists - more mailing lists