git: kernel - Correct bug in malloc_type ks_memuse/ks_inuse mana

看板DFBSD_commit作者時間15年前 (2010/09/20 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 28135cc28c6b3b52668ae0411eae94811f4e1437 Author: Matthew Dillon <dillon@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
文章代碼(AID): #1Cba_fHS (DFBSD_commit)