summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-01-31 21:43:46 +0000
committerkib <kib@FreeBSD.org>2015-01-31 21:43:46 +0000
commit3bbc91d138d490edd1e55e311bae6c167da61fb8 (patch)
treec59ea8ad2996445d89d6f2338e4a25a24ab968a8 /sys/sparc64
parent1831e3d7dcde53b6f53b3d79d72dc59b8cc1420b (diff)
downloadFreeBSD-src-3bbc91d138d490edd1e55e311bae6c167da61fb8.zip
FreeBSD-src-3bbc91d138d490edd1e55e311bae6c167da61fb8.tar.gz
Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as
const. On x86, even after the machine context is supposedly read into the struct ucontext, lazy FPU state save code might only mark the FPU data as hardware-owned. Later, set_fpcontext() needs to fetch the state from hardware, modifying the *mcp. The set_mcontext(9) is called from sigreturn(2) and setcontext(2) implementations and old create_thread(2) interface, which throw the *mcp out after the set_mcontext() call. Reported by: dim Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 57d7a66..67f7d64 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -811,7 +811,7 @@ get_mcontext(struct thread *td, mcontext_t *mc, int flags)
}
int
-set_mcontext(struct thread *td, const mcontext_t *mc)
+set_mcontext(struct thread *td, mcontext_t *mc)
{
struct trapframe *tf;
struct pcb *pcb;
OpenPOWER on IntegriCloud