Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:06:46 -0000
From:      Tycho Nightingale <tychon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346150 - head/sys/vm
Message-ID:  <201904121246.x3CCkP2m027680@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tychon
Date: Fri Apr 12 12:46:25 2019
New Revision: 346150
URL: https://svnweb.freebsd.org/changeset/base/346150

Log:
  for a cache-only zone the destructor tries to destroy a non-existent keg
  
  Reviewed by:	markj
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D19835

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Fri Apr 12 10:13:17 2019	(r346149)
+++ head/sys/vm/uma_core.c	Fri Apr 12 12:46:25 2019	(r346150)
@@ -1916,10 +1916,10 @@ zone_dtor(void *arg, int size, void *udata)
 	 */
 	zone_drain_wait(zone, M_WAITOK);
 	/*
-	 * We only destroy kegs from non secondary zones.
+	 * We only destroy kegs from non secondary/non cache zones.
 	 */
-	if ((keg = zone->uz_keg) != NULL &&
-	    (zone->uz_flags & UMA_ZONE_SECONDARY) == 0)  {
+	if ((zone->uz_flags & (UMA_ZONE_SECONDARY | UMA_ZFLAG_CACHE)) == 0) {
+		keg = zone->uz_keg;
 		rw_wlock(&uma_rwlock);
 		LIST_REMOVE(keg, uk_link);
 		rw_wunlock(&uma_rwlock);





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