Date: Thu, 11 May 2017 03:37:06 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318169 - in stable: 10/sys/vm 11/sys/vm Message-ID: <201705110337.v4B3b6mM005354@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu May 11 03:37:05 2017 New Revision: 318169 URL: https://svnweb.freebsd.org/changeset/base/318169 Log: MFC 316493: Assert that the align parameter to uma_zcreate() is valid. Modified: stable/11/sys/vm/uma_core.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/vm/uma_core.c ============================================================================== --- stable/11/sys/vm/uma_core.c Thu May 11 00:27:26 2017 (r318168) +++ stable/11/sys/vm/uma_core.c Thu May 11 03:37:05 2017 (r318169) @@ -1888,6 +1888,9 @@ uma_zcreate(const char *name, size_t siz uma_zone_t res; bool locked; + KASSERT(powerof2(align + 1), ("invalid zone alignment %d for \"%s\"", + align, name)); + /* This stuff is essential for the zone ctor */ memset(&args, 0, sizeof(args)); args.name = name;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705110337.v4B3b6mM005354>