Date: Thu, 27 Aug 2015 08:15:33 +0000 (UTC) From: Julien Charbon <jch@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287196 - head/sys/kern Message-ID: <201508270815.t7R8FXek029896@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jch Date: Thu Aug 27 08:15:32 2015 New Revision: 287196 URL: https://svnweb.freebsd.org/changeset/base/287196 Log: In callout_stop(), if a callout is both pending and currently being serviced return 0 (fail) but it is applicable only mpsafe callouts. Thanks to hselasky for finding this. Differential Revision: https://reviews.freebsd.org/D3078 (Updated) Submitted by: hselasky Reviewed by: jch Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Thu Aug 27 07:53:58 2015 (r287195) +++ head/sys/kern/kern_timeout.c Thu Aug 27 08:15:32 2015 (r287196) @@ -1379,11 +1379,13 @@ again: } 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. - */ - not_running = !(cc_exec_curr(cc, direct) == c); + if (!use_lock) { + /* + * If we are asked to stop a callout which is currently in progress + * and indeed impossible to stop then return 0. + */ + not_running = !(cc_exec_curr(cc, direct) == c); + } CC_UNLOCK(cc); return (not_running);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508270815.t7R8FXek029896>