mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
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
This commit is contained in:
parent
9b3851e9e3
commit
8bf0e8324d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92548
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user