aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEvgeniy <dushistov@mail.ru>2006-01-13 10:12:15 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-13 11:42:48 -0500
commit8a430d74fea797fc55fef1ad4c21420212b83574 (patch)
tree123a53efd78abc925821065c70e0c8c3c417a888 /fs
parent43ecb9a33ba8c93ebbda81d48ca05f0d1bbf9056 (diff)
[PATCH] Fix oops in ufs_fill_super at mount time
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ufs/util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ufs/util.h b/fs/ufs/util.h
index b2640076679a..e45ad5379872 100644
--- a/fs/ufs/util.h
+++ b/fs/ufs/util.h
@@ -255,8 +255,8 @@ extern void _ubh_memcpyubh_(struct ufs_sb_private_info *, struct ufs_buffer_head
255 ((struct ufs_super_block_first *)((ubh)->bh[0]->b_data)) 255 ((struct ufs_super_block_first *)((ubh)->bh[0]->b_data))
256 256
257#define ubh_get_usb_second(ubh) \ 257#define ubh_get_usb_second(ubh) \
258 ((struct ufs_super_block_second *)(ubh)-> \ 258 ((struct ufs_super_block_second *)((ubh)->\
259 bh[UFS_SECTOR_SIZE >> uspi->s_fshift]->b_data + (UFS_SECTOR_SIZE & ~uspi->s_fmask)) 259 bh[UFS_SECTOR_SIZE >> uspi->s_fshift]->b_data + (UFS_SECTOR_SIZE & ~uspi->s_fmask)))
260 260
261#define ubh_get_usb_third(ubh) \ 261#define ubh_get_usb_third(ubh) \
262 ((struct ufs_super_block_third *)((ubh)-> \ 262 ((struct ufs_super_block_third *)((ubh)-> \