xfs: Check buffer lengths in log recovery
authorDave Chinner <david@fromorbit.com>
Thu, 22 Jan 2009 04:37:47 +0000 (15:37 +1100)
committerFelix Blyakher <felixb@sgi.com>
Tue, 3 Feb 2009 16:19:33 +0000 (10:19 -0600)
commit3228149ceb8b045e324cd268be9182bb26e6488b
treebc394d1bd7b321fe3870a079b0d3bbda02154198
parented7b44af3517441ba46b84da13773d24809ffdd3
xfs: Check buffer lengths in log recovery

Before trying to obtain, read or write a buffer,
check that the buffer length is actually valid. If
it is not valid, then something read in the recovery
process has been corrupted and we should abort
recovery.

Reported-by: Eric Sesterhenn <snakebyte@gmx.de>
Tested-by: Eric Sesterhenn <snakebyte@gmx.de>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
fs/xfs/xfs_log_recover.c