Commit b98a9a51 authored by David S. Miller's avatar David S. Miller Committed by Jiri Slaby

sparc64: Fix sparc64_set_context stack handling.

[ Upstream commit 397d1533 ]

Like a signal return, we should use synchronize_user_stack() rather
than flush_user_windows().
Reported-by: default avatarIlya Malakhov <ilmalakhovthefirst@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 40fd3377
...@@ -49,7 +49,7 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs) ...@@ -49,7 +49,7 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs)
unsigned char fenab; unsigned char fenab;
int err; int err;
flush_user_windows(); synchronize_user_stack();
if (get_thread_wsaved() || if (get_thread_wsaved() ||
(((unsigned long)ucp) & (sizeof(unsigned long)-1)) || (((unsigned long)ucp) & (sizeof(unsigned long)-1)) ||
(!__access_ok(ucp, sizeof(*ucp)))) (!__access_ok(ucp, sizeof(*ucp))))
......
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