Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <madhuparnabhowmik10@gmail.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
[christian.brauner@ubuntu.com: edit commit message]
Link: https://lore.kernel.org/r/20200130062028.4870-1-madhuparnabhowmik10@gmail.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

authored by

Madhuparna Bhowmik and committed by
Christian Brauner
22a34c6f 0c282b06

+2 -2
+2 -2
kernel/exit.c
··· 619 619 reaper = find_new_reaper(father, reaper); 620 620 list_for_each_entry(p, &father->children, sibling) { 621 621 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)); 624 624 if (likely(!t->ptrace)) 625 625 t->parent = t->real_parent; 626 626 if (t->pdeath_signal)