lkml.org 
[lkml]   [2020]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched: Annotate perf_event_ctxp with __rcu
Date
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@gmail.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
\
 
 \ /
  Last update: 2020-02-08 15:47    [W:0.033 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site