This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Always do locking when accessing streams (bug 15142, bug 14697)
- From: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- To: Andreas Schwab <schwab at suse dot de>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Mon, 25 Nov 2019 15:05:08 +0000
- Subject: Re: [PATCH] Always do locking when accessing streams (bug 15142, bug 14697)
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Dg+9tF/zi4Gv8veOzrAG8HwX/znytffmCDhLG56J1QA=; b=IusqIRM2mpoNtkxGk/iNkaK72en3mxtVKN3yN06X/ZtdoI3J3OkO4hca65dgRvilMi73jAjIV/VEf9FhPlYrVAeXFAg5QGwTVUXQym8GNriv6gbV/F0eTX7WUK4AkSyZk/XEu8uF7KePf9Gisz281j6/gp98NS30vq6xoNJGstvPM3O+QrUFDks5ICp+XwfQcOU9Hwn9D3QudVIcX0TPsp87OAxo/54BGq47hJJ8mHIRhEJhz4A5hXq+R2FYRudcQvhuu5TKENV26qUjOfNviEraxMrPG9S/kDROKr5S/4VfsOyKrb1/ckLGjjxcNmKfleCT56M+pN7NRMPuAB2PUA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jQACRaZjrrlYMHPDJ/Qe+5Hx6ogg4uJhPfuj5dDs43XP/WX0DMurxTGtsQtX1eCY5SSfL0+JrmNGchE6W5bNYZhnXeVL5R9nC8f+9rL4oI+R9zKk77C09iy+s3dyGhi7R24w4QOA54iLh3R+MRzd8pPsqZPaTo1MEmzDLE5IqH36kNkORTfRvdyWZzAepBChl4C64/eCs1EoMr44/MAa396e/SvyqYTM89R7MtUcL7IIag18+loFWBCMsWlmkgRC735pN163bm93nXDocwQ1keYZj67Q1VkIJ60LUOxAaQMHTMi0k4Ww/GVNzL77v6S7rawUgaXBGNiMmZS3gnp9aQ==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- References: <mvmy2w4avgo.fsf@suse.de>
On 25/11/2019 14:20, Andreas Schwab wrote:
> Now that abort no longer calls fflush there is no reason to avoid locking
> the stdio streams anywhere.
the patch looks ok to me.
note that it may expose an issue mentioned in
https://sourceware.org/bugzilla/show_bug.cgi?id=24963
concurrent fflush(0) and freopen(fp) may deadlock
as they choose different lock ordering.