]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
callout_stop() should return 0 (fail) when the callout is currently
authorJulien Charbon <jch@FreeBSD.org>
Tue, 18 Aug 2015 10:15:09 +0000 (10:15 +0000)
committerJulien Charbon <jch@FreeBSD.org>
Tue, 18 Aug 2015 10:15:09 +0000 (10:15 +0000)
commita1e6f8ff2772f9166da566708f5f21748f61146c
treec94c3946bce57fe6354c1f69864c130d703c370d
parent5a060174cd66576b36eba503e131862949ad2085
callout_stop() should return 0 (fail) when the callout is currently
being serviced and indeed unstoppable.

A scenario to reproduce this case is:

- the callout is being serviced and at same time,
- callout_reset() is called on this callout that sets
  the CALLOUT_PENDING flag and at same time,
- callout_stop() is called on this callout and returns 1 (success)
  even if the callout is indeed currently running and unstoppable.

This issue was caught up while making r284245 (D2763) workaround, and
was discussed at BSDCan 2015.  Once applied the r284245 workaround
is not needed anymore and will be reverted.

Differential Revision: https://reviews.freebsd.org/D3078
Reviewed by: jhb
Sponsored by: Verisign, Inc.
sys/kern/kern_timeout.c