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 net: dns: dns-sd: support dns service discovery 2020-11-09 16:15:02 -08:00
dns_internal.h tests: net: dns: Add tests for catching malformed packets 2020-08-27 08:05:52 -04:00
dns_pack.c net: dns: enable dns service discovery for mdns responder 2020-11-09 16:15:02 -08:00
dns_pack.h net: dns: dns-sd: support dns service discovery 2020-11-09 16:15:02 -08:00
dns_sd.c net: dns: dns-sd: support dns service discovery 2020-11-09 16:15:02 -08:00
dns_sd.h net: dns: dns-sd: support dns service discovery 2020-11-09 16:15:02 -08:00
Kconfig net: dns: enable dns service discovery for mdns responder 2020-11-09 16:15:02 -08:00
llmnr_responder.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mdns_responder.c net: dns: enable dns service discovery for mdns responder 2020-11-09 16:15:02 -08:00
resolve.c net: dns: review use of k_work APIs 2021-01-04 10:01:47 +02:00