From: Taylor Jackson via B4 Relay <devnull+tjackson9431.gmail.com@kernel.org>
To: fstests@vger.kernel.org
Cc: Christian Brauner <brauner@kernel.org>,
Seth Forshee <sforshee@kernel.org>,
Taylor Jackson <tjackson9431@gmail.com>,
kernel test robot <oliver.sang@intel.com>
Subject: [PATCH 1/2] vfs/idmapped_mounts.c: Incorrect array index for nested user ns
Date: Tue, 26 Mar 2024 20:33:51 +0000 [thread overview]
Message-ID: <20240326-mount-setattr-test-v1-1-c061b040d0f7@gmail.com> (raw)
In-Reply-To: <20240326-mount-setattr-test-v1-0-c061b040d0f7@gmail.com>
From: Taylor Jackson <tjackson9431@gmail.com>
Within the vfs test for idmapped mounts, the function nested_userns()
is using an incorrect array index when attempting to set up the mapping
for the 4th nested user ns within hierarchy[4]. The correct index that
belongs to the 4th nested user ns is actually hierarchy[3].
And hierarchy[4] is reserved for the dummy entry that marks the end
of the array.
Signed-off-by: Taylor Jackson <tjackson9431@gmail.com>
---
src/vfs/idmapped-mounts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vfs/idmapped-mounts.c b/src/vfs/idmapped-mounts.c
index 547182fe..34052ca3 100644
--- a/src/vfs/idmapped-mounts.c
+++ b/src/vfs/idmapped-mounts.c
@@ -6556,7 +6556,7 @@ static int nested_userns(const struct vfstest_info *info)
}
/* Don't write a mapping in the 4th userns. */
- list_empty(&hierarchy[4].id_map);
+ list_empty(&hierarchy[3].id_map);
/* Create the actual userns hierarchy. */
ret = create_userns_hierarchy(hierarchy);
--
2.34.1
next prev parent reply other threads:[~2024-03-26 20:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 20:33 [PATCH 0/2] Patches to update xfs test "generic/645" for mount_setattr Taylor Jackson via B4 Relay
2024-03-26 20:33 ` Taylor Jackson via B4 Relay [this message]
2024-03-27 10:31 ` [PATCH 1/2] vfs/idmapped_mounts.c: Incorrect array index for nested user ns Christian Brauner
2024-03-26 20:33 ` [PATCH 2/2] vfs/idmapped_mounts.c: Change mount_setattr expected output Taylor Jackson via B4 Relay
2024-03-27 13:27 ` Zorro Lang
2024-04-08 6:18 ` Zorro Lang
[not found] <202402191416.17ec9160-oliver.sang@intel.com>
[not found] ` <20240220-fungieren-nutzen-311ef3e57e8a@brauner>
2024-03-25 16:58 ` [linux-next:master] [fs/mnt_idmapping.c] b4291c7fd9: xfstests.generic.645.fail Darrick J. Wong
2024-03-26 11:43 ` Christian Brauner
2024-03-26 15:22 ` Darrick J. Wong
2024-03-27 10:33 ` [PATCH 2/2] vfs/idmapped_mounts.c: Change mount_setattr expected output Christian Brauner
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=20240326-mount-setattr-test-v1-1-c061b040d0f7@gmail.com \
--to=devnull+tjackson9431.gmail.com@kernel.org \
--cc=brauner@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=oliver.sang@intel.com \
--cc=sforshee@kernel.org \
--cc=tjackson9431@gmail.com \
/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