btrfs: don't BUG_ON on ENOMEM from btrfs_lookup_extent_info() in walk_down_proc()

BugLink: https://bugs.launchpad.net/bugs/2085849

[ Upstream commit a580fb2c3479d993556e1c31b237c9e5be4944a3 ]

We handle errors here properly, ENOMEM isn't fatal, return the error.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
CVE-2024-46841
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
Josef Bacik
2024-05-07 14:12:10 -04:00
committed by Mehmet Basaran
parent b2ad25ba53
commit 3d916bdaa8
-1
View File
@@ -5359,7 +5359,6 @@ static noinline int walk_down_proc(struct btrfs_trans_handle *trans,
&wc->refs[level],
&wc->flags[level],
NULL);
BUG_ON(ret == -ENOMEM);
if (ret)
return ret;
if (unlikely(wc->refs[level] == 0)) {