linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [STABLE] Fix oops in ufs_fill_super at mount time
@ 2006-01-15 12:02 Alexey Dobriyan
  2006-01-15 18:11 ` Chris Wright
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2006-01-15 12:02 UTC (permalink / raw)
  To: stable; +Cc: Evgeniy, linux-kernel

From: Evgeniy <dushistov@mail.ru>

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>
---

--- a/fs/ufs/util.h
+++ b/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)-> \


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [STABLE] Fix oops in ufs_fill_super at mount time
  2006-01-15 12:02 [STABLE] Fix oops in ufs_fill_super at mount time Alexey Dobriyan
@ 2006-01-15 18:11 ` Chris Wright
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wright @ 2006-01-15 18:11 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: stable, Evgeniy, linux-kernel

* Alexey Dobriyan (adobriyan@gmail.com) wrote:
> From: Evgeniy <dushistov@mail.ru>
> 
> 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.

Thanks Alexey, this one's already queued for the next -stable.
-chris

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-15 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-15 12:02 [STABLE] Fix oops in ufs_fill_super at mount time Alexey Dobriyan
2006-01-15 18:11 ` Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).