Skip to content

[1.3] rootfs: only set mode= for tmpfs mount if target already existed#4975

Merged
lifubang merged 1 commit into
opencontainers:release-1.3from
cyphar:1.3-tmpfs-mode
Nov 11, 2025
Merged

[1.3] rootfs: only set mode= for tmpfs mount if target already existed#4975
lifubang merged 1 commit into
opencontainers:release-1.3from
cyphar:1.3-tmpfs-mode

Conversation

@cyphar
Copy link
Copy Markdown
Member

@cyphar cyphar commented Nov 7, 2025

Backport of #4973. (Draft until merged.)


This was always the intended behaviour but commit 72fbb34 ("rootfs:
switch to fd-based handling of mountpoint targets") regressed it when
adding a mechanism to create a file handle to the target if it didn't
already exist (causing the later stat to always succeed).

A lot of people depend on this functionality, so add some tests to make
sure we don't break it in the future.

Fixes #4971
Fixes: 72fbb34 ("rootfs: switch to fd-based handling of mountpoint targets")
Signed-off-by: Aleksa Sarai cyphar@cyphar.com

@cyphar cyphar added the backport/1.3-pr A backport PR to release-1.3 label Nov 7, 2025
@cyphar cyphar changed the title rootfs: only set mode= for tmpfs mount if target already existed [1.3] rootfs: only set mode= for tmpfs mount if target already existed Nov 7, 2025
@lifubang lifubang added this to the 1.3.4 milestone Nov 8, 2025
This was always the intended behaviour but commit 72fbb34 ("rootfs:
switch to fd-based handling of mountpoint targets") regressed it when
adding a mechanism to create a file handle to the target if it didn't
already exist (causing the later stat to always succeed).

A lot of people depend on this functionality, so add some tests to make
sure we don't break it in the future.

Fixes: 72fbb34 ("rootfs: switch to fd-based handling of mountpoint targets")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
(cherry picked from commit 9a9719e)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
@cyphar cyphar marked this pull request as ready for review November 10, 2025 16:12
@lifubang lifubang merged commit c8787a6 into opencontainers:release-1.3 Nov 11, 2025
36 checks passed
@cyphar cyphar deleted the 1.3-tmpfs-mode branch November 11, 2025 03:50
@lifubang lifubang mentioned this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.3-pr A backport PR to release-1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants