summaryrefslogtreecommitdiff
path: root/lib/xarray.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xarray.c')
-rw-r--r--lib/xarray.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/xarray.c b/lib/xarray.c
index bfaaa2c1f3fe..6ecf35c2e1da 100644
--- a/lib/xarray.c
+++ b/lib/xarray.c
@@ -1849,6 +1849,9 @@ void *xa_find_after(struct xarray *xa, unsigned long *indexp,
XA_STATE(xas, xa, *indexp + 1);
void *entry;
+ if (xas.xa_index == 0)
+ return NULL;
+
rcu_read_lock();
for (;;) {
if ((__force unsigned int)filter < XA_MAX_MARKS)