From 349e08489688e079730f2f9175d20741eda90276 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 3 May 2020 09:15:55 +0200 Subject: [PATCH] 4.4-stable patches added patches: ext4-fix-special-inode-number-checks-in-__ext4_iget.patch --- queue-4.14/series | 1 + ...l-inode-number-checks-in-__ext4_iget.patch | 38 +++++++++++++++++++ queue-4.4/series | 1 + queue-4.9/series | 1 + 4 files changed, 41 insertions(+) create mode 100644 queue-4.14/series create mode 100644 queue-4.4/ext4-fix-special-inode-number-checks-in-__ext4_iget.patch create mode 100644 queue-4.4/series create mode 100644 queue-4.9/series diff --git a/queue-4.14/series b/queue-4.14/series new file mode 100644 index 00000000000..6a92190e3f3 --- /dev/null +++ b/queue-4.14/series @@ -0,0 +1 @@ +ext4-fix-special-inode-number-checks-in-__ext4_iget.patch diff --git a/queue-4.4/ext4-fix-special-inode-number-checks-in-__ext4_iget.patch b/queue-4.4/ext4-fix-special-inode-number-checks-in-__ext4_iget.patch new file mode 100644 index 00000000000..7db4e146711 --- /dev/null +++ b/queue-4.4/ext4-fix-special-inode-number-checks-in-__ext4_iget.patch @@ -0,0 +1,38 @@ +From 191ce17876c9367819c4b0a25b503c0f6d9054d8 Mon Sep 17 00:00:00 2001 +From: Theodore Ts'o +Date: Mon, 31 Dec 2018 22:34:31 -0500 +Subject: ext4: fix special inode number checks in __ext4_iget() + +From: Theodore Ts'o + +commit 191ce17876c9367819c4b0a25b503c0f6d9054d8 upstream. + +The check for special (reserved) inode number checks in __ext4_iget() +was broken by commit 8a363970d1dc: ("ext4: avoid declaring fs +inconsistent due to invalid file handles"). This was caused by a +botched reversal of the sense of the flag now known as +EXT4_IGET_SPECIAL (when it was previously named EXT4_IGET_NORMAL). +Fix the logic appropriately. + +Fixes: 8a363970d1dc ("ext4: avoid declaring fs inconsistent...") +Signed-off-by: Theodore Ts'o +Reported-by: Dan Carpenter +Cc: stable@kernel.org +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ext4/inode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/ext4/inode.c ++++ b/fs/ext4/inode.c +@@ -4233,7 +4233,7 @@ struct inode *__ext4_iget(struct super_b + uid_t i_uid; + gid_t i_gid; + +- if (((flags & EXT4_IGET_NORMAL) && ++ if ((!(flags & EXT4_IGET_SPECIAL) && + (ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO)) || + (ino < EXT4_ROOT_INO) || + (ino > le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count))) { diff --git a/queue-4.4/series b/queue-4.4/series new file mode 100644 index 00000000000..6a92190e3f3 --- /dev/null +++ b/queue-4.4/series @@ -0,0 +1 @@ +ext4-fix-special-inode-number-checks-in-__ext4_iget.patch diff --git a/queue-4.9/series b/queue-4.9/series new file mode 100644 index 00000000000..6a92190e3f3 --- /dev/null +++ b/queue-4.9/series @@ -0,0 +1 @@ +ext4-fix-special-inode-number-checks-in-__ext4_iget.patch -- 2.47.3