1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

Add a kludge to prevent panicing when using VM86 and hitting here

with a NULL curproc.

Originally by: Tor Egge (IIRC)
This commit is contained in:
Søren Schmidt 1998-11-23 09:34:19 +00:00
parent f6233520ce
commit 8843cc3508
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41305
2 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.82 1998/10/25 17:44:50 phk Exp $
* $Id: kern_clock.c,v 1.83 1998/10/26 06:13:18 bde Exp $
*/
#include <sys/param.h>
@ -363,7 +363,7 @@ statclock(frame)
struct rusage *ru;
struct vmspace *vm;
if (CLKF_USERMODE(frame)) {
if (curproc != NULL && CLKF_USERMODE(frame)) {
p = curproc;
if (p->p_flag & P_PROFIL)
addupc_intr(p, CLKF_PC(frame), 1);

View File

@ -37,7 +37,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.82 1998/10/25 17:44:50 phk Exp $
* $Id: kern_clock.c,v 1.83 1998/10/26 06:13:18 bde Exp $
*/
#include <sys/param.h>
@ -363,7 +363,7 @@ statclock(frame)
struct rusage *ru;
struct vmspace *vm;
if (CLKF_USERMODE(frame)) {
if (curproc != NULL && CLKF_USERMODE(frame)) {
p = curproc;
if (p->p_flag & P_PROFIL)
addupc_intr(p, CLKF_PC(frame), 1);