diff options
author | 2020-03-07 08:01:43 -0600 | |
---|---|---|
committer | 2020-03-07 08:01:43 -0600 | |
commit | fa883d6afb158c3c9bf33262272da3b6f0489742 (patch) | |
tree | d1b01d8df824aa31d79ef291fb1e66c4f62e6607 /kernel/exit.c | |
parent | Merge tag 'sound-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound (diff) | |
parent | selftests: pidfd: Add pidfd_fdinfo_test in .gitignore (diff) | |
download | wireguard-linux-fa883d6afb158c3c9bf33262272da3b6f0489742.tar.xz wireguard-linux-fa883d6afb158c3c9bf33262272da3b6f0489742.zip |
Merge tag 'for-linus-2020-03-07' of gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux
Pull thread fixes from Christian Brauner:
"Here are a few hopefully uncontroversial fixes:
- Use RCU_INIT_POINTER() when initializing rcu protected members in
task_struct to fix sparse warnings.
- Add pidfd_fdinfo_test binary to .gitignore file"
* tag 'for-linus-2020-03-07' of gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux:
selftests: pidfd: Add pidfd_fdinfo_test in .gitignore
exit: Fix Sparse errors and warnings
fork: Use RCU_INIT_POINTER() instead of rcu_access_pointer()
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 4 |
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) |