/[linux-patches]/genpatches-2.6/trunk/2.6.14/1414_15.2_ufs-mount-oops.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1414_15.2_ufs-mount-oops.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (show annotations) (download) (as text)
Tue Mar 14 13:34:17 2006 UTC (14 years, 8 months ago) by johnm
File MIME type: text/x-diff
File size: 1314 byte(s)
2.6.14-11, rebase against local tree
1 From nobody Mon Sep 17 00:00:00 2001
2 Subject: [PATCH] Fix oops in ufs_fill_super at mount time
3 From: Evgeniy <dushistov@mail.ru>
4 Date: 1137165135 +0300
5
6 There's a lack of parenthesis in fs/ufs/utils.h, so instead of the 512th
7 byte of buffer, the usb2 pointer will point to the nth structure of type
8 ufs_super_block_second.
9
10 This can cause a mount-time oops if you're unlucky (especially with
11 DEBUG_PAGEALLOC, which is how Alexey Dobriyan saw this problem)
12
13 Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
14 Acked-by: Alexey Dobriyan <adobriyan@gmail.com>
15 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
16 Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 ---
18 fs/ufs/util.h | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21 --- linux-2.6.15.1.orig/fs/ufs/util.h
22 +++ linux-2.6.15.1/fs/ufs/util.h
23 @@ -255,8 +255,8 @@ extern void _ubh_memcpyubh_(struct ufs_s
24 ((struct ufs_super_block_first *)((ubh)->bh[0]->b_data))
25
26 #define ubh_get_usb_second(ubh) \
27 - ((struct ufs_super_block_second *)(ubh)-> \
28 - bh[UFS_SECTOR_SIZE >> uspi->s_fshift]->b_data + (UFS_SECTOR_SIZE & ~uspi->s_fmask))
29 + ((struct ufs_super_block_second *)((ubh)->\
30 + bh[UFS_SECTOR_SIZE >> uspi->s_fshift]->b_data + (UFS_SECTOR_SIZE & ~uspi->s_fmask)))
31
32 #define ubh_get_usb_third(ubh) \
33 ((struct ufs_super_block_third *)((ubh)-> \

  ViewVC Help
Powered by ViewVC 1.1.20