Skip to content
Commit c54d6892 authored by Adhemerval Zanella's avatar Adhemerval Zanella
Browse files

inet: Fix getnameinfo (NI_NOFQDN) race condition (BZ#28566)



The 'not_first' is accessed on nrl_domainname() in a non atomically
way, although it is only updated after the lock is taken.

This patch fix the double-checked locking by using acquire-release
atomic operation instead of plain load and by moving the 'not_first'
store only after 'domain' is actually set.

Checked on x86_64-linux-gnu.

Reviewed-by: default avatarDJ Delorie <dj@redhat.com>
parent edddffc9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment