[PATCH] fs: btrfs: Prevent error pointer dereference in list_subvolums()

Tom Rini trini at konsulko.com
Wed Aug 9 03:40:04 CEST 2023

On Wed, Jul 26, 2023 at 09:59:04AM +0300, Dan Carpenter wrote:

> If btrfs_read_fs_root() fails with -ENOENT, then we go to the next
> entry.  Fine.  But if it fails for a different reason then we need
> to clean up and return an error code.  In the current code it
> doesn't clean up but instead dereferences "root" and crashes.
> Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
> Reviewed-by: Marek Behún <kabel at kernel.org>
> Reviewed-by: Qu Wenruo <wqu at suse.com>

Applied to u-boot/next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230808/6c7cae83/attachment.sig>

More information about the U-Boot mailing list