VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   30 Branches   50 Tags
author: Sebastian Andrzej Siewior <bigeasy@linutronix.de> 2021-08-12 14:40:05 +0200 committer: Minda Chen <minda.chen@starfivetech.com> 2023-11-06 19:24:44 +0800 commit: 27b073576dcb1cac6c2855aa6688156903d4740e parent: 5f297abfa3e29a9c1311a68dbbc63561472147a6
Commit Summary:
sched: Trigger warning if ->migration_disabled counter underflows.
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4393e93f0cd6..35d524c60f9c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2152,6 +2152,8 @@ void migrate_enable(void)
 	if (p->migration_disabled > 1) {
 		p->migration_disabled--;
 		return;
+	} else if (WARN_ON_ONCE(p->migration_disabled == 0)) {
+		return;
 	}
 
 	/*