zephyr/subsys/net/lib/dns
Peter Bigot 7e77370acb net: dns: review use of k_work APIs
It is documented that using transient information like whether a work
item is pending or a delayed work item has time left to determine the
state of the work item before subsequent reconfiguration is prone to
race conditions, and known to produce unexpected behavior in the
presence of preemptive threads, SMP, or use of the work item from
interrupts.  As a best practice such pre-validation steps should be
avoided unless algorithmically necessary.

All comparisons of remaining delayed time before canceling a delayed
work item in this module appear to be optimizations subject to the
above race conditions.  Remove the checks so that only the inherent
race conditions in the implementation of canceling a work item remain.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-04 10:01:47 +02:00
..
CMakeLists.txt
Kconfig
dns_internal.h
dns_pack.c
dns_pack.h
dns_sd.c
dns_sd.h
llmnr_responder.c
mdns_responder.c
resolve.c net: dns: review use of k_work APIs 2021-01-04 10:01:47 +02:00