Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Dec 2020 08:29:38 +0000 (UTC)
From:      Ryan Libby <rlibby@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r368752 - stable/12/sys/vm
Message-ID:  <202012180829.0BI8TcCa049942@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rlibby
Date: Fri Dec 18 08:29:38 2020
New Revision: 368752
URL: https://svnweb.freebsd.org/changeset/base/368752

Log:
  MFC r357019:
  
  uma: fix zone domain overlaying pcpu cache with disabled cpus
  
  UMA zone structures have two arrays at the end which are sized according
  to the machine: an array of CPU count length, and an array of NUMA
  domain count length.  The CPU counting was wrong in the case where some
  CPUs are disabled (when mp_ncpus != mp_maxid + 1), and this caused the
  second array to be overlaid with the first.
  
  Reported by:	olivier
  Reviewed by:	jeff, markj
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D23318

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

Modified: stable/12/sys/vm/uma_core.c
==============================================================================
--- stable/12/sys/vm/uma_core.c	Fri Dec 18 04:23:20 2020	(r368751)
+++ stable/12/sys/vm/uma_core.c	Fri Dec 18 08:29:38 2020	(r368752)
@@ -1782,7 +1782,8 @@ zone_ctor(void *mem, int size, void *udata, int flags)
 	zone->uz_flags = 0;
 	zone->uz_warning = NULL;
 	/* The domain structures follow the cpu structures. */
-	zone->uz_domain = (struct uma_zone_domain *)&zone->uz_cpu[mp_ncpus];
+	zone->uz_domain =
+	    (struct uma_zone_domain *)&zone->uz_cpu[mp_maxid + 1];
 	timevalclear(&zone->uz_ratecheck);
 	keg = arg->keg;
 



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