From cee4034456967e46ced4ff64ed385774d34cf273 Mon Sep 17 00:00:00 2001 From: gallatin Date: Tue, 31 Oct 2000 03:10:41 +0000 Subject: 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(+) (limited to 'sys') 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); } -- cgit v1.1