Merge remote-tracking branch 'tip/sched/arm64' into for-next/core
[linux-2.6-microblaze.git] / arch / arm64 / kernel / signal.c
index 22899c8..fb54fb7 100644 (file)
@@ -290,6 +290,11 @@ static int restore_sve_fpsimd_context(struct user_ctxs *user)
        /* From now, fpsimd_thread_switch() won't touch thread.sve_state */
 
        sve_alloc(current);
+       if (!current->thread.sve_state) {
+               clear_thread_flag(TIF_SVE);
+               return -ENOMEM;
+       }
+
        err = __copy_from_user(current->thread.sve_state,
                               (char __user const *)user->sve +
                                        SVE_SIG_REGS_OFFSET,
@@ -912,8 +917,7 @@ static void do_signal(struct pt_regs *regs)
        restore_saved_sigmask();
 }
 
-asmlinkage void do_notify_resume(struct pt_regs *regs,
-                                unsigned long thread_flags)
+void do_notify_resume(struct pt_regs *regs, unsigned long thread_flags)
 {
        do {
                if (thread_flags & _TIF_NEED_RESCHED) {