xfs: check for dinode realtime flag corruption
authorChristoph Hellwig <hch@lst.de>
Mon, 10 Aug 2009 14:32:18 +0000 (11:32 -0300)
committerFelix Blyakher <felixb@sgi.com>
Tue, 11 Aug 2009 21:03:19 +0000 (16:03 -0500)
commit16715dbe64ccac265010ab8b60848d212d002521
tree9e165ca646eef8835a940c66d0f8e7ac40cd4354
parent583e0e41ee29478e2147aeffeb772657f8db767a
xfs: check for dinode realtime flag corruption

Ramon tested XFS with a modified version of fsfuzzer and hit a NULL
pointer dereference in __xfs_get_blocks due to the RT device target
pointer being NULL.

To fix this reject inode with the realtime bit set on a a filesystem
without an RT subvolume during inode read.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Reported-by: Ramon de Carvalho Valle <ramon@risesecurity.org>
Tested-by: Ramon de Carvalho Valle <ramon@risesecurity.org>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
fs/xfs/xfs_inode.c