diff options
author | alc <alc@FreeBSD.org> | 2003-01-02 09:09:27 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-01-02 09:09:27 +0000 |
commit | 73597ffcc20fd9eaddbf5ce13b22e051e28b47e3 (patch) | |
tree | 84ba9de139a972987dc16093965c08936a02a1c8 /sys/vm | |
parent | b3227282a647351f34fcaa83070c6e539a733bf9 (diff) | |
download | FreeBSD-src-73597ffcc20fd9eaddbf5ce13b22e051e28b47e3.zip FreeBSD-src-73597ffcc20fd9eaddbf5ce13b22e051e28b47e3.tar.gz |
Lock the vm object when performing vm_object_clear_flag().
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_meter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index d44f5b9..534644c 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -97,8 +97,11 @@ vmtotal(SYSCTL_HANDLER_ARGS) */ GIANT_REQUIRED; mtx_lock(&vm_object_list_mtx); - TAILQ_FOREACH(object, &vm_object_list, object_list) + TAILQ_FOREACH(object, &vm_object_list, object_list) { + vm_object_lock(object); vm_object_clear_flag(object, OBJ_ACTIVE); + vm_object_unlock(object); + } mtx_unlock(&vm_object_list_mtx); /* * Calculate process statistics. |