From 33f37c648812bdbe1bd1eea75ddab3e799d51e77 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 9 Oct 2019 22:48:01 -0400 Subject: shmem: fix LSM options parsing ->parse_monolithic() there forgets to call security_sb_eat_lsm_opts() Signed-off-by: Al Viro --- mm/shmem.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 (;;) { -- cgit v1.2.3-58-ga151 From 6fcf0c72e4b9360768cf5ef543c4f14c34800ee8 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Wed, 2 Oct 2019 17:56:33 +0800 Subject: vfs: add missing blkdev_put() in get_tree_bdev() Is there are a couple of missing blkdev_put() in get_tree_bdev()? Signed-off-by: Al Viro --- fs/super.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/super.c b/fs/super.c index beaf076d9733..530dd13fa98b 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1296,6 +1296,7 @@ int get_tree_bdev(struct fs_context *fc, mutex_lock(&bdev->bd_fsfreeze_mutex); if (bdev->bd_fsfreeze_count > 0) { mutex_unlock(&bdev->bd_fsfreeze_mutex); + blkdev_put(bdev, mode); warnf(fc, "%pg: Can't mount, blockdev is frozen", bdev); return -EBUSY; } @@ -1304,8 +1305,10 @@ int get_tree_bdev(struct fs_context *fc, fc->sget_key = bdev; s = sget_fc(fc, test_bdev_super_fc, set_bdev_super_fc); mutex_unlock(&bdev->bd_fsfreeze_mutex); - if (IS_ERR(s)) + if (IS_ERR(s)) { + blkdev_put(bdev, mode); return PTR_ERR(s); + } if (s->s_root) { /* Don't summarily change the RO/RW state. */ -- cgit v1.2.3-58-ga151