]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Add ufs mount oops fix, fwd from akpm
authorChris Wright <chrisw@sous-sol.org>
Sun, 15 Jan 2006 07:34:33 +0000 (23:34 -0800)
committerChris Wright <chrisw@sous-sol.org>
Sun, 15 Jan 2006 07:34:33 +0000 (23:34 -0800)
queue/fix-oops-in-ufs_fill_super-at-mount-time.patch [new file with mode: 0644]
queue/series

diff --git a/queue/fix-oops-in-ufs_fill_super-at-mount-time.patch b/queue/fix-oops-in-ufs_fill_super-at-mount-time.patch
new file mode 100644 (file)
index 0000000..76216fd
--- /dev/null
@@ -0,0 +1,33 @@
+From nobody Mon Sep 17 00:00:00 2001
+Subject: [PATCH] Fix oops in ufs_fill_super at mount time
+From: Evgeniy <dushistov@mail.ru>
+Date: 1137165135 +0300
+
+There's a lack of parenthesis in fs/ufs/utils.h, so instead of the 512th
+byte of buffer, the usb2 pointer will point to the nth structure of type
+ufs_super_block_second.
+
+This can cause a mount-time oops if you're unlucky (especially with
+DEBUG_PAGEALLOC, which is how Alexey Dobriyan saw this problem)
+
+Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
+Acked-by: Alexey Dobriyan <adobriyan@gmail.com>
+Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+ fs/ufs/util.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- linux-2.6.15.1.orig/fs/ufs/util.h
++++ linux-2.6.15.1/fs/ufs/util.h
+@@ -255,8 +255,8 @@ extern void _ubh_memcpyubh_(struct ufs_s
+       ((struct ufs_super_block_first *)((ubh)->bh[0]->b_data))
+ #define ubh_get_usb_second(ubh) \
+-      ((struct ufs_super_block_second *)(ubh)-> \
+-      bh[UFS_SECTOR_SIZE >> uspi->s_fshift]->b_data + (UFS_SECTOR_SIZE & ~uspi->s_fmask))
++      ((struct ufs_super_block_second *)((ubh)->\
++      bh[UFS_SECTOR_SIZE >> uspi->s_fshift]->b_data + (UFS_SECTOR_SIZE & ~uspi->s_fmask)))
+ #define ubh_get_usb_third(ubh) \
+       ((struct ufs_super_block_third *)((ubh)-> \
index 0ab8bfa26effdb1508a1e9c6ea2bc7dddd99b7fb..0366f1c10fd4298aeca965d0569ef5166c9812f0 100644 (file)
@@ -2,3 +2,4 @@ usb-audio-dont-use-empty-packets-at-start-of-playback.patch
 kill-blk_attempt_remerge.patch
 input-hid-fix-an-oops-in-pid-initialization-code.patch
 fix-double-decrement-of-mqueue_mnt-mnt_count-in-sys_mq_open.patch
+fix-oops-in-ufs_fill_super-at-mount-time.patch