Re: [PATCH 8/9] xfs: catch bad block numbers freeing extents.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 06, 2011 at 09:59:51AM -0400, Christoph Hellwig wrote:
> > +	/* validate the extent size is legal now we have the agf locked */
> > +	if (!args.agbp) {
> > +		error = EFSCORRUPTED;
> > +		goto error0;
> > +	}
> 
> This is not a corruption case, but would require someone changing
> xfs_fix_freelist and messing up.  I think the check can be removed
> given that the potentially added bug would trivially trip up as
> a NULL pointer dereference.

Well, I figured the only way we wouldn't get the agbp is if it was
corrupted somehow (e.g. it gets re-read from disk), but that should
return an error from xfs_alloc_fix_freelist() anyway. So i think you
are right - the check can be dropped.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux