Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jan 2014 19:51:57 +0000 (UTC)
From:      Gleb Smirnoff <glebius@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: r260280 - stable/10/sys/vm
Message-ID:  <201401041951.s04JpvAC073996@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Sat Jan  4 19:51:57 2014
New Revision: 260280
URL: http://svnweb.freebsd.org/changeset/base/260280

Log:
  Merge r258690 by mav from head:
    Fix bug introduced at r252226, when udata argument passed to bucket_alloc()
    was used without making sure first that it was really passed for us.
  
    On some of my systems this bug made user argument passed by ZFS code to
    uma_zalloc_arg() unexpectedly block UMA per-CPU caches for those zones.

Modified:
  stable/10/sys/vm/uma_core.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/uma_core.c
==============================================================================
--- stable/10/sys/vm/uma_core.c	Sat Jan  4 19:13:25 2014	(r260279)
+++ stable/10/sys/vm/uma_core.c	Sat Jan  4 19:51:57 2014	(r260280)
@@ -366,12 +366,13 @@ bucket_alloc(uma_zone_t zone, void *udat
 	 * buckets via the allocation path or bucket allocations in the
 	 * free path.
 	 */
-	if ((uintptr_t)udata & UMA_ZFLAG_BUCKET)
-		return (NULL);
 	if ((zone->uz_flags & UMA_ZFLAG_BUCKET) == 0)
 		udata = (void *)(uintptr_t)zone->uz_flags;
-	else
+	else {
+		if ((uintptr_t)udata & UMA_ZFLAG_BUCKET)
+			return (NULL);
 		udata = (void *)((uintptr_t)udata | UMA_ZFLAG_BUCKET);
+	}
 	if ((uintptr_t)udata & UMA_ZFLAG_CACHEONLY)
 		flags |= M_NOVM;
 	ubz = bucket_zone_lookup(zone->uz_count);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401041951.s04JpvAC073996>