[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200130062028.4870-1-madhuparnabhowmik10@gmail.com>
Date: Thu, 30 Jan 2020 11:50:28 +0530
From: madhuparnabhowmik10@...il.com
To: peterz@...radead.org, mingo@...nel.org, oleg@...hat.com,
christian.brauner@...ntu.com, paulmck@...nel.org
Cc: linux-kernel@...r.kernel.org, joel@...lfernandes.org,
linux-kernel-mentees@...ts.linuxfoundation.org,
rcu@...r.kernel.org,
Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
Subject: [PATCH] exit.c: Fix Sparse errors and warnings
From: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
This patch fixes the following sparse error:
kernel/exit.c:627:25: error: incompatible types in comparison expression
And the following warning:
kernel/exit.c:626:40: warning: incorrect type in assignment
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
---
kernel/exit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/exit.c b/kernel/exit.c
index bcbd59888e67..daf827a4aa25 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -623,8 +623,8 @@ static void forget_original_parent(struct task_struct *father,
reaper = find_new_reaper(father, reaper);
list_for_each_entry(p, &father->children, sibling) {
for_each_thread(p, t) {
- t->real_parent = reaper;
- BUG_ON((!t->ptrace) != (t->parent == father));
+ RCU_INIT_POINTER(t->real_parent, reaper);
+ BUG_ON((!t->ptrace) != (rcu_access_pointer(t->parent) == father));
if (likely(!t->ptrace))
t->parent = t->real_parent;
if (t->pdeath_signal)
--
2.17.1
Powered by blists - more mailing lists