glibc/sysdeps
Adhemerval Zanella 053fe27343 linux: Fix __closefrom_fallback iterates until max int (BZ#28993)
The __closefrom_fallback tries to get a available file descriptor
if the initial open ("/proc/self/fd/", ...) fails.  It assumes the
failure would be only if procfs is not mount (ENOENT), however if
the the proc file is not accessible (due some other kernel filtering
such apparmor) it will iterate over a potentially large file set
issuing close calls.

It should only try the close fallback if open returns EMFILE,
ENFILE, or ENOMEM.

Checked on x86_64-linux-gnu.
2022-04-05 08:08:19 -03:00
..
aarch64
alpha Remove -z combreloc and HAVE_Z_COMBRELOC 2022-04-04 17:19:07 -07:00
arc
arm Remove -z combreloc and HAVE_Z_COMBRELOC 2022-04-04 17:19:07 -07:00
csky
generic elf: Remove inline _dl_dprintf 2022-03-23 10:42:01 -03:00
gnu
hppa Remove -z combreloc and HAVE_Z_COMBRELOC 2022-04-04 17:19:07 -07:00
htl
hurd
i386 Remove -z combreloc and HAVE_Z_COMBRELOC 2022-04-04 17:19:07 -07:00
ia64 Remove -z combreloc and HAVE_Z_COMBRELOC 2022-04-04 17:19:07 -07:00
ieee754
m68k
mach
microblaze
mips
nios2
nptl
or1k
posix gmon: Remove unused sprofil.c functions 2022-03-23 14:29:25 -03:00
powerpc configure.ac: fix bashisms in configure.ac 2022-03-22 21:53:43 -04:00
pthread
riscv Remove -z combreloc and HAVE_Z_COMBRELOC 2022-04-04 17:19:07 -07:00
s390 Remove -z combreloc and HAVE_Z_COMBRELOC 2022-04-04 17:19:07 -07:00
sh
sparc Remove -z combreloc and HAVE_Z_COMBRELOC 2022-04-04 17:19:07 -07:00
unix linux: Fix __closefrom_fallback iterates until max int (BZ#28993) 2022-04-05 08:08:19 -03:00
wordsize-32
wordsize-64
x86 x86: Fix fallback for wcsncmp_avx2 in strcmp-avx2.S [BZ #28896] 2022-03-25 11:46:13 -05:00
x86_64 Remove -z combreloc and HAVE_Z_COMBRELOC 2022-04-04 17:19:07 -07:00