RE: [PATCH v1 1/2] open: add close_range()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "'Konstantin Khlebnikov'" <khlebnikov@xxxxxxxxxxxxxx>, Christian Brauner <christian@xxxxxxxxxx>, "viro@xxxxxxxxxxxxxxxxxx" <viro@xxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>, "linux-api@xxxxxxxxxxxxxxx" <linux-api@xxxxxxxxxxxxxxx>, "torvalds@xxxxxxxxxxxxxxxxxxxx" <torvalds@xxxxxxxxxxxxxxxxxxxx>, "fweimer@xxxxxxxxxx" <fweimer@xxxxxxxxxx>
- Subject: RE: [PATCH v1 1/2] open: add close_range()
- From: David Laight <David.Laight@xxxxxxxxxx>
- Date: Thu, 23 May 2019 16:29:44 +0000
- Accept-language: en-GB, en-US
- Cc: "jannh@xxxxxxxxxx" <jannh@xxxxxxxxxx>, "oleg@xxxxxxxxxx" <oleg@xxxxxxxxxx>, "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "arnd@xxxxxxxx" <arnd@xxxxxxxx>, "shuah@xxxxxxxxxx" <shuah@xxxxxxxxxx>, "dhowells@xxxxxxxxxx" <dhowells@xxxxxxxxxx>, "tkjos@xxxxxxxxxxx" <tkjos@xxxxxxxxxxx>, "ldv@xxxxxxxxxxxx" <ldv@xxxxxxxxxxxx>, "miklos@xxxxxxxxxx" <miklos@xxxxxxxxxx>, "linux-alpha@xxxxxxxxxxxxxxx" <linux-alpha@xxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "linux-m68k@xxxxxxxxxxxxxxxxxxxx" <linux-m68k@xxxxxxxxxxxxxxx>, "linux-mips@xxxxxxxxxxxxxxx" <linux-mips@xxxxxxxxxxxxxxx>, "linux-parisc@xxxxxxxxxxxxxxx" <linux-parisc@xxxxxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>, "linux-s390@xxxxxxxxxxxxxxx" <linux-s390@xxxxxxxxxxxxxxx>, "linux-sh@xxxxxxxxxxxxxxx" <linux-sh@xxxxxxxxxxxxxxx>, "sparclinux@xxxxxxxxxxxxxxx" <sparclinux@xxxxxxxxxxxxxxx>, "linux-xtensa@xxxxxxxxxxxxxxxx" <linux-xtensa@xxxxxxxxxxxxxxxx>, "linux-arch@xxxxxxxxxxxxxxx" <linux-arch@xxxxxxxxxxxxxxx>, "linux-kselftest@xxxxxxxxxxxxxxx" <linux-kselftest@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>
- In-reply-to: <67e4458a-9cc4-d1aa-608c-73ebe9e2f7a3@yandex-team.ru>
- References: <20190522155259.11174-1-christian@brauner.io> <67e4458a-9cc4-d1aa-608c-73ebe9e2f7a3@yandex-team.ru>
From: Konstantin Khlebnikov
> Sent: 23 May 2019 17:22
....
> > In addition, the syscall will also work for tasks that do not have procfs
> > mounted and on kernels that do not have procfs support compiled in. In such
> > situations the only way to make sure that all file descriptors are closed
> > is to call close() on each file descriptor up to UINT_MAX or RLIMIT_NOFILE,
> > OPEN_MAX trickery (cf. comment [8] on Rust).
Code using RLIMIT_NOFILE is broken.
It is easy to reduce the hard limit below that of an open fd.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]