From 84aa58ab03e77494d287dd7f351948d2f9399c50 Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Tue, 31 Oct 2000 03:10:41 +0000 Subject: [PATCH] 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 --- sys/i386/linux/linux_machdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index 4917f613dad..3744e11900c 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); }