mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wahid Khan <wahidzk0091@gmail.com>
To: linkinjeon@kernel.org
Cc: hyc.lee@gmail.com, ntfs@lists.linux.dev,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8] ntfs: convert a named $DATA stream safely when making room in a record
Date: Thu, 12 Nov 2026 13:10:55 +0530	[thread overview]
Message-ID: <20261112074055.1876311-1-wahidzk0091@gmail.com> (raw)
In-Reply-To: <CAKYAXd-n+zGBq4i7rfLyX+_Y6zEMLTCCqb2vAgcnmavqKxtiHA@mail.gmail.com>

Hi Namjae,

-EAGAIN must not leave ntfs_resident_attr_resize(). The callers return
it as is, so a normal blocking write() or setxattr() would get EAGAIN
for a "would block" that never was, and index.c already uses -EAGAIN
internally as its "redo the insert" code (ntfs_ib_insert() ->
resplit), so a stray one from ntfs_attr_truncate() could be taken for
that.

-ENOSPC is what this function already returns when the attribute does
not fit and cannot be made non-resident, so callers already pass it up
as a normal error.
It is not exactly true here, it is a short lived "busy" and not a full
record, but there is no way to wait for folio 0 at that point without
the deadlock (the reader holds it and waits for mrec_lock), and no
errno fits better. I can use -EBUSY or add a comment saying so if you
prefer.

Thanks,
Wahid

  reply	other threads:[~2026-11-12  7:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 12:45 [PATCH v2 0/3] ntfs: three fixes for crafted images, found by fuzzing Wahid Khan
2026-11-06 12:45 ` [PATCH v2 1/3] ntfs: do not read an index block outside $INDEX_ALLOCATION Wahid Khan
2026-11-06 12:45 ` [PATCH v2 2/3] ntfs: open the index allocation before reading or writing an index block Wahid Khan
2026-11-06 12:45 ` [PATCH v2 3/3] ntfs: do not convert a named $DATA stream when making room in a record Wahid Khan
2026-11-06 13:31   ` Wahid Khan
2026-11-06 14:12     ` Namjae Jeon
2026-11-07 19:28       ` [PATCH v3] ntfs: open a named $DATA stream by name " Wahid Khan
2026-11-08  2:14         ` Namjae Jeon
2026-11-07 19:28       ` [PATCH v2 3/3] ntfs: do not convert a named $DATA stream " Wahid Khan
2026-11-08  8:03       ` [PATCH v4] ntfs: convert a named $DATA stream safely " Wahid Khan
2026-11-08 12:50         ` Namjae Jeon
2026-11-08 22:11           ` Wahid Khan
2026-11-08 22:12           ` [PATCH v5] " Wahid Khan
2026-11-09  7:07             ` [PATCH v6] " Wahid Khan
2026-11-09 14:24               ` [PATCH v7] " Wahid Khan
2026-11-09 17:32                 ` [PATCH v8] " Wahid Khan
2026-11-11  2:07                   ` Namjae Jeon
2026-11-12  7:40                     ` Wahid Khan [this message]
2026-11-13  1:47                       ` Namjae Jeon
2026-11-14  7:34                   ` [PATCH v9] " Wahid Khan
2026-11-08  8:08       ` [PATCH v2 3/3] ntfs: do not convert a named $DATA stream " Wahid Khan
2026-11-06 13:31 ` [PATCH v2 0/3] ntfs: three fixes for crafted images, found by fuzzing Namjae Jeon

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=20261112074055.1876311-1-wahidzk0091@gmail.com \
    --to=wahidzk0091@gmail.com \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®