]> git.baikalelectronics.ru Git - kernel.git/commit
Fix regression due to "fs: move binfmt_misc sysctl to its own file"
authorDomenico Andreoli <domenico.andreoli@linux.com>
Wed, 9 Feb 2022 07:49:20 +0000 (08:49 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 9 Feb 2022 17:50:02 +0000 (09:50 -0800)
commit756012d855bd2b5abf1a5e99912c1db4bdbb41d8
treed624dac184fc8e660de3fa556f68509a52f09170
parent82136fb7a561a171a9e2af89b5b077f57f2ca7f5
Fix regression due to "fs: move binfmt_misc sysctl to its own file"

Commit 79fbc4829c8b ("fs: move binfmt_misc sysctl to its own file") did
not go unnoticed, binfmt-support stopped to work on my Debian system
since v5.17-rc2 (did not check with -rc1).

The existance of the /proc/sys/fs/binfmt_misc is a precondition for
attempting to mount the binfmt_misc fs, which in turn triggers the
autoload of the binfmt_misc module.  Without it, no module is loaded and
no binfmt is available at boot.

Building as built-in or manually loading the module and mounting the fs
works fine, it's therefore only a matter of interaction with user-space.
I could try to improve the Debian systemd configuration but I can't say
anything about the other distributions.

This patch restores a working system right after boot.

Fixes: 79fbc4829c8b ("fs: move binfmt_misc sysctl to its own file")
Signed-off-by: Domenico Andreoli <domenico.andreoli@linux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_misc.c
fs/file_table.c