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

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()

+4 -3
+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)
+1 -1
kernel/fork.c
··· 1508 1508 return 0; 1509 1509 } 1510 1510 sig = kmem_cache_alloc(sighand_cachep, GFP_KERNEL); 1511 - rcu_assign_pointer(tsk->sighand, sig); 1511 + RCU_INIT_POINTER(tsk->sighand, sig); 1512 1512 if (!sig) 1513 1513 return -ENOMEM; 1514 1514
+1
tools/testing/selftests/pidfd/.gitignore
··· 2 2 pidfd_poll_test 3 3 pidfd_test 4 4 pidfd_wait 5 + pidfd_fdinfo_test 5 6 pidfd_getfd_test