From: Pasha Tatashin <pasha.tatashin@soleen.com>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: Hugh Dickins <hughd@google.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] mm: memfd_luo: restore and free memfd_luo_ser on failure
Date: Thu, 22 Jan 2026 13:03:50 -0500 [thread overview]
Message-ID: <CA+CK2bBRGo3fQJ9dYhGHzOZU9hhLX8Yc=BjLph9HG6zuk_vE5A@mail.gmail.com> (raw)
In-Reply-To: <20260122151842.4069702-4-pratyush@kernel.org>
> ---
> mm/memfd_luo.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/mm/memfd_luo.c b/mm/memfd_luo.c
> index 01a72e4d3ef6..a34fccc23b6a 100644
> --- a/mm/memfd_luo.c
> +++ b/mm/memfd_luo.c
> @@ -447,7 +447,8 @@ static int memfd_luo_retrieve(struct liveupdate_file_op_args *args)
> file = memfd_alloc_file("", 0);
> if (IS_ERR(file)) {
> pr_err("failed to setup file: %pe\n", file);
> - return PTR_ERR(file);
> + err = PTR_ERR(file);
> + goto free_ser;
> }
>
> vfs_setpos(file, ser->pos, MAX_LFS_FILESIZE);
> @@ -473,7 +474,8 @@ static int memfd_luo_retrieve(struct liveupdate_file_op_args *args)
>
> put_file:
> fput(file);
> -
> +free_ser:
> + kho_restore_free(ser);
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
next prev parent reply other threads:[~2026-01-22 18:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 15:18 [PATCH 0/3] mm: memfd_luo hotfixes Pratyush Yadav
2026-01-22 15:18 ` [PATCH 1/3] memfd: export alloc_file() Pratyush Yadav
2026-01-22 15:44 ` Mike Rapoport
2026-01-22 18:00 ` Pasha Tatashin
2026-01-22 15:18 ` [PATCH 2/3] mm: memfd_luo: use memfd_alloc_file() instead of shmem_file_setup() Pratyush Yadav
2026-01-22 15:45 ` Mike Rapoport
2026-01-22 18:01 ` Pasha Tatashin
2026-01-22 15:18 ` [PATCH 3/3] mm: memfd_luo: restore and free memfd_luo_ser on failure Pratyush Yadav
2026-01-22 15:46 ` Mike Rapoport
2026-01-22 18:03 ` Pasha Tatashin [this message]
2026-01-22 15:31 ` [PATCH 0/3] mm: memfd_luo hotfixes Andrew Morton
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='CA+CK2bBRGo3fQJ9dYhGHzOZU9hhLX8Yc=BjLph9HG6zuk_vE5A@mail.gmail.com' \
--to=pasha.tatashin@soleen.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pratyush@kernel.org \
--cc=rppt@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