xfs: validate quota log items during log recovery
authorChristoph Hellwig <hch@lst.de>
Mon, 8 Jun 2009 13:33:21 +0000 (15:33 +0200)
committerChristoph Hellwig <hch@brick.lst.de>
Mon, 8 Jun 2009 13:33:21 +0000 (15:33 +0200)
commit0c5e1ce89f1eacc366ec421c0f5f681159479c28
treec73fb303fa25d58773ecb989c428041994933b92
parente1696834e8a15d7ef9ae8ffdffe00bac1399a2e3
xfs: validate quota log items during log recovery

Arkadiusz has seen really strange crashes in xfs_qm_dqcheck that
I can only explain by a log item being too smal to actually fit the
xfs_dqblk_t we're dereferencing all over xfs_qm_dqcheck.  So add
graceful checks for NULL or too small quota items to the log recovery
code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
fs/xfs/xfs_log_recover.c