diff options
author | assar <assar@cvs.openbsd.org> | 2000-01-02 06:28:07 +0000 |
---|---|---|
committer | assar <assar@cvs.openbsd.org> | 2000-01-02 06:28:07 +0000 |
commit | 3dbb228ab007fcc70254f01f442642dd742ae929 (patch) | |
tree | 394e2756be768c5942aa0d5ca5ea223f790d512b /sys | |
parent | 7804e65416d208dfe020b71145e8e2d30836f39d (diff) |
(lkmalloc): initialize `sym_id'
(lkmunreserve): check that the DDB symbols were actually loaded before
unloading them
PR 1031
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_lkm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c index 4e2044ed753..fa4091bdf3d 100644 --- a/sys/kern/kern_lkm.c +++ b/sys/kern/kern_lkm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_lkm.c,v 1.25 1999/02/26 04:54:00 art Exp $ */ +/* $OpenBSD: kern_lkm.c,v 1.26 2000/01/02 06:28:06 assar Exp $ */ /* $NetBSD: kern_lkm.c,v 1.31 1996/03/31 21:40:27 christos Exp $ */ /* @@ -159,6 +159,7 @@ lkmalloc() ret->refcnt = ret->depcnt = 0; ret->id = nlkms++; + ret->sym_id = -1; TAILQ_INSERT_TAIL(&lkmods, ret, list); } @@ -242,7 +243,8 @@ lkmunreserve() return; #ifdef DDB - if (curp && curp->private.lkm_any && curp->private.lkm_any->lkm_name) + if (curp && curp->private.lkm_any && curp->private.lkm_any->lkm_name + && curp->sym_id != -1) db_del_symbol_table(curp->private.lkm_any->lkm_name); #endif |