crash/0018-Exclude-zero-entries-from-do_maple_tree-return-value.patch
Lianbo Jiang d2b8160311 Fix for irq/tree issues
Upstream commits:
b76e116c50ff ("vmware: Improve output when we fail to read vmware 'vmsn' file")
d17d51a92a3a ("Exclude zero entries from do_maple_tree() return value")
38d35bd1423c ("Fix "irq [-a|-s]" options on Linux 6.5-rc1 and later")
f0b59524624b ("Fix segmentation fault by "tree -s" option with Maple Tree")

Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
2023-07-13 10:06:48 +08:00

34 lines
1.1 KiB
Diff

From d17d51a92a3a1c1cce1e646c38fe52ca99406cf9 Mon Sep 17 00:00:00 2001
From: Kazuhito Hagio <k-hagio-ab@nec.com>
Date: Fri, 7 Jul 2023 15:17:18 +0900
Subject: [PATCH 2/4] Exclude zero entries from do_maple_tree() return value
While the return value of do_radix_tree() and do_xarray() does not
contain NULL entries, do_maple_tree()'s one contains NULL entries.
Make this behavior consistent with the previous tree functions to make
replacement easier, especially for the following patch.
Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
---
maple_tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maple_tree.c b/maple_tree.c
index 807c17f7dfa0..eccd273105a6 100644
--- a/maple_tree.c
+++ b/maple_tree.c
@@ -287,7 +287,7 @@ static void do_mt_entry(ulong entry, ulong min, ulong max, uint depth,
static struct req_entry **e = NULL;
struct tree_data *td = ops->is_td ? (struct tree_data *)ops->private : NULL;
- if (ops->entry)
+ if (ops->entry && entry)
ops->entry(entry, entry, path, max, ops->private);
if (!td)
--
2.37.1