diff options
author | alc <alc@FreeBSD.org> | 2002-03-18 07:59:57 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-03-18 07:59:57 +0000 |
commit | 2cfa65bbe4f6e4f92fc1d6bd09b07aaebf40858d (patch) | |
tree | 0f0c552ecbec72639e447bde6736104755d1b591 | |
parent | 25a6daa8288f53030d945a2021b249fe06e777bb (diff) | |
download | FreeBSD-src-2cfa65bbe4f6e4f92fc1d6bd09b07aaebf40858d.zip FreeBSD-src-2cfa65bbe4f6e4f92fc1d6bd09b07aaebf40858d.tar.gz |
Eliminate grow_stack() from (o)sendsig(). If the stack needs to grow,
copyout() will page fault and perform grow_stack() from trap_pfault().
These calls to grow_stack() accomplish nothing.
Reviewed by: bde
-rw-r--r-- | sys/amd64/amd64/machdep.c | 14 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 14 |
2 files changed, 8 insertions, 20 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 1153a99..5859004 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -386,12 +386,9 @@ osendsig(catcher, sig, mask, code) } /* - * Copy the sigframe out to the user's stack. If this fails, - * try growing the stack and retrying the copy. + * Copy the sigframe out to the user's stack. */ - if (copyout(&sf, fp, sizeof(*fp)) != 0 && - (grow_stack(p, (int)fp) == 0 || - copyout(&sf, fp, sizeof(*fp)) != 0)) { + if (copyout(&sf, fp, sizeof(*fp)) != 0) { #ifdef DEBUG printf("process %ld has trashed its stack\n", (long)p->p_pid); #endif @@ -518,12 +515,9 @@ sendsig(catcher, sig, mask, code) } /* - * Copy the sigframe out to the user's stack. If this fails, - * try growing the stack and retrying the copy. + * Copy the sigframe out to the user's stack. */ - if (copyout(&sf, sfp, sizeof(*sfp)) != 0 && - (grow_stack(p, (int)sfp) == 0 || - copyout(&sf, sfp, sizeof(*sfp)) != 0)) { + if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { #ifdef DEBUG printf("process %ld has trashed its stack\n", (long)p->p_pid); #endif diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 1153a99..5859004 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -386,12 +386,9 @@ osendsig(catcher, sig, mask, code) } /* - * Copy the sigframe out to the user's stack. If this fails, - * try growing the stack and retrying the copy. + * Copy the sigframe out to the user's stack. */ - if (copyout(&sf, fp, sizeof(*fp)) != 0 && - (grow_stack(p, (int)fp) == 0 || - copyout(&sf, fp, sizeof(*fp)) != 0)) { + if (copyout(&sf, fp, sizeof(*fp)) != 0) { #ifdef DEBUG printf("process %ld has trashed its stack\n", (long)p->p_pid); #endif @@ -518,12 +515,9 @@ sendsig(catcher, sig, mask, code) } /* - * Copy the sigframe out to the user's stack. If this fails, - * try growing the stack and retrying the copy. + * Copy the sigframe out to the user's stack. */ - if (copyout(&sf, sfp, sizeof(*sfp)) != 0 && - (grow_stack(p, (int)sfp) == 0 || - copyout(&sf, sfp, sizeof(*sfp)) != 0)) { + if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { #ifdef DEBUG printf("process %ld has trashed its stack\n", (long)p->p_pid); #endif |