Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Handle the case when a CPU is assigned to a set it ...



details:   https://anonhg.NetBSD.org/src/rev/0cebd4267a99
branches:  trunk
changeset: 446537:0cebd4267a99
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Dec 09 23:05:02 2018 +0000

description:
Handle the case when a CPU is assigned to a set it is already a member of.
Previously this would trigger an assertion failure.

diffstat:

 sys/kern/sys_pset.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 87f8a4245227 -r 0cebd4267a99 sys/kern/sys_pset.c
--- a/sys/kern/sys_pset.c       Sun Dec 09 21:39:48 2018 +0000
+++ b/sys/kern/sys_pset.c       Sun Dec 09 23:05:02 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_pset.c,v 1.20 2018/09/03 16:29:35 riastradh Exp $  */
+/*     $NetBSD: sys_pset.c,v 1.21 2018/12/09 23:05:02 mlelstv Exp $    */
 
 /*
  * Copyright (c) 2008, Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_pset.c,v 1.20 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_pset.c,v 1.21 2018/12/09 23:05:02 mlelstv Exp $");
 
 #include <sys/param.h>
 
@@ -352,6 +352,12 @@
                /* FALLTHROUGH */
        default:
                /*
+                * Just finish if old and new processor-sets are
+                * the same.
+                */
+               if (spc->spc_psid == psid)
+                       break;
+               /*
                 * Ensure at least one CPU stays in the default set,
                 * and that specified CPU is not offline.
                 */



Home | Main Index | Thread Index | Old Index