git: kernel - Correct bug in malloc_type ks_memuse/ks_inuse management
Matthew Dillon
dillon at crater.dragonflybsd.org
Sun Sep 19 09:47:06 PDT 2010
commit 28135cc28c6b3b52668ae0411eae94811f4e1437
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sun Sep 19 09:43:09 2010 -0700
kernel - Correct bug in malloc_type ks_memuse/ks_inuse management
* The new kfree() was improperly adjust ks_memuse/ks_inuse for the wrong
cpu, leading to MP races which could cause the memory statistics to go
negative and trigger a panic.
* When calculating loosememuse it is possible to race another cpu and
come up with an incorrect value. The race itself is ok, loosememuse
is not supposed to be 100% deterministic, but even so do not allow
the value to underflow or we will wind up asserting.
Summary of changes:
sys/kern/kern_slaballoc.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/28135cc28c6b3b52668ae0411eae94811f4e1437
--
DragonFly BSD source repository
More information about the Commits
mailing list