diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-11-10 14:40:30 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-03-08 12:51:29 -0300 |
commit | c54d689269c7f10e7f7d28b1cb5b3a6a0dd5a889 (patch) | |
tree | 740094e56b211d8e3af5393129431fc05fc7ea7f /inet/gethstbynm2.c | |
parent | edddffc9df5ea5882192bca7ddaad8f6440bcc44 (diff) | |
download | glibc-c54d689269c7f10e7f7d28b1cb5b3a6a0dd5a889.tar.gz glibc-c54d689269c7f10e7f7d28b1cb5b3a6a0dd5a889.tar.xz glibc-c54d689269c7f10e7f7d28b1cb5b3a6a0dd5a889.zip |
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: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'inet/gethstbynm2.c')
0 files changed, 0 insertions, 0 deletions