aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-03-07 08:01:43 -0600
committerLinus Torvalds <torvalds@linux-foundation.org>2020-03-07 08:01:43 -0600
commitfa883d6afb158c3c9bf33262272da3b6f0489742 (patch)
treed1b01d8df824aa31d79ef291fb1e66c4f62e6607 /kernel/exit.c
parentMerge tag 'sound-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound (diff)
parentselftests: pidfd: Add pidfd_fdinfo_test in .gitignore (diff)
downloadwireguard-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.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)