Date: Wed, 2 Sep 2015 23:09:02 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287415 - head/sys/vm Message-ID: <201509022309.t82N92Op080286@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Wed Sep 2 23:09:01 2015 New Revision: 287415 URL: https://svnweb.freebsd.org/changeset/base/287415 Log: Don't trash memory from UMA_ZONE_NOFREE zones. Objects obtained from such zones are supposed to retain type stability, which was violated by aforementioned trashing. This is a follow-up to r284861. Discussed with: kib Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Sep 2 22:48:41 2015 (r287414) +++ head/sys/vm/uma_core.c Wed Sep 2 23:09:01 2015 (r287415) @@ -1946,8 +1946,8 @@ uma_zcreate(const char *name, size_t siz * destructor, pass UMA constructor/destructor which checks for * memory use after free. */ - if ((!(flags & UMA_ZONE_ZINIT)) && ctor == NULL && dtor == NULL && - uminit == NULL && fini == NULL) { + if ((!(flags & (UMA_ZONE_ZINIT | UMA_ZONE_NOFREE))) && + ctor == NULL && dtor == NULL && uminit == NULL && fini == NULL) { args.ctor = trash_ctor; args.dtor = trash_dtor; args.uminit = trash_init;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509022309.t82N92Op080286>