[PATCH] Fix double-checked locking in _res_hconf_reorder_addrs [BZ #19074]
Florian Weimer
fweimer@redhat.com
Tue Oct 6 12:32:00 GMT 2015
This addresses a data race in libresolv. The race is not entirely
benign, it could cause programs to access a partially initialized
ifaddrs array.
I made sure this compiles on x86_64, but this code is difficult to test.
A potential follow-up optimization would be to move the socket creation
under the lock. No need to create a socket if we lose the race to the lock.
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-double-checked-locking-in-_res_hconf_reorder_add.patch
Type: text/x-patch
Size: 2672 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20151006/e7a18f80/attachment.bin>
More information about the Libc-alpha
mailing list