diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2020-01-30 19:38:51 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2020-01-30 19:38:51 +0000 |
commit | 7ab99925fde8bd35c6e3998a0e6571c5da67f5cd (patch) | |
tree | 096e2df77f9b66184c1bacd229d72b910127cf6a | |
parent | d53d924f60b476dc34b419763a99bce1394780e2 (diff) |
Notes
-rw-r--r-- | sys/kern/subr_smp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index e741a1c1e7dd0..526560852e756 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -563,6 +563,12 @@ smp_rendezvous_cpus(cpuset_t map, return; } + /* + * Make sure we come here with interrupts enabled. Otherwise we + * livelock if smp_ipi_mtx is owned by a thread which sent as an IPI. + */ + MPASS(curthread->td_md.md_spinlock_count == 0); + CPU_FOREACH(i) { if (CPU_ISSET(i, &map)) ncpus++; |