Re: [PATCH 1/2] ntfs: fix NULL dereference in ntfs_index_walk_down()

From: Namjae Jeon

Date: Sat Apr 25 2026 - 21:01:36 EST


> @@ -1991,8 +1995,8 @@ struct index_entry *ntfs_index_walk_down(struct index_entry *ie, struct ntfs_ind
> ictx->entry = ntfs_ie_get_first(&ictx->ib->index);
> entry = ictx->entry;
> } else
> - entry = NULL;
> - } while (entry && (entry->flags & INDEX_ENTRY_NODE));
> + entry = ERR_PTR(-EIO);
> + } while (!IS_ERR_OR_NULL(entry) && (entry->flags & INDEX_ENTRY_NODE));
Is there any reason why you use IS_ERR_OR_NULL(), not IS_ERR() ?

Thanks.