diff options
author | 2006-01-05 08:15:16 +0000 | |
---|---|---|
committer | 2006-01-05 08:15:16 +0000 | |
commit | 400e7491f09aada855ad9008c62d1772bab0b696 (patch) | |
tree | 85557d119a93d48af60dab97d2ce7afe52be23ca /lib/librthread/rthread_stack.c | |
parent | interacting with the watchdog while we're in the middle of updating sensors (diff) | |
download | wireguard-openbsd-400e7491f09aada855ad9008c62d1772bab0b696.tar.xz wireguard-openbsd-400e7491f09aada855ad9008c62d1772bab0b696.zip |
Remove redundant mprotect() calls (we're unmapping the region anyway)
and check user stack for proper alignment. ok tedu@ marc@
Diffstat (limited to 'lib/librthread/rthread_stack.c')
-rw-r--r-- | lib/librthread/rthread_stack.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/librthread/rthread_stack.c b/lib/librthread/rthread_stack.c index 05a1f6158ea..d76a824b816 100644 --- a/lib/librthread/rthread_stack.c +++ b/lib/librthread/rthread_stack.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_stack.c,v 1.1 2006/01/01 19:32:30 marc Exp $ */ +/* $OpenBSD: rthread_stack.c,v 1.2 2006/01/05 08:15:16 otto Exp $ */ /* $snafu: rthread_stack.c,v 1.12 2005/01/11 02:45:28 marc Exp $ */ /* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */ @@ -66,8 +66,6 @@ _rthread_alloc_stack(pthread_t thread) /* wrap up the info in a struct stack and return it */ stack = malloc(sizeof(*stack)); if (!stack) { - mprotect(guard, thread->attr.guard_size, - PROT_EXEC | PROT_READ | PROT_WRITE); munmap(base, size); return (NULL); } @@ -84,8 +82,6 @@ _rthread_alloc_stack(pthread_t thread) void _rthread_free_stack(struct stack *stack) { - mprotect(stack->guard, stack->guardsize, - PROT_EXEC | PROT_READ | PROT_WRITE); munmap(stack->base, stack->len); free(stack); } |