Merge tag 'core-rcu-2020-06-01' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 1 Jun 2020 19:56:29 +0000 (12:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 1 Jun 2020 19:56:29 +0000 (12:56 -0700)
Pull RCU updates from Ingo Molnar:
 "The RCU updates for this cycle were:

   - RCU-tasks update, including addition of RCU Tasks Trace for BPF use
     and TASKS_RUDE_RCU

   - kfree_rcu() updates.

   - Remove scheduler locking restriction

   - RCU CPU stall warning updates.

   - Torture-test updates.

   - Miscellaneous fixes and other updates"

* tag 'core-rcu-2020-06-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (103 commits)
  rcu: Allow for smp_call_function() running callbacks from idle
  rcu: Provide rcu_irq_exit_check_preempt()
  rcu: Abstract out rcu_irq_enter_check_tick() from rcu_nmi_enter()
  rcu: Provide __rcu_is_watching()
  rcu: Provide rcu_irq_exit_preempt()
  rcu: Make RCU IRQ enter/exit functions rely on in_nmi()
  rcu/tree: Mark the idle relevant functions noinstr
  x86: Replace ist_enter() with nmi_enter()
  x86/mce: Send #MC singal from task work
  x86/entry: Get rid of ist_begin/end_non_atomic()
  sched,rcu,tracing: Avoid tracing before in_nmi() is correct
  sh/ftrace: Move arch_ftrace_nmi_{enter,exit} into nmi exception
  lockdep: Always inline lockdep_{off,on}()
  hardirq/nmi: Allow nested nmi_enter()
  arm64: Prepare arch_nmi_enter() for recursion
  printk: Disallow instrumenting print_nmi_enter()
  printk: Prepare for nested printk_nmi_enter()
  rcutorture: Convert ULONG_CMP_LT() to time_before()
  torture: Add a --kasan argument
  torture: Save a few lines by using config_override_param initially
  ...

1  2 
kernel/fork.c

diff --combined kernel/fork.c
@@@ -1683,6 -1683,11 +1683,11 @@@ static inline void rcu_copy_process(str
        INIT_LIST_HEAD(&p->rcu_tasks_holdout_list);
        p->rcu_tasks_idle_cpu = -1;
  #endif /* #ifdef CONFIG_TASKS_RCU */
+ #ifdef CONFIG_TASKS_TRACE_RCU
+       p->trc_reader_nesting = 0;
+       p->trc_reader_special.s = 0;
+       INIT_LIST_HEAD(&p->trc_holdout_list);
+ #endif /* #ifdef CONFIG_TASKS_TRACE_RCU */
  }
  
  struct pid *pidfd_pid(const struct file *file)
@@@ -2486,11 -2491,11 +2491,11 @@@ long do_fork(unsigned long clone_flags
              int __user *child_tidptr)
  {
        struct kernel_clone_args args = {
 -              .flags          = (clone_flags & ~CSIGNAL),
 +              .flags          = (lower_32_bits(clone_flags) & ~CSIGNAL),
                .pidfd          = parent_tidptr,
                .child_tid      = child_tidptr,
                .parent_tid     = parent_tidptr,
 -              .exit_signal    = (clone_flags & CSIGNAL),
 +              .exit_signal    = (lower_32_bits(clone_flags) & CSIGNAL),
                .stack          = stack_start,
                .stack_size     = stack_size,
        };
  pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
  {
        struct kernel_clone_args args = {
 -              .flags          = ((flags | CLONE_VM | CLONE_UNTRACED) & ~CSIGNAL),
 -              .exit_signal    = (flags & CSIGNAL),
 +              .flags          = ((lower_32_bits(flags) | CLONE_VM |
 +                                  CLONE_UNTRACED) & ~CSIGNAL),
 +              .exit_signal    = (lower_32_bits(flags) & CSIGNAL),
                .stack          = (unsigned long)fn,
                .stack_size     = (unsigned long)arg,
        };
@@@ -2571,11 -2575,11 +2576,11 @@@ SYSCALL_DEFINE5(clone, unsigned long, c
  #endif
  {
        struct kernel_clone_args args = {
 -              .flags          = (clone_flags & ~CSIGNAL),
 +              .flags          = (lower_32_bits(clone_flags) & ~CSIGNAL),
                .pidfd          = parent_tidptr,
                .child_tid      = child_tidptr,
                .parent_tid     = parent_tidptr,
 -              .exit_signal    = (clone_flags & CSIGNAL),
 +              .exit_signal    = (lower_32_bits(clone_flags) & CSIGNAL),
                .stack          = newsp,
                .tls            = tls,
        };