From 3dd3bc9aca4a3fd5c51e4beaf6937ab597969b8b Mon Sep 17 00:00:00 2001 From: green Date: Sun, 23 Jul 2000 22:19:49 +0000 Subject: Using an atomic operation here won't help if nobody else uses them (for this). Use the simple_lock() on v_interlock like elsewhere. --- sys/kern/imgact_elf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 52b89e5..fd185f0 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -61,7 +61,6 @@ #include #include -#include #include #include @@ -478,7 +477,9 @@ exec_elf_imgact(struct image_params *imgp) * a context switch. Better safe than sorry; I really don't want * the file to change while it's being loaded. */ - atomic_set_long(&imgp->vp->v_flag, VTEXT); + simple_lock(&imgp->vp->v_interlock); + imgp->vp->v_flag |= VTEXT; + simple_unlock(&imgp->vp->v_interlock); if ((error = exec_extract_strings(imgp)) != 0) goto fail; -- cgit v1.1