aboutsummaryrefslogtreecommitdiff
path: root/login/Makefile
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-11-07 18:15:18 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-11-07 23:09:39 +0100
commitbe6b16d975683e6cca57852cd4cfe715b2a9d8b1 (patch)
tree040b7e45c4ee621e604da6e4072686b83a305505 /login/Makefile
parent4f4bb489e0ddd2f24b2a5d352bb39f8dcdb38050 (diff)
downloadglibc-be6b16d975683e6cca57852cd4cfe715b2a9d8b1.zip
glibc-be6b16d975683e6cca57852cd4cfe715b2a9d8b1.tar.gz
glibc-be6b16d975683e6cca57852cd4cfe715b2a9d8b1.tar.bz2
login: Acquire write lock early in pututline [BZ #24882]
It has been reported that due to lack of fairness in POSIX file locking, the current reader-to-writer lock upgrade can result in lack of forward progress. Acquiring the write lock directly hopefully avoids this issue if there are only writers. This also fixes bug 24882 due to the cache revalidation in __libc_pututline. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Change-Id: I57e31ae30719e609a53505a0924dda101d46372e
Diffstat (limited to 'login/Makefile')
-rw-r--r--login/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/login/Makefile b/login/Makefile
index 0183db1..6a0182b 100644
--- a/login/Makefile
+++ b/login/Makefile
@@ -44,7 +44,7 @@ subdir-dirs = programs
vpath %.c programs
tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname tst-getlogin tst-updwtmpx \
- tst-pututxline-lockfail
+ tst-pututxline-lockfail tst-pututxline-cache
# Build the -lutil library with these extra functions.
extra-libs := libutil
@@ -74,3 +74,4 @@ $(inst_libexecdir)/pt_chown: $(objpfx)pt_chown $(+force)
-$(INSTALL_PROGRAM) -m 4755 -o root $< $@
$(objpfx)tst-pututxline-lockfail: $(shared-thread-library)
+$(objpfx)tst-pututxline-cache: $(shared-thread-library)