diff options
author | Laura Abbott <labbott@redhat.com> | 2019-10-08 13:23:13 -0400 |
---|---|---|
committer | Laura Abbott <labbott@redhat.com> | 2019-10-08 13:23:13 -0400 |
commit | 0367ea2bfd07bb85b0e9ed187d83ff612847f391 (patch) | |
tree | ff440e4e1b500ab3cf637038bf2d38dbfb68878c | |
parent | 391323a40ee8ef2832065afd81ab5b14c8c9aea3 (diff) | |
download | kernel-0367ea2bfd07bb85b0e9ed187d83ff612847f391.tar.gz kernel-0367ea2bfd07bb85b0e9ed187d83ff612847f391.tar.xz kernel-0367ea2bfd07bb85b0e9ed187d83ff612847f391.zip |
Add fix for mount api change on shmem (rhbz 1757104)
-rw-r--r-- | 0001-mount-on-tmpfs-failing-to-parse-context-option.patch | 45 | ||||
-rw-r--r-- | kernel.spec | 2 |
2 files changed, 47 insertions, 0 deletions
diff --git a/0001-mount-on-tmpfs-failing-to-parse-context-option.patch b/0001-mount-on-tmpfs-failing-to-parse-context-option.patch new file mode 100644 index 000000000..7df9f01f5 --- /dev/null +++ b/0001-mount-on-tmpfs-failing-to-parse-context-option.patch @@ -0,0 +1,45 @@ +From db379c4b35d376201113a798aacb7e01a6f63375 Mon Sep 17 00:00:00 2001 +From: Al Viro <viro@zeniv.linux.org.uk> +Date: Tue, 8 Oct 2019 02:26:22 +0100 +Subject: [PATCH] mount on tmpfs failing to parse context option + +On Mon, Oct 07, 2019 at 05:50:31PM -0700, Hugh Dickins wrote: + +[sorry for being MIA - had been sick through the last week, just digging +myself from under piles of mail; my apologies] + +> (tmpfs, very tiresomely, supports a NUMA "mpol" mount option which can +> have commas in it e.g "mpol=bind:0,2": which makes all its comma parsing +> awkward. I assume that where the new mount API commits bend over to +> accommodate that peculiarity, they end up mishandling the comma in +> the context string above.) + + Dumber than that, I'm afraid. mpol is the reason for having +->parse_monolithic() in the first place, all right, but the problem is +simply the lack of security_sb_eat_lsm_opts() call in it. + + Could you check if the following fixes that one? +--- + mm/shmem.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/mm/shmem.c b/mm/shmem.c +index cd570cc79c76..220be9fa2c41 100644 +--- a/mm/shmem.c ++++ b/mm/shmem.c +@@ -3482,6 +3482,12 @@ static int shmem_parse_options(struct fs_context *fc, void *data) + { + char *options = data; + ++ if (options) { ++ int err = security_sb_eat_lsm_opts(options, &fc->security); ++ if (err) ++ return err; ++ } ++ + while (options != NULL) { + char *this_char = options; + for (;;) { +-- +2.21.0 + diff --git a/kernel.spec b/kernel.spec index b8c256fae..9d4dcf321 100644 --- a/kernel.spec +++ b/kernel.spec @@ -560,6 +560,8 @@ Patch503: KEYS-Make-use-of-platform-keyring-for-module-signature.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1756655 Patch504: 0001-mm-kmemleak-skip-late_init-if-not-skip-disable.patch +# rhbz 1757104 +Patch505: 0001-mount-on-tmpfs-failing-to-parse-context-option.patch # END OF PATCH DEFINITIONS %endif |