xfs: prevent kernel crash due to corrupted inode log format
authorChristoph Hellwig <hch@infradead.org>
Tue, 3 Mar 2009 19:48:36 +0000 (14:48 -0500)
committerFelix Blyakher <felixb@sgi.com>
Fri, 6 Mar 2009 23:34:45 +0000 (17:34 -0600)
Andras Korn reported an oops on log replay causes by a corrupted
xfs_inode_log_format_t passing a 0 size to kmem_zalloc.  This patch handles
to small or too large numbers of log regions gracefully by rejecting the
log replay with a useful error message.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Andras Korn <korn-sgi.com@chardonnay.math.bme.hu>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Felix Blyakher <felixb@sgi.com>

No differences found