CVSROOT:        /cvs
Module name:    src
Changes by:     bl...@cvs.openbsd.org   2018/07/09 02:46:30

Modified files:
        sys/kern       : kern_malloc.c 

Log message:
Make free(9) MP safe.  It was wrong to set ku_indx to 0 after freeing
the memory in uvm.  Another process could use the false 0 then.  To
be on the safe side, protect all access to ku_indx and ku_pagecnt
with a mutex.  Update ku_indx and ku_pagecnt before calling
uvm_km_free().  Update ksp after uvm_km_free() to keep accounting
correct.
tested by sthen@; OK mpi@ visa@ deraadt@

Reply via email to