Merge 5.15.52 into android14-5.15
Changes in 5.15.52 tick/nohz: unexport __init-annotated tick_nohz_full_setup() x86, kvm: use proper ASM macros for kvm_vcpu_is_preempted bcache: memset on stack variables in bch_btree_check() and bch_sectors_dirty_init() xfs: use kmem_cache_free() for kmem_cache objects xfs: punch out data fork delalloc blocks on COW writeback failure xfs: Fix the free logic of state in xfs_attr_node_hasname xfs: remove all COW fork extents when remounting readonly xfs: check sb_meta_uuid for dabuf buffer recovery xfs: prevent UAF in xfs_log_item_in_current_chkpt xfs: only bother with sync_filesystem during readonly remount powerpc/ftrace: Remove ftrace init tramp once kernel init is complete fs: add is_idmapped_mnt() helper fs: move mapping helpers fs: tweak fsuidgid_has_mapping() fs: account for filesystem mappings docs: update mapping documentation fs: use low-level mapping helpers fs: remove unused low-level mapping helpers fs: port higher-level mapping helpers fs: add i_user_ns() helper fs: support mapped mounts of mapped filesystems fs: fix acl translation fs: account for group membership rtw88: 8821c: support RFE type4 wifi NIC rtw88: rtw8821c: enable rfe 6 devices net: mscc: ocelot: allow unregistered IP multicast flooding to CPU io_uring: fix not locked access to fixed buf table Linux 5.15.52 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Icfb690703efd8cab1dffa7ca6cce28bbca635c3d
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include <linux/ima.h>
|
||||
#include <linux/dnotify.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/mnt_idmapping.h>
|
||||
|
||||
#include "internal.h"
|
||||
#include <trace/hooks/syscall_check.h>
|
||||
@@ -641,7 +642,7 @@ SYSCALL_DEFINE2(chmod, const char __user *, filename, umode_t, mode)
|
||||
|
||||
int chown_common(const struct path *path, uid_t user, gid_t group)
|
||||
{
|
||||
struct user_namespace *mnt_userns;
|
||||
struct user_namespace *mnt_userns, *fs_userns;
|
||||
struct inode *inode = path->dentry->d_inode;
|
||||
struct inode *delegated_inode = NULL;
|
||||
int error;
|
||||
@@ -653,8 +654,9 @@ int chown_common(const struct path *path, uid_t user, gid_t group)
|
||||
gid = make_kgid(current_user_ns(), group);
|
||||
|
||||
mnt_userns = mnt_user_ns(path->mnt);
|
||||
uid = kuid_from_mnt(mnt_userns, uid);
|
||||
gid = kgid_from_mnt(mnt_userns, gid);
|
||||
fs_userns = i_user_ns(inode);
|
||||
uid = mapped_kuid_user(mnt_userns, fs_userns, uid);
|
||||
gid = mapped_kgid_user(mnt_userns, fs_userns, gid);
|
||||
|
||||
retry_deleg:
|
||||
newattrs.ia_valid = ATTR_CTIME;
|
||||
|
||||
Reference in New Issue
Block a user