[PATCH] sanity check attr fork size

Dave Chinner david at fromorbit.com
Sun Jan 4 16:40:11 CST 2009


On Sun, Jan 04, 2009 at 11:42:11AM -0500, Christoph Hellwig wrote:
> Recently we have quite a few kerneloops reports about dereferencing a NULL
> if_data in the attribute fork.  From looking over the code this can only
> happen if we pass a 0 size argument to xfs_iformat_local.  This implies some
> sort of corruption and in fact the only mailinglist report about this from
> earlier this year was after a powerfail presumably on a system with write
> cache and without barriers.
> 
> Add a quick sanity check for the attr fork size in xfs_iformat to catch
> these early and without an oops.

Looks sane to me.

Reviewed-by: Dave Chinner <david at fromorbit.com>

-- 
Dave Chinner
david at fromorbit.com




More information about the xfs mailing list