diff options
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/rwindow.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/rwindow.c b/sys/sparc64/sparc64/rwindow.c index 2a29a23..0c5e5a6 100644 --- a/sys/sparc64/sparc64/rwindow.c +++ b/sys/sparc64/sparc64/rwindow.c @@ -60,6 +60,8 @@ rwindow_load(struct thread *td, struct trapframe *tf, int n) for (i = 0; i < n; i++) { CTR1(KTR_TRAP, "rwindow_load: usp=%#lx", usp); usp += SPOFF; + if ((error = (usp & 0x7)) != 0) + break; error = copyin((void *)usp, &rw, sizeof rw); usp = rw.rw_in[6]; } @@ -91,6 +93,8 @@ rwindow_save(struct thread *td) usp = *ausp; CTR1(KTR_TRAP, "rwindow_save: usp=%#lx", usp); usp += SPOFF; + if ((error = (usp & 0x7)) != 0) + break; error = copyout(rw, (void *)usp, sizeof *rw); if (error) break; |