Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux/common do not dereference p_vmspace, if it ...
details: https://anonhg.NetBSD.org/src/rev/59142ff41193
branches: trunk
changeset: 507448:59142ff41193
user: itojun <itojun%NetBSD.org@localhost>
date: Thu Mar 22 08:26:14 2001 +0000
description:
do not dereference p_vmspace, if it is not initialized yet (NULL).
diffstat:
sys/compat/linux/common/linux_exec.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (24 lines):
diff -r cc74a38ee1a0 -r 59142ff41193 sys/compat/linux/common/linux_exec.c
--- a/sys/compat/linux/common/linux_exec.c Thu Mar 22 08:14:23 2001 +0000
+++ b/sys/compat/linux/common/linux_exec.c Thu Mar 22 08:26:14 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec.c,v 1.46 2001/03/15 19:18:20 manu Exp $ */
+/* $NetBSD: linux_exec.c,v 1.47 2001/03/22 08:26:14 itojun Exp $ */
/*-
* Copyright (c) 1994, 1995, 1998, 2000 The NetBSD Foundation, Inc.
@@ -150,9 +150,11 @@
memset(p->p_emuldata, '\0', sizeof(struct linux_emuldata));
- /* Set the process idea of the break to the real value */
- ((struct linux_emuldata*)(p->p_emuldata))->p_break =
- p->p_vmspace->vm_daddr + ctob(p->p_vmspace->vm_dsize);
+ if (p->p_vmspace) {
+ /* Set the process idea of the break to the real value */
+ ((struct linux_emuldata*)(p->p_emuldata))->p_break =
+ p->p_vmspace->vm_daddr + ctob(p->p_vmspace->vm_dsize);
+ }
}
/*
Home |
Main Index |
Thread Index |
Old Index