diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -187,6 +187,7 @@ } SYSINIT(cpu_mp, SI_SUB_CPU, SI_ORDER_THIRD, mp_start, NULL); +/* Argument for 'td' must not be 'curthread'. */ void forward_signal(struct thread *td) { @@ -198,8 +199,8 @@ * executing so that it executes ast(). */ THREAD_LOCK_ASSERT(td, MA_OWNED); - KASSERT(TD_IS_RUNNING(td), - ("forward_signal: thread is not TDS_RUNNING")); + KASSERT(TD_IS_RUNNING(td), ("%s: thread is not TDS_RUNNING", __func__)); + KASSERT(td != curthread, ("%s: Thread is curthread", __func__)); CTR1(KTR_SMP, "forward_signal(%p)", td->td_proc); @@ -208,10 +209,6 @@ if (!forward_signal_enabled) return; - /* No need to IPI ourself. */ - if (td == curthread) - return; - id = td->td_oncpu; if (id == NOCPU) return;