This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/5] Race condition in /etc/resolv.conf reloading (bug 25420)


I've split this up for easier review.  The actual changes are quite
small, and I think they clean up the code a bit.

I did not add a test case because the race is apparently quite hard to
hit.  (I still have to try the reproducer from the reporter.)

Not sure if that is still glibc 2.31 material, but it should be quite
backportable.

Thanks,
Florian

Florian Weimer (5):
  Add internal <file_change_detection.h> header file
  resolv: Use <file_change_detection.h> in __resolv_conf_get_current
  resolv: Fix file handle leak in __resolv_conf_load [BZ #25429]
  resolv: Enhance __resolv_conf_load to capture file change data
  resolv: Fix ABA race in /etc/resolv.conf change detection [BZ #25420]

 include/file_change_detection.h | 140 ++++++++++++++++++++++
 io/Makefile                     |   2 +-
 io/tst-file_change_detection.c  | 206 ++++++++++++++++++++++++++++++++
 resolv/res_init.c               |  22 +++-
 resolv/resolv_conf.c            |  60 ++++------
 resolv/resolv_conf.h            |  10 +-
 6 files changed, 392 insertions(+), 48 deletions(-)
 create mode 100644 include/file_change_detection.h
 create mode 100644 io/tst-file_change_detection.c

-- 
2.24.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]