From: sashiko-bot@kernel.org
To: "Miklos Szeredi" <mszeredi@redhat.com>, virtualization@lists.linux.dev
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH v3 3/5] virtiofs: retry request submission from the worker on -ENOMEM
Date: Tue, 01 Dec 2026 11:05:18 +0000 [thread overview]
Message-ID: <sashiko-outbox-243123@kernel.org> (raw)
In-Reply-To: <20261201105855.430993-3-mszeredi@redhat.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] virtiofs: inaccurate Fixes trailer in commit message
--
commit 339631fd56eaa181fdd0c0ebe1ee0c1ec631f226
Author: Miklos Szeredi <mszeredi@redhat.com>
> virtiofs: retry request submission from the worker on -ENOMEM
>
> virtio_fs_send_req() enqueues with GFP_ATOMIC, because it may be called
> with fc->chan->bg_lock held. The sg arrays and, via
> copy_args_to_argbuf(), the bounce buffer are allocated with those flags,
> so under memory pressure a request can be failed with -ENOMEM even
> though nothing is wrong with it. The buffer is as large as the request
> arguments, so this is not limited to tiny allocations:
> FUSE_REMOVEMAPPING, for example, can ask for just over 4 KiB, an order-1
> allocation out of the atomic reserves with no reclaim.
>
> A virtqueue that is merely full is already handled gracefully: -ENOSPC
> puts the request on fsvq->queued_reqs and virtio_fs_request_dispatch_work()
> retries it with GFP_KERNEL under memalloc_nofs_save(). A failed atomic
> allocation is just as transient, so treat it the same way instead of
> ending the request. Unlike -ENOSPC there is no completion to kick the
> worker afterwards, so schedule it here.
>
> virtqueue_add_sgs() can also report -ENOMEM, but only for a DMA mapping
> failure, which the retry will not fix (failure to allocate the indirect
> descriptor table falls back to direct descriptors and does not return
> -ENOMEM). Such a request is retried once and then ended with -ENOMEM by
> the worker, so the two cases are not worth telling apart.
>
> virtio_fs_enqueue_req() queues on -ENOSPC only after checking
> fsvq->connected under fsvq->lock; do the same here and fail the request
> with -ENOTCONN if the queue is gone. req->argbuf has already been freed
> and cleared on the error path, so the retry reallocates it.
>
> Fixes: a62a8ef9d97d ("virtio-fs: add virtiofs filesystem")
> Reviewed-by: Li Wang <liwang@kylinos.cn>
> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
[Severity: Low]
In commit a62a8ef9d97d ("virtio-fs: add virtiofs filesystem"), initial
submission already retried on -ENOMEM alongside -ENOSPC, and commit
a9bfd9dd3417 ("virtiofs: Retry request submission from worker context")
preserved that when moving retries to fsvq->queued_reqs and
fsvq->dispatch_work. It was commit 2106e1f444d9 ("virtio-fs: let -ENOMEM
bubble up or burst gently") that dropped -ENOMEM from the retry check and
caused GFP_ATOMIC allocation failures to end the request immediately.
Should the Fixes tag be:
Fixes: 2106e1f444d9 ("virtio-fs: let -ENOMEM bubble up or burst gently")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201105855.430993-1-mszeredi@redhat.com?part=3
next prev parent reply other threads:[~2026-12-01 11:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 10:58 [PATCH v3 1/5] virtiofs: fix DAX range leak on unmount Miklos Szeredi
2026-12-01 10:58 ` [PATCH v3 2/5] virtiofs: don't abort DAX removemapping on allocation failure Miklos Szeredi
2026-12-01 15:18 ` German Maglione
2026-12-01 10:58 ` [PATCH v3 3/5] virtiofs: retry request submission from the worker on -ENOMEM Miklos Szeredi
2026-12-01 11:05 ` sashiko-bot [this message]
2026-12-01 15:18 ` German Maglione
2026-12-01 10:58 ` [PATCH v3 4/5] fuse: don't take a lookup count on the root inode Miklos Szeredi
2026-12-01 15:18 ` German Maglione
2026-12-02 3:50 ` Li Wang
2026-12-01 10:58 ` [PATCH v3 5/5] virtiofs: fix forget leak on submount unmount Miklos Szeredi
2026-12-01 13:23 ` Li Wang
2026-12-01 15:18 ` German Maglione
2026-12-01 11:11 ` [PATCH v3 1/5] virtiofs: fix DAX range leak on unmount sashiko-bot
2026-12-01 15:18 ` German Maglione
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=sashiko-outbox-243123@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=mszeredi@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@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