[PATCH] Mark syslog as MT-unsafe (bug 26100)

Andreas Schwab schwab@linux-m68k.org
Mon Jun 15 10:32:27 GMT 2020


The syslog functions have been marked MT-safe by mistake.  They use global
variables in unsafe way.
---
 manual/syslog.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/manual/syslog.texi b/manual/syslog.texi
index 02f84d6e6f..3097cc93fd 100644
--- a/manual/syslog.texi
+++ b/manual/syslog.texi
@@ -146,7 +146,7 @@ The symbols referred to in this section are declared in the file
 
 @deftypefun void openlog (const char *@var{ident}, int @var{option}, int @var{facility})
 @standards{BSD, syslog.h}
-@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{} @acsfd{}}}
+@safety{@prelim{}@mtunsafe{@mtasurace{:LogTag/LogMask}}@asunsafe{@asulock{}}@acunsafe{@aculock{} @acsfd{}}}
 @c openlog @asulock @aculock @acsfd
 @c  libc_lock_lock @asulock @aculock
 @c  openlog_internal @acsfd [always guarded by syslog_lock, so no race]
@@ -285,7 +285,7 @@ The symbols referred to in this section are declared in the file
 @c syslog() is implemented as a call to vsyslog().
 @deftypefun void syslog (int @var{facility_priority}, const char *@var{format}, @dots{})
 @standards{BSD, syslog.h}
-@safety{@prelim{}@mtsafe{@mtsenv{} @mtslocale{}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
+@safety{@prelim{}@mtunsafe{@mtasurace{:LogTag/LogMask}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 @c syslog @mtsenv @mtslocale @asucorrupt @ascuheap @asulock @ascudlopen @acucorrupt @aculock @acsmem @acsfd
 @c  va_start dup ok
 @c  vsyslog_chk @mtsenv @mtslocale @asucorrupt @ascuheap @asulock @ascudlopen @acucorrupt @aculock @acsmem @acsfd
-- 
2.27.0


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Libc-alpha mailing list