[Linux-kernel-mentees] [PATCH] sched.h: Annotate sighand_struct with __rcu

madhuparnabhowmik10 at gmail.com madhuparnabhowmik10 at gmail.com
Wed Jan 22 18:11:56 UTC 2020


From: Madhuparna Bhowmik <madhuparnabhowmik10 at gmail.com>

This patch fixes the following sparse errors:

kernel/fork.c:1511:9: error: incompatible types in comparison expression
kernel/exit.c:100:19: error: incompatible types in comparison expression
kernel/signal.c:1370:27: error: incompatible types in comparison expression

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10 at 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 b511e178a89f..7a351360ad54 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -918,7 +918,7 @@ struct task_struct {
 
 	/* Signal handlers: */
 	struct signal_struct		*signal;
-	struct sighand_struct		*sighand;
+	struct sighand_struct __rcu		*sighand;
 	sigset_t			blocked;
 	sigset_t			real_blocked;
 	/* Restored if set_restore_sigmask() was used: */
-- 
2.17.1



More information about the Linux-kernel-mentees mailing list