Quick fix for hang on booting with -d. mtx_enter() was called before

curproc was initialized.  curproc == NULL was interpreted as matching
the process holding Giant...  Just skip mtx_enter() and mtx_exit() in
trap() if (curproc == NULL && cold) (&& cold for safety).
This commit is contained in:
Bruce Evans 2000-09-12 18:41:56 +00:00
parent 96cae770d3
commit bbbb2579b4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=65781
3 changed files with 12 additions and 6 deletions

View File

@ -279,7 +279,8 @@ trap(frame)
enable_intr();
}
mtx_enter(&Giant, MTX_DEF);
if (p != NULL || !cold)
mtx_enter(&Giant, MTX_DEF);
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
restart:
@ -639,7 +640,8 @@ trap(frame)
user:
userret(p, &frame, sticks, 1);
out:
mtx_exit(&Giant, MTX_DEF);
if (p != NULL || !cold)
mtx_exit(&Giant, MTX_DEF);
}
#ifdef notyet

View File

@ -279,7 +279,8 @@ trap(frame)
enable_intr();
}
mtx_enter(&Giant, MTX_DEF);
if (p != NULL || !cold)
mtx_enter(&Giant, MTX_DEF);
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
restart:
@ -639,7 +640,8 @@ trap(frame)
user:
userret(p, &frame, sticks, 1);
out:
mtx_exit(&Giant, MTX_DEF);
if (p != NULL || !cold)
mtx_exit(&Giant, MTX_DEF);
}
#ifdef notyet

View File

@ -279,7 +279,8 @@ trap(frame)
enable_intr();
}
mtx_enter(&Giant, MTX_DEF);
if (p != NULL || !cold)
mtx_enter(&Giant, MTX_DEF);
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
restart:
@ -639,7 +640,8 @@ trap(frame)
user:
userret(p, &frame, sticks, 1);
out:
mtx_exit(&Giant, MTX_DEF);
if (p != NULL || !cold)
mtx_exit(&Giant, MTX_DEF);
}
#ifdef notyet