Commit 20cd514d authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

frv: restart_block.fn needs to be reset on sigreturn

Reset restart_block.fn on executing a sigreturn such that any currently
pending system call restarts will be forced to return -EINTR.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 31c4a3d3
...@@ -121,6 +121,9 @@ static int restore_sigcontext(struct sigcontext __user *sc, int *_gr8) ...@@ -121,6 +121,9 @@ static int restore_sigcontext(struct sigcontext __user *sc, int *_gr8)
struct user_context *user = current->thread.user; struct user_context *user = current->thread.user;
unsigned long tbr, psr; unsigned long tbr, psr;
/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
tbr = user->i.tbr; tbr = user->i.tbr;
psr = user->i.psr; psr = user->i.psr;
if (copy_from_user(user, &sc->sc_context, sizeof(sc->sc_context))) if (copy_from_user(user, &sc->sc_context, sizeof(sc->sc_context)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment