mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
vos: Avoid LWP stack overflow error on SIGINT
vsproc's method of longjmp'ing out of a signal handler can thoroughly confuse LWP. At the very least, the information on our stack becomes incorrect, since we're no longer using the stack supplied by LWP. At the very least, we seem to (almost) always fail the sanity check checking for stack overflow. To prevent the test from happening, NULL the stack pointer before the longjmp so we can attempt recovery. FIXES 33360 Change-Id: Ie910cb1cc8564ac119c3b751fd8295bf312a3ce7 Reviewed-on: http://gerrit.openafs.org/1559 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
bf2d0db680
commit
9af8d46e77
@ -1146,8 +1146,16 @@ int interrupt = 0;
|
|||||||
static void *
|
static void *
|
||||||
do_interrupt(void * unused)
|
do_interrupt(void * unused)
|
||||||
{
|
{
|
||||||
if (interrupt)
|
if (interrupt) {
|
||||||
|
#ifndef AFS_PTHREAD_ENV
|
||||||
|
/* Avoid LWP from getting confused that our stack has suddenly
|
||||||
|
* changed. This will avoid some sanity checks, but until a better way
|
||||||
|
* is found, the only alternative is always crashing and burning on at
|
||||||
|
* least the stack-overflow check. */
|
||||||
|
lwp_cpptr->stack = NULL;
|
||||||
|
#endif
|
||||||
longjmp(env, 0);
|
longjmp(env, 0);
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(STDOUT, "\nSIGINT handler: vos move operation in progress\n");
|
fprintf(STDOUT, "\nSIGINT handler: vos move operation in progress\n");
|
||||||
fprintf(STDOUT,
|
fprintf(STDOUT,
|
||||||
|
Loading…
Reference in New Issue
Block a user