diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-23 20:27:31 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-23 20:27:31 +0000 |
commit | 070bf521d537e03f9ed59a2ab859793f5c72e1fd (patch) | |
tree | b6b5e5bd19549cd9a8384be2e8ef90d4469552e3 /sys/kern/kern_lkm.c | |
parent | b08ec6df09214ccf2f3cf10e86b77f5482b9246c (diff) |
remember to reset exec_maxhdrsz after lkm load/unload. ok fgsch@
Diffstat (limited to 'sys/kern/kern_lkm.c')
-rw-r--r-- | sys/kern/kern_lkm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c index 10afec4748f..c6ee557a414 100644 --- a/sys/kern/kern_lkm.c +++ b/sys/kern/kern_lkm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_lkm.c,v 1.39 2003/07/21 22:44:50 tedu Exp $ */ +/* $OpenBSD: kern_lkm.c,v 1.40 2003/08/23 20:27:30 tedu Exp $ */ /* $NetBSD: kern_lkm.c,v 1.31 1996/03/31 21:40:27 christos Exp $ */ /* @@ -96,6 +96,8 @@ static int _lkm_exec(struct lkm_table *, int); void lkminit(void); int lkmexists(struct lkm_table *); +void init_exec(void); + void lkminit() { @@ -814,8 +816,8 @@ _lkm_exec(struct lkm_table *lkmtp, int cmd) /* replace with new */ bcopy(args->lkm_exec, &execsw[i], sizeof(struct execsw)); - /* realize need to recompute max header size */ - exec_maxhdrsz = 0; + /* need to recompute max header size */ + init_exec(); /* done! */ args->lkm_offset = i; /* slot in execsw[] */ @@ -829,8 +831,8 @@ _lkm_exec(struct lkm_table *lkmtp, int cmd) /* replace current slot contents with old contents */ bcopy(&args->lkm_oldexec, &execsw[i], sizeof(struct execsw)); - /* realize need to recompute max header size */ - exec_maxhdrsz = 0; + /* need to recompute max header size */ + init_exec(); break; |