From owner-svn-src-stable@FreeBSD.ORG Fri Mar 18 17:18:25 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CA06106566B; Fri, 18 Mar 2011 17:18:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1484B8FC12; Fri, 18 Mar 2011 17:18:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2IHIO2X075116; Fri, 18 Mar 2011 17:18:24 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2IHIOaq075114; Fri, 18 Mar 2011 17:18:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201103181718.p2IHIOaq075114@svn.freebsd.org> From: John Baldwin Date: Fri, 18 Mar 2011 17:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219748 - stable/7/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2011 17:18:25 -0000 Author: jhb Date: Fri Mar 18 17:18:24 2011 New Revision: 219748 URL: http://svn.freebsd.org/changeset/base/219748 Log: MFC 219399: When constructing a new cpuset, apply the parent cpuset's mask to the new set's mask rather than the root mask. This was causing the root mask to be modified incorrectly. Modified: stable/7/sys/kern/kern_cpuset.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_cpuset.c ============================================================================== --- stable/7/sys/kern/kern_cpuset.c Fri Mar 18 17:18:09 2011 (r219747) +++ stable/7/sys/kern/kern_cpuset.c Fri Mar 18 17:18:24 2011 (r219748) @@ -253,7 +253,7 @@ cpuset_lookup(cpusetid_t setid, struct t * will have no valid cpu based on restrictions from the parent. */ static int -_cpuset_create(struct cpuset *set, struct cpuset *parent, cpuset_t *mask, +_cpuset_create(struct cpuset *set, struct cpuset *parent, const cpuset_t *mask, cpusetid_t id) { @@ -264,7 +264,7 @@ _cpuset_create(struct cpuset *set, struc refcount_init(&set->cs_ref, 1); set->cs_flags = 0; mtx_lock_spin(&cpuset_lock); - CPU_AND(mask, &parent->cs_mask); + CPU_AND(&set->cs_mask, &parent->cs_mask); set->cs_id = id; set->cs_parent = cpuset_ref(parent); LIST_INSERT_HEAD(&parent->cs_children, set, cs_siblings); @@ -281,7 +281,7 @@ _cpuset_create(struct cpuset *set, struc * allocated. */ static int -cpuset_create(struct cpuset **setp, struct cpuset *parent, cpuset_t *mask) +cpuset_create(struct cpuset **setp, struct cpuset *parent, const cpuset_t *mask) { struct cpuset *set; cpusetid_t id; @@ -501,7 +501,7 @@ cpuset_which(cpuwhich_t which, id_t id, * the new set is a child of 'set'. */ static int -cpuset_shadow(struct cpuset *set, struct cpuset *fset, cpuset_t *mask) +cpuset_shadow(struct cpuset *set, struct cpuset *fset, const cpuset_t *mask) { struct cpuset *parent;