Skip site navigation (1)Skip section navigation (2)
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-10@freebsd.org
Subject:   svn commit: r318169 - in stable: 10/sys/vm 11/sys/vm
Message-ID:  <201705110337.v4B3b6Pg005348@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/10/sys/vm/uma_core.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/vm/uma_core.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/sys/vm/uma_core.c
==============================================================================
--- stable/10/sys/vm/uma_core.c	Thu May 11 00:27:26 2017	(r318168)
+++ stable/10/sys/vm/uma_core.c	Thu May 11 03:37:05 2017	(r318169)
@@ -1937,6 +1937,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.v4B3b6Pg005348>