shmem: fix LSM options parsing (fwd)
diff mbox series

Message ID alpine.LRH.2.21.1910111000260.9215@namei.org
State New
Headers show
Series
  • shmem: fix LSM options parsing (fwd)
Related show

Commit Message

James Morris Oct. 10, 2019, 11 p.m. UTC
---------- Forwarded message ----------
Date: Thu, 10 Oct 2019 15:42:18 +0000
From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Reply-To: Al Viro <viro@zeniv.linux.org.uk>
To: git-commits-head@vger.kernel.org
Subject: shmem: fix LSM options parsing

Commit:     33f37c648812bdbe1bd1eea75ddab3e799d51e77
Parent:     a3bc18a48e2e678efe62f1f9989902f9cd19e0ff
Refname:    refs/heads/master
Web:        https://git.kernel.org/torvalds/c/33f37c648812bdbe1bd1eea75ddab3e799d51e77
Author:     Al Viro <viro@zeniv.linux.org.uk>
AuthorDate: Wed Oct 9 22:48:01 2019 -0400
Committer:  Al Viro <viro@zeniv.linux.org.uk>
CommitDate: Wed Oct 9 22:48:01 2019 -0400

    shmem: fix LSM options parsing
    
    ->parse_monolithic() there forgets to call security_sb_eat_lsm_opts()
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 mm/shmem.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch
diff mbox series

diff --git a/mm/shmem.c b/mm/shmem.c
index 0f7fd4a85db6..8dcc8d04cbaf 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 (;;) {