Index: sys/kern/kern_timeout.c =================================================================== --- sys/kern/kern_timeout.c +++ sys/kern/kern_timeout.c @@ -1150,7 +1150,7 @@ struct callout_cpu *cc, *old_cc; struct lock_class *class; int direct, sq_locked, use_lock; - int not_on_a_list; + int not_on_a_list, running; if (safe) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, @@ -1378,8 +1378,15 @@ } } callout_cc_del(c, cc); + + /* + * If we are asked to stop a callout which is currently in progress + * and indeed impossible to stop then return 0. + */ + running = !!(cc_exec_curr(cc, direct) == c); + CC_UNLOCK(cc); - return (1); + return (!running); } void