summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2000-10-31 03:10:41 +0000
committergallatin <gallatin@FreeBSD.org>2000-10-31 03:10:41 +0000
commitcee4034456967e46ced4ff64ed385774d34cf273 (patch)
tree20e33f207a1c0a21bfdb2734eb0dc15b538a9de5
parent7ad8d8216987f50d555e46240206524b6673acd8 (diff)
downloadFreeBSD-src-cee4034456967e46ced4ff64ed385774d34cf273.zip
FreeBSD-src-cee4034456967e46ced4ff64ed385774d34cf273.tar.gz
fix the sigaltstack hack by lowering the stack size to the original value
if the request was for less than MINSIGSTKSZ (in which case we "round up"). discussed with: marcel
-rw-r--r--sys/i386/linux/linux_machdep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index 4917f61..3744e11 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -687,6 +687,8 @@ linux_sigaltstack(p, uap)
lss.ss_flags = bsd_to_linux_sigaltstack(oss->ss_flags);
error = copyout(&lss, uap->uoss, sizeof(linux_stack_t));
}
+ if (!error && (ss != NULL) && (lss.ss_size < ss->ss_size))
+ p->p_sigstk.ss_size = lss.ss_size;
return (error);
}
OpenPOWER on IntegriCloud