public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: DaeMyung Kang <charsyam@gmail.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: Hyunchul Lee <hyc.lee@gmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	DaeMyung Kang <charsyam@gmail.com>
Subject: Re: [PATCH 1/2] ntfs: fix NULL dereference in ntfs_index_walk_down()
Date: Sun, 26 Apr 2026 12:47:49 +0900	[thread overview]
Message-ID: <20260426034749.409043-1-charsyam@gmail.com> (raw)
In-Reply-To: <20260425184243.116396-2-charsyam@gmail.com>

On Sat, Apr 25, 2026, Namjae Jeon wrote:
> Is there any reason why you use IS_ERR_OR_NULL(), not IS_ERR() ?

No good reason -- that was over-defensive on my part. Inside the loop,
entry is only set to one of:

  - ie, the caller's argument (both call sites pass a pointer
    arithmetic result that cannot be NULL),
  - ntfs_ie_get_first(&ictx->ib->index), which is also pointer
    arithmetic on ictx->ib that we just checked non-NULL above,
  - ERR_PTR(-EIO) on ntfs_ib_read() failure.

So entry is never NULL inside the loop body. I'll switch to plain
IS_ERR() in v2.

Thanks,
DaeMyung

  parent reply	other threads:[~2026-04-26  3:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-25 18:42 [PATCH 0/2] ntfs: fix index walk NULL deref and WSL symlink leak DaeMyung Kang
2026-04-25 18:42 ` [PATCH 1/2] ntfs: fix NULL dereference in ntfs_index_walk_down() DaeMyung Kang
2026-04-26  1:01   ` Namjae Jeon
2026-04-26  3:47   ` DaeMyung Kang [this message]
2026-04-25 18:42 ` [PATCH 2/2] ntfs: fix WSL symlink target leak on reparse failure DaeMyung Kang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260426034749.409043-1-charsyam@gmail.com \
    --to=charsyam@gmail.com \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox