Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: dns: update k_work API and fix misuse #33109

Closed
wants to merge 1 commit into from

Commits on Mar 7, 2021

  1. net: dns: update k_work API and fix misuse

    Cancelling an in-progress work item is not guaranteed to complete
    synchronously.  Convert the DNS timeout to use the new delayable work
    structure, and use its handler to release the query slot for use in
    subsequent operations.
    
    This delays the release of the query slot but avoids some race
    conditions.
    
    Allocation of slots remains racy as the mixed identification of query
    slots through pointers and indexes, and the use of a null check for a
    function pointer (not compatible with the atomic_ptr API) as the
    in-use condition, makes it difficult to switch to a thread-safe
    request/release interface.
    
    Signed-off-by: Peter Bigot <[email protected]>
    pabigot committed Mar 7, 2021
    Configuration menu
    Copy the full SHA
    13d6468 View commit details
    Browse the repository at this point in the history