Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2013-06-27 15:19:18 +0200
committerMichal Marek <mmarek@suse.cz>2013-06-27 15:19:18 +0200
commit6efde93b67191cd8477119f38506300e9146e134 (patch)
tree179e62a94d064c655b95291a7bd5c8340a725107
parent3935df2b3c2115b897a0f79a71c20035f052a821 (diff)
parent92c21de26f79119471fc33b3199f87b2d6080356 (diff)
Merge branch 'SLE11-SP2' into SLE11-SP3
Conflicts: kernel-source.changes patches.kabi/mm-compaction-scan-pfn-caching-KABI-fix.patch patches.kabi/mm-compaction-scan-pfn-caching-KABI.patch patches.kabi/mm-mmu_notifier-have-mmu_notifiers-use-a-global-SRCU-so-they-may-safely-schedule-kabi.patch patches.kabi/netfilter-kABI-fix-after-making-event-callback-regis.patch series.conf
-rw-r--r--patches.fixes/ext4-avoid-hang-when-mounting-non-journal-filesystem.patch48
-rw-r--r--series.conf1
2 files changed, 49 insertions, 0 deletions
diff --git a/patches.fixes/ext4-avoid-hang-when-mounting-non-journal-filesystem.patch b/patches.fixes/ext4-avoid-hang-when-mounting-non-journal-filesystem.patch
new file mode 100644
index 0000000000..c0b9186d19
--- /dev/null
+++ b/patches.fixes/ext4-avoid-hang-when-mounting-non-journal-filesystem.patch
@@ -0,0 +1,48 @@
+From 0e9a9a1ad619e7e987815d20262d36a2f95717ca Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Thu, 27 Dec 2012 01:42:50 -0500
+Subject: [PATCH] ext4: avoid hang when mounting non-journal filesystems with
+ orphan list
+Git-commit: 0e9a9a1ad619e7e987815d20262d36a2f95717ca
+Patch-mainline: v3.8-rc2
+References: bnc#817377
+
+When trying to mount a file system which does not contain a journal,
+but which does have a orphan list containing an inode which needs to
+be truncated, the mount call with hang forever in
+ext4_orphan_cleanup() because ext4_orphan_del() will return
+immediately without removing the inode from the orphan list, leading
+to an uninterruptible loop in kernel code which will busy out one of
+the CPU's on the system.
+
+This can be trivially reproduced by trying to mount the file system
+found in tests/f_orphan_extents_inode/image.gz from the e2fsprogs
+source tree. If a malicious user were to put this on a USB stick, and
+mount it on a Linux desktop which has automatic mounts enabled, this
+could be considered a potential denial of service attack. (Not a big
+deal in practice, but professional paranoids worry about such things,
+and have even been known to allocate CVE numbers for such problems.)
+
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
+Cc: stable@vger.kernel.org
+Acked-by: Jan Kara <jack@suse.cz>
+
+---
+ fs/ext4/namei.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: linux-3.0-SLE11-SP2/fs/ext4/namei.c
+===================================================================
+--- linux-3.0-SLE11-SP2.orig/fs/ext4/namei.c
++++ linux-3.0-SLE11-SP2/fs/ext4/namei.c
+@@ -2062,7 +2062,8 @@ int ext4_orphan_del(handle_t *handle, st
+ int err = 0;
+
+ /* ext4_handle_valid() assumes a valid handle_t pointer */
+- if (handle && !ext4_handle_valid(handle))
++ if (handle && !ext4_handle_valid(handle) &&
++ !(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ORPHAN_FS))
+ return 0;
+
+ mutex_lock(&EXT4_SB(inode->i_sb)->s_orphan_lock);
diff --git a/series.conf b/series.conf
index a17d4e7f3b..736dde532b 100644
--- a/series.conf
+++ b/series.conf
@@ -1678,6 +1678,7 @@
patches.fixes/mm-jbd-Refine-commit-writeout-logic.patch
patches.fixes/jbd-clear-revoked-flag-on-buffers-before-a-new-trans.patch
+ patches.fixes/ext4-avoid-hang-when-mounting-non-journal-filesystem.patch
########################################################
# btrfs