xfs
[Top] [All Lists]

Re: [PATCH] xfs: don't perform lookups on zero-height btrees

To: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
Subject: Re: [PATCH] xfs: don't perform lookups on zero-height btrees
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 25 Aug 2016 01:04:52 -0700
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, linux-xfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160819203022.GD8268@xxxxxxxxxxxxxxxx>
References: <20160819203022.GD8268@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.6.1 (2016-04-27)
On Fri, Aug 19, 2016 at 01:30:22PM -0700, Darrick J. Wong wrote:
> If the caller passes in a cursor to a zero-height btree (which is
> impossible), we never set block to anything but NULL, which causes the
> later dereference of it to crash.  Instead, just return -EFSCORRUPTED.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

Looks fine,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

maybe also throw in an unlikely notation, though..

<Prev in Thread] Current Thread [Next in Thread>