summaryrefslogtreecommitdiff
path: root/include/uapi/linux/android
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2026-11-25 12:01:50 -0500
committerTheodore Ts'o <tytso@mit.edu>2026-11-25 13:44:32 -0500
commit43d2e9d3f4ba3eaaec7356a7537164865266dff5 (patch)
tree58f678a8a5d30e913f77f5fb63dd1735f7e3c235 /include/uapi/linux/android
parent7a9e767b1db628dd667bb96003c264e068ea669b (diff)
ext4: set s_user_ns in the KUnit tests' fake superblocks
xattr_test_init() builds a fake super_block but never sets s_user_ns. ext4_xattr_inode_create() calls i_uid_read() and i_gid_read() on the parent inode, which map the ids through inode->i_sb->s_user_ns. With CONFIG_USER_NS=y this dereferences a NULL user namespace. Fix this by pointing s_user_ns at init_user_ns, as alloc_super() does for a normal mount. The dir, hash, inline and namei tests build their fake superblocks the same way. None of them reads an inode owner today, but do the same there so that new test cases don't run into this. Fixes: 5df08dcafa99 ("ext4: add KUnit tests for fs/ext4/xattr.c") Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/uapi/linux/android')
0 files changed, 0 insertions, 0 deletions