summaryrefslogtreecommitdiffstats
path: root/fs/ext2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-11-29 09:56:00 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-11-29 09:56:00 -0800
commit9af33b574517609763ff32dbca8857686c4bf296 (patch)
tree8a56d8815b59e21ba2206b4380d66b7a173c7f14 /fs/ext2
parent60b548237fed4b4164bab13c994dd9615f6c4323 (diff)
parentecebf55d27a11538ea84aee0be643dd953f830d5 (diff)
downloadtalos-op-linux-9af33b574517609763ff32dbca8857686c4bf296.tar.gz
talos-op-linux-9af33b574517609763ff32dbca8857686c4bf296.zip
Merge tag 'fixes_for_v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull ext2 and udf fixes from Jan Kara: "Three small ext2 and udf fixes" * tag 'fixes_for_v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: fix potential use after free ext2: initialize opts.s_mount_opt as zero before using it udf: Allow mounting volumes with incorrect identification strings
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/super.c1
-rw-r--r--fs/ext2/xattr.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index cb91baa4275d..eb11502e3fcd 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -892,6 +892,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
if (sb->s_magic != EXT2_SUPER_MAGIC)
goto cantfind_ext2;
+ opts.s_mount_opt = 0;
/* Set defaults before we parse the mount options */
def_mount_opts = le32_to_cpu(es->s_default_mount_opts);
if (def_mount_opts & EXT2_DEFM_DEBUG)
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
index 62d9a659a8ff..dd8f10db82e9 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
@@ -612,9 +612,9 @@ skip_replace:
}
cleanup:
- brelse(bh);
if (!(bh && header == HDR(bh)))
kfree(header);
+ brelse(bh);
up_write(&EXT2_I(inode)->xattr_sem);
return error;
OpenPOWER on IntegriCloud