From patchwork Mon Jun 15 10:32:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 39607 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F32DB386F80C; Mon, 15 Jun 2020 10:32:32 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by sourceware.org (Postfix) with ESMTPS id DFE55384A033 for ; Mon, 15 Jun 2020 10:32:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DFE55384A033 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=whitebox@nefkom.net Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49lnhX5q0Fz1qs10 for ; Mon, 15 Jun 2020 12:32:28 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49lnhX5lHPz1sPN7 for ; Mon, 15 Jun 2020 12:32:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id R1xQz-HFG2NZ for ; Mon, 15 Jun 2020 12:32:28 +0200 (CEST) X-Auth-Info: iuYbfQGAnVoPhaDgOCS1QUZWFm/fHihDqZRorU+mfruccRpoNRO02r05+0564m+V Received: from igel.home (ppp-46-244-168-31.dynamic.mnet-online.de [46.244.168.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA for ; Mon, 15 Jun 2020 12:32:27 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 7715E2C023C; Mon, 15 Jun 2020 12:32:27 +0200 (CEST) From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] Mark syslog as MT-unsafe (bug 26100) X-Yow: It's the land of DONNY AND MARIE as promised in TV GUIDE! Date: Mon, 15 Jun 2020 12:32:27 +0200 Message-ID: <87r1ug62mc.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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