autofs: rename 'autofs' module back to 'autofs4' (Closes: #902946)

This commit is contained in:
Ben Hutchings 2018-07-07 00:55:56 +01:00
parent 7c3c3873db
commit af34178104
3 changed files with 86 additions and 0 deletions

1
debian/changelog vendored
View File

@ -4,6 +4,7 @@ linux (4.18~rc3-1~exp2) UNRELEASED; urgency=medium
- Build docs using Python 3 version of Sphinx
- linux-perf: Build docs using asciidoctor
- linux-perf: Use Python 3 for scripts
* autofs: rename 'autofs' module back to 'autofs4' (Closes: #902946)
-- Ben Hutchings <ben@decadent.org.uk> Fri, 06 Jul 2018 20:55:47 +0100

View File

@ -0,0 +1,84 @@
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Wed, 4 Jul 2018 18:17:51 -0700
Subject: autofs: rename 'autofs' module back to 'autofs4'
Origin: https://git.kernel.org/linus/d02d21ea007b6b33cdaf15c2f84fb1fea996ecc2
Bug-Debian: https://bugs.debian.org/902946
It turns out that systemd has a bug: it wants to load the autofs module
early because of some initialization ordering with udev, and it doesn't
do that correctly. Everywhere else it does the proper "look up module
name" that does the proper alias resolution, but in that early code, it
just uses a hardcoded "autofs4" for the module name.
The result of that is that as of commit a2225d931f75 ("autofs: remove
left-over autofs4 stubs"), you get
systemd[1]: Failed to insert module 'autofs4': No such file or directory
in the system logs, and a lack of module loading. All this despite the
fact that we had very clearly marked 'autofs4' as an alias for this
module.
What's so ridiculous about this is that literally everything else does
the module alias handling correctly, including really old versions of
systemd (that just used 'modprobe' to do this), and even all the other
systemd module loading code.
Only that special systemd early module load code is broken, hardcoding
the module names for not just 'autofs4', but also "ipv6", "unix",
"ip_tables" and "virtio_rng". Very annoying.
Instead of creating an _additional_ separate compatibility 'autofs4'
module, just rely on the fact that everybody else gets this right, and
just call the module 'autofs4' for compatibility reasons, with 'autofs'
as the alias name.
That will allow the systemd people to fix their bugs, adding the proper
alias handling, and maybe even fix the name of the module to be just
"autofs" (so that they can _test_ the alias handling). And eventually,
we can revert this silly compatibility hack.
See also
https://github.com/systemd/systemd/issues/9501
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902946
for the systemd bug reports upstream and in the Debian bug tracker
respectively.
Fixes: a2225d931f75 ("autofs: remove left-over autofs4 stubs")
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Reported-by: Michael Biebl <biebl@debian.org>
Cc: Ian Kent <raven@themaw.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
fs/autofs/Makefile | 4 ++--
fs/autofs/init.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/autofs/Makefile b/fs/autofs/Makefile
index 43fedde15c26..1f85d35ec8b7 100644
--- a/fs/autofs/Makefile
+++ b/fs/autofs/Makefile
@@ -2,6 +2,6 @@
# Makefile for the linux autofs-filesystem routines.
#
-obj-$(CONFIG_AUTOFS_FS) += autofs.o
+obj-$(CONFIG_AUTOFS_FS) += autofs4.o
-autofs-objs := init.o inode.o root.o symlink.o waitq.o expire.o dev-ioctl.o
+autofs4-objs := init.o inode.o root.o symlink.o waitq.o expire.o dev-ioctl.o
diff --git a/fs/autofs/init.c b/fs/autofs/init.c
index cc9447e1903f..79ae07d9592f 100644
--- a/fs/autofs/init.c
+++ b/fs/autofs/init.c
@@ -23,7 +23,7 @@ static struct file_system_type autofs_fs_type = {
.kill_sb = autofs_kill_sb,
};
MODULE_ALIAS_FS("autofs");
-MODULE_ALIAS("autofs4");
+MODULE_ALIAS("autofs");
static int __init init_autofs_fs(void)
{

View File

@ -87,6 +87,7 @@ bugfix/all/kbuild-include-addtree-remove-quotes-before-matching-path.patch
debian/revert-objtool-fix-config_stack_validation-y-warning.patch
bugfix/all/i40e-build-for-64-bit-targets-only.patch
bugfix/all/netfilter-ipvs-Fix-invalid-bytes-in-IP_VS_MH_TAB_IND.patch
bugfix/all/autofs-rename-autofs-module-back-to-autofs4.patch
# Miscellaneous features