diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2016-07-20 16:48:25 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2016-07-20 16:48:25 +0000 |
commit | 9f3391243b97372aa534bac9f824eb135fa76cd9 (patch) | |
tree | 8f233cf4dd63aacc4d18f246919a9cd280fb6bc9 | |
parent | 78243b5cb771ea6e0a1f002148fd862731dcf364 (diff) | |
download | src-9f3391243b97372aa534bac9f824eb135fa76cd9.tar.gz src-9f3391243b97372aa534bac9f824eb135fa76cd9.zip |
Redo the r302894: the very new value for a non-scheduled callout is -1.
This was recently added in r290664.
Noticed by: hselasky
Tested by: Larry Rosenman <ler lerctr.org>
PR: 210884
Notes
Notes:
svn path=/head/; revision=303098
-rw-r--r-- | sys/kern/kern_timeout.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index eefac4459f86..157dedd187e0 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1380,8 +1380,14 @@ again: if ((c->c_iflags & CALLOUT_PENDING) == 0) { CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", c, c->c_func, c->c_arg); + /* + * For not scheduled and not executing callout return + * negative value. + */ + if (cc_exec_curr(cc, direct) != c) + cancelled = -1; CC_UNLOCK(cc); - return (0); + return (cancelled); } c->c_iflags &= ~CALLOUT_PENDING; |