]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fs: sort out a stale comment about races between fd alloc and dup2
authorMateusz Guzik <mjguzik@gmail.com>
Thu, 5 Dec 2024 15:47:43 +0000 (16:47 +0100)
committerChristian Brauner <brauner@kernel.org>
Sun, 22 Dec 2024 10:33:42 +0000 (11:33 +0100)
commitec052fae814d467d6aa7e591b4b24531b87e65ec
treed5fa3120572a7433de9ec6757d623d5acb481b3a
parent175c6a216dda4c88f7050b67e75a6cf331086c75
fs: sort out a stale comment about races between fd alloc and dup2

It claims the issue is only relevant for shared descriptor tables which
is of no concern for POSIX (but then is POSIX of concern to anyone
today?), which I presume predates standarized threading.

The comment also mentions the following systems:
- OpenBSD installing a larval file -- they moved away from it, file is
  installed late and EBUSY is returned on conflict
- FreeBSD returning EBADF -- reworked to install the file early like
  OpenBSD used to do
- NetBSD "deadlocks in amusing ways" -- their solution looks
  Solaris-inspired (not a compliment) and I would not be particularly
  surprised if it indeed deadlocked, in amusing ways or otherwise

I don't believe mentioning any of these adds anything and the statement
about the issue not being POSIX-relevant is outdated.

dup2 description in POSIX still does not mention the problem.

Just shorten the comment and be done with it.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://lore.kernel.org/r/20241205154743.1586584-1-mjguzik@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/file.c