Skip to content

Commit 22a34c6

Browse files
Madhuparna BhowmikChristian Brauner
authored andcommitted
exit: Fix Sparse errors and warnings
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 <[email protected]> Acked-by: Oleg Nesterov <[email protected]> Acked-by: Christian Brauner <[email protected]> [[email protected]: edit commit message] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 0c282b0 commit 22a34c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/exit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,8 @@ static void forget_original_parent(struct task_struct *father,
619619
reaper = find_new_reaper(father, reaper);
620620
list_for_each_entry(p, &father->children, sibling) {
621621
for_each_thread(p, t) {
622-
t->real_parent = reaper;
623-
BUG_ON((!t->ptrace) != (t->parent == father));
622+
RCU_INIT_POINTER(t->real_parent, reaper);
623+
BUG_ON((!t->ptrace) != (rcu_access_pointer(t->parent) == father));
624624
if (likely(!t->ptrace))
625625
t->parent = t->real_parent;
626626
if (t->pdeath_signal)

0 commit comments

Comments
 (0)