glibc/manual
Florian Weimer 29d794863c malloc: Run fork handler as late as possible [BZ #19431]
Previously, a thread M invoking fork would acquire locks in this order:

  (M1) malloc arena locks (in the registered fork handler)
  (M2) libio list lock

A thread F invoking flush (NULL) would acquire locks in this order:

  (F1) libio list lock
  (F2) individual _IO_FILE locks

A thread G running getdelim would use this order:

  (G1) _IO_FILE lock
  (G2) malloc arena lock

After executing (M1), (F1), (G1), none of the threads can make progress.

This commit changes the fork lock order to:

  (M'1) libio list lock
  (M'2) malloc arena locks

It explicitly encodes the lock order in the implementations of fork,
and does not rely on the registration order, thus avoiding the deadlock.
2016-04-14 09:17:02 +02:00
..
examples Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
argp.texi manual/argp.texi (Specifying Argp Parsers): Fix typo. 2015-10-14 11:49:58 -04:00
arith.texi
charset.texi
check-safety.sh Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
conf.texi
contrib.texi glibc 2.21 pre-release update. 2015-02-05 23:14:38 -05:00
creature.texi
crypt.texi
ctype.texi
debug.texi
dir
errno.texi manual: complete example in error message documentation 2015-03-06 00:59:49 -05:00
fdl-1.3.texi
filesys.texi Deprecate readdir_r, readdir64_r [BZ #19056] 2016-02-20 12:56:55 +01:00
freemanuals.texi
getopt.texi
header.texi
install-plain.texi
install.texi Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere. 2016-02-24 17:15:12 +00:00
intro.texi
io.texi
ipc.texi
job.texi ctermid: return string literal, document MT-Safety pitfall 2014-11-21 02:16:02 -02:00
lang.texi Split large string section; add truncation advice 2015-12-10 08:29:30 -08:00
lgpl-2.1.texi
libc-texinfo.sh Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
libc.texinfo Fix doc quoting problems with Texinfo 5 2016-01-10 00:20:51 -08:00
libcbook.texi
libdl.texi
libm-err-tab.pl Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
llio.texi Fix exponents in manual. 2015-08-20 09:43:50 +02:00
locale.texi Split large string section; add truncation advice 2015-12-10 08:29:30 -08:00
macros.texi Fix exponents in manual. 2015-08-20 09:43:50 +02:00
maint.texi
Makefile Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
math.texi Allow spurious underflow / inexact for ldbl-128ibm. 2016-03-10 23:48:46 +00:00
memory.texi malloc: Run fork handler as late as possible [BZ #19431] 2016-04-14 09:17:02 +02:00
message.texi
nss.texi Document best practice for disconnected NSS modules. 2015-12-10 00:48:15 -05:00
nsswitch.texi
pattern.texi Avoid SIGFPE in wordexp [BZ #18100] 2015-03-23 16:12:38 +01:00
pipe.texi
platform.texi PowerPC: Extend Program Priority Register support 2015-08-19 17:43:26 -03:00
probes.texi
process.texi Remove union wait [BZ #19613] 2016-04-14 08:54:57 +02:00
resource.texi
search.texi manual: Correct guarantee about pointers compared by qsort() 2014-12-21 14:11:32 +01:00
setjmp.texi
signal.texi Fix crossreference to nonexistent node BSD Handler 2014-11-18 11:19:20 +01:00
socket.texi
startup.texi
stdio-fp.c
stdio.texi Split large string section; add truncation advice 2015-12-10 08:29:30 -08:00
string.texi Split large string section; add truncation advice 2015-12-10 08:29:30 -08:00
summary.awk Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sysinfo.texi Make obsolete syscall wrappers into compat symbols (bug 18472). 2015-12-14 22:52:15 +00:00
syslog.texi
terminal.texi
texinfo.tex Update miscellaneous files from upstream sources. 2016-01-05 18:04:06 +00:00
texis.awk
threads.texi Remove CPU set size checking from affinity functions [BZ #19143] 2015-11-24 17:21:01 +01:00
time.texi * manual/time.texi (TZ Variable): glibc no longer comes with tzdata. 2015-02-16 15:32:34 -08:00
tsort.awk Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
users.texi manual: cuserid is mtasurace if not passed a string 2014-11-21 02:15:09 -02:00
xtract-typefun.awk Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00