[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200208144550.18486-1-frextrite@gmail.com>
Date: Sat, 8 Feb 2020 20:15:51 +0530
From: Amol Grover <frextrite@...il.com>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>
Cc: linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org,
Joel Fernandes <joel@...lfernandes.org>,
Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>,
"Paul E . McKenney" <paulmck@...nel.org>,
Amol Grover <frextrite@...il.com>
Subject: [PATCH] sched: Annotate perf_event_ctxp with __rcu
perf_event_ctxp is used in RCU context in kernel/events/core.c,
tell sparse about it as well.
Fix the following instances of sparse error:
kernel/events/core.c:1384:15: error: incompatible types in comparison
kernel/events/core.c:1397:28: error: incompatible types in comparison
kernel/events/core.c:3264:25: error: incompatible types in comparison
kernel/events/core.c:3265:25: error: incompatible types in comparison
kernel/events/core.c:4340:25: error: incompatible types in comparison
kernel/events/core.c:7091:23: error: incompatible types in comparison
kernel/events/core.c:7870:23: error: incompatible types in comparison
kernel/events/core.c:8971:23: error: incompatible types in comparison
kernel/events/core.c:11865:9: error: incompatible types in comparison
kernel/events/core.c:11975:17: error: incompatible types in comparison
Signed-off-by: Amol Grover <frextrite@...il.com>
---
include/linux/sched.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 716ad1d8d95e..5df1778cfdf4 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1063,7 +1063,7 @@ struct task_struct {
unsigned int futex_state;
#endif
#ifdef CONFIG_PERF_EVENTS
- struct perf_event_context *perf_event_ctxp[perf_nr_task_contexts];
+ struct perf_event_context __rcu *perf_event_ctxp[perf_nr_task_contexts];
struct mutex perf_event_mutex;
struct list_head perf_event_list;
#endif
--
2.24.1
Powered by blists - more mailing lists