Merge branch 'core/urgent' into core/entry
authorThomas Gleixner <tglx@linutronix.de>
Wed, 4 Nov 2020 17:14:52 +0000 (18:14 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 4 Nov 2020 17:14:52 +0000 (18:14 +0100)
Pick up the entry fix before further modifications.

1  2 
arch/x86/kernel/signal.c
include/linux/entry-common.h
include/linux/tracehook.h
kernel/entry/common.c
kernel/entry/kvm.c
kernel/events/uprobes.c
kernel/signal.c
kernel/task_work.c

Simple merge
  # define _TIF_UPROBE                  (0)
  #endif
  
 +#ifndef _TIF_NOTIFY_SIGNAL
 +# define _TIF_NOTIFY_SIGNAL           (0)
 +#endif
 +
  /*
-  * TIF flags handled in syscall_enter_from_usermode()
+  * TIF flags handled in syscall_enter_from_user_mode()
   */
  #ifndef ARCH_SYSCALL_ENTER_WORK
  # define ARCH_SYSCALL_ENTER_WORK      (0)
Simple merge
@@@ -139,11 -157,10 +165,10 @@@ static unsigned long exit_to_user_mode_
                if (ti_work & _TIF_PATCH_PENDING)
                        klp_update_patch_state(current);
  
 -              if (ti_work & _TIF_SIGPENDING)
 -                      arch_do_signal(regs);
 +              if (ti_work & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
 +                      handle_signal_work(regs, ti_work);
  
                if (ti_work & _TIF_NOTIFY_RESUME) {
-                       clear_thread_flag(TIF_NOTIFY_RESUME);
                        tracehook_notify_resume(regs);
                        rseq_handle_notify_resume(NULL, regs);
                }
Simple merge
Simple merge
diff --cc kernel/signal.c
Simple merge
@@@ -52,10 -29,11 +57,10 @@@ static void task_work_notify_signal(str
   * RETURNS:
   * 0 if succeeds or -ESRCH.
   */
- int
task_work_add(struct task_struct *task, struct callback_head *work, int notify)
+ int task_work_add(struct task_struct *task, struct callback_head *work,
                enum task_work_notify_mode notify)
  {
        struct callback_head *head;
 -      unsigned long flags;
  
        do {
                head = READ_ONCE(task->task_works);
                set_notify_resume(task);
                break;
        case TWA_SIGNAL:
 -              /*
 -               * Only grab the sighand lock if we don't already have some
 -               * task_work pending. This pairs with the smp_store_mb()
 -               * in get_signal(), see comment there.
 -               */
 -              if (!(READ_ONCE(task->jobctl) & JOBCTL_TASK_WORK) &&
 -                  lock_task_sighand(task, &flags)) {
 -                      task->jobctl |= JOBCTL_TASK_WORK;
 -                      signal_wake_up(task, 0);
 -                      unlock_task_sighand(task, &flags);
 -              }
 +              task_work_notify_signal(task);
                break;
+       default:
+               WARN_ON_ONCE(1);
+               break;
        }
  
        return 0;