Module Name: src
Committed By: mlelstv
Date: Sun Dec 9 23:05:02 UTC 2018
Modified Files:
src/sys/kern: sys_pset.c
Log Message:
Handle the case when a CPU is assigned to a set it is already a member of.
Previously this would trigger an assertion failure.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/kern/sys_pset.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/sys_pset.c
diff -u src/sys/kern/sys_pset.c:1.20 src/sys/kern/sys_pset.c:1.21
--- src/sys/kern/sys_pset.c:1.20 Mon Sep 3 16:29:35 2018
+++ src/sys/kern/sys_pset.c Sun Dec 9 23:05:02 2018
@@ -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 @@ sys_pset_assign(struct lwp *l, const str
/* 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.
*/