From: Tom Rini Date: Thu, 11 Oct 2018 10:11:15 -0400 Subject: [U-Boot] fs: btrfs: Fix tree traversal with btrfs_next_slot() In-Reply-To: <1536314370-15060-1-git-send-email-yevgenyp@pointgrab.com> References: <1536314370-15060-1-git-send-email-yevgenyp@pointgrab.com> Message-ID: <20181011141115.GY5539@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On Fri, Sep 07, 2018 at 12:59:30PM +0300, Yevgeny Popovych wrote: > When traversing slots in a btree (via btrfs_path) with btrfs_next_slot(), > we didn't correctly identify that the last slot in the leaf was reached > and we should jump to the next leaf. >=20 > This could lead to any kind of runtime errors or corruptions, like: > * file data not being read at all, or is read partially > * file is read but is corrupted > * (any) metadata being corrupted or not read at all, etc >=20 > The easiest way to reproduce this is to read a large enough file that > its EXTENT_DATA items don't fit into a single leaf. >=20 > Signed-off-by: Yevgeny Popovych > Cc: Marek Behun > Tested-by: Marek Beh=C3=BAn Applied to u-boot/master, thanks! --=20 Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: