Commit dc6e89f3 authored by Jens Axboe's avatar Jens Axboe Committed by sanglipeng
Browse files

nios32: add support for TIF_NOTIFY_SIGNAL

stable inclusion
from stable-v5.10.162
commit cf3c6486731979a78851428d9e45e6f943b5fa92
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7P7OH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cf3c6486731979a78851428d9e45e6f943b5fa92



--------------------------------

[ Upstream commit 42020064 ]

Wire up TIF_NOTIFY_SIGNAL handling for nios32.

Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Acked-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent fc9fb19f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_MEMDIE		4	/* is terminating due to OOM killer */
#define TIF_SECCOMP		5	/* secure computing */
#define TIF_SYSCALL_AUDIT	6	/* syscall auditing active */
#define TIF_NOTIFY_SIGNAL	7	/* signal notifications exist */
#define TIF_RESTORE_SIGMASK	9	/* restore signal mask in do_signal() */

#define TIF_POLLING_NRFLAG	16	/* true if poll_idle() is polling
@@ -97,6 +98,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_NEED_RESCHED	(1 << TIF_NEED_RESCHED)
#define _TIF_SECCOMP		(1 << TIF_SECCOMP)
#define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
#define _TIF_NOTIFY_SIGNAL	(1 << TIF_NOTIFY_SIGNAL)
#define _TIF_RESTORE_SIGMASK	(1 << TIF_RESTORE_SIGMASK)
#define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)

+2 −1
Original line number Diff line number Diff line
@@ -309,7 +309,8 @@ asmlinkage int do_notify_resume(struct pt_regs *regs)
	if (!user_mode(regs))
		return 0;

	if (test_thread_flag(TIF_SIGPENDING)) {
	if (test_thread_flag(TIF_SIGPENDING) ||
	    test_thread_flag(TIF_NOTIFY_SIGNAL)) {
		int restart = do_signal(regs);

		if (unlikely(restart)) {