Date: Thu, 21 Jul 2016 19:18:49 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303159 - stable/11/sys/kern Message-ID: <201607211918.u6LJInI7099013@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Thu Jul 21 19:18:49 2016 New Revision: 303159 URL: https://svnweb.freebsd.org/changeset/base/303159 Log: Merge r302894, r303098: fix regression caused by r302350. Stopping a not scheduled not running callout should return (-1). PR: 210884 Approved by: re (gjb) Modified: stable/11/sys/kern/kern_timeout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_timeout.c ============================================================================== --- stable/11/sys/kern/kern_timeout.c Thu Jul 21 18:47:51 2016 (r303158) +++ stable/11/sys/kern/kern_timeout.c Thu Jul 21 19:18:49 2016 (r303159) @@ -1380,6 +1380,12 @@ 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 (cancelled); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607211918.u6LJInI7099013>