aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy <dushistov@mail.ru>2006-01-13 18:12:15 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-30 22:13:17 -0800
commit4f3bfdc30b23e63d9c215e47192f427c2d7d4774 (patch)
tree491c48cd4f298ae6137c062c5cbcfaaeb57a31c6
parent1518d0b7a1ab6465487491c374bd18df6a4c036b (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> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-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
((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)-> \