bind9/bin/named
Ondřej Surý e26aa4cbb1
Don't use reference counting in isc_timer unit
The reference counting and isc_timer_attach()/isc_timer_detach()
semantic are actually misleading because it cannot be used under normal
conditions.  The usual conditions under which is timer used uses the
object where timer is used as argument to the "timer" itself.  This
means that when the caller is using `isc_timer_detach()` it needs the
timer to stop and the isc_timer_detach() does that only if this would be
the last reference.  Unfortunately, this also means that if the timer is
attached elsewhere and the timer is fired it will most likely be
use-after-free, because the object used in the timer no longer exists.

Remove the reference counting from the isc_timer unit, remove
isc_timer_attach() function and rename isc_timer_detach() to
isc_timer_destroy() to better reflect how the API needs to be used.

The only caveat is that the already executed event must be destroyed
before the isc_timer_destroy() is called because the timer is no longet
attached to .ev_destroy_arg.

(cherry picked from commit ae01ec2823)
2023-01-18 22:39:26 +01:00
..
include remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
.gitignore Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
bind9.xsl Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
builtin.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
config.c remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
control.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
controlconf.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
dlz_dlopen_driver.c De-duplicate __FILE__, __LINE__ 2022-10-17 16:00:26 +01:00
fuzz.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
geoip.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
log.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
logconf.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:42:16 +01:00
main.c remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
Makefile.am Remove auto-generated rst files in repo in favour of grammar pretty printer 2022-07-01 10:20:56 +02:00
named.conf.rst Add note that named.conf man page is not a complete manual 2022-07-01 10:21:06 +02:00
named.rst Document list of crypto algorithms in named -V output 2022-09-28 01:19:50 +10:00
os.c Fix named failing to start on Solaris systems with hundreds of CPUs 2022-10-20 15:15:10 +03:00
server.c Don't use reference counting in isc_timer unit 2023-01-18 22:39:26 +01:00
statschannel.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
tkeyconf.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
transportconf.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
tsigconf.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
xsl_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
zoneconf.c remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00