aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel
diff options
context:
space:
mode:
authorMadhuparna Bhowmik <[email protected]>2020-01-30 11:50:28 +0530
committerChristian Brauner <[email protected]>2020-02-28 13:34:39 +0100
commit22a34c6fe0ffc1d92ee26a25913fadf347258fd6 (patch)
tree8fa3c85b7a93ec7e1dab6d8f8b4e6bfafbc5aa11 /kernel
parentfork: Use RCU_INIT_POINTER() instead of rcu_access_pointer() (diff)
downloadwireguard-linux-22a34c6fe0ffc1d92ee26a25913fadf347258fd6.tar.xz
wireguard-linux-22a34c6fe0ffc1d92ee26a25913fadf347258fd6.zip
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]>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 2833ffb0c211..0b81b26a872a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -619,8 +619,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)
OSZAR »