From: Mingming Cao Date: Sun, 25 Jun 2006 12:47:50 +0000 (-0700) Subject: [PATCH] Avoid disk sector_t overflow for >2TB ext3 filesystem X-Git-Tag: v2.6.18-rc1~988 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcd5df35882b128ef3e160fab3074e6fe7ae501b;p=pandora-kernel.git [PATCH] Avoid disk sector_t overflow for >2TB ext3 filesystem If ext3 filesystem is larger than 2TB, and sector_t is a u32 (i.e. CONFIG_LBD not defined in the kernel), the calculation of the disk sector will overflow. Add check at ext3_fill_super() and ext3_group_extend() to prevent mount/remount/resize >2TB ext3 filesystem if sector_t size is 4 bytes. Verified this patch on a 32 bit platform without CONFIG_LBD defined (sector_t is 32 bits long), mount refuse to mount a 10TB ext3. Signed-off-by: Mingming Cao Acked-by: Andreas Dilger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed