From: Dave Chinner Date: Fri, 3 Sep 2010 02:19:33 +0000 (+1000) Subject: xfs: prevent 32bit overflow in space reservation X-Git-Tag: v2.6.36-rc4~78^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72656c46f50b8dfe50e15793692982e636e3df20;p=pandora-kernel.git xfs: prevent 32bit overflow in space reservation If we attempt to preallocate more than 2^32 blocks of space in a single syscall, the transaction block reservation will overflow leading to a hangs in the superblock block accounting code. This is trivially reproduced with xfs_io. Fix the problem by capping the allocation reservation to the maximum number of blocks a single xfs_bmapi() call can allocate (2^21 blocks). Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig --- Reading git-diff-tree failed