mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-22 20:30:58 +02:00
xfs: also reject BULKSTAT_SINGLE in a mount user namespace
BULKSTAT_SINGLE exposed the ondisk uids/gids just like bulkstat, and can
be called on any inode, including ones not visible in the current mount.
Fixes: f736d93d76
("xfs: support idmapped mounts")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
committed by
Darrick J. Wong
parent
08a204387e
commit
8723d5ba8b
@@ -168,6 +168,12 @@ xfs_bulkstat_one(
|
|||||||
};
|
};
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
if (breq->mnt_userns != &init_user_ns) {
|
||||||
|
xfs_warn_ratelimited(breq->mp,
|
||||||
|
"bulkstat not supported inside of idmapped mounts.");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(breq->icount == 1);
|
ASSERT(breq->icount == 1);
|
||||||
|
|
||||||
bc.buf = kmem_zalloc(sizeof(struct xfs_bulkstat),
|
bc.buf = kmem_zalloc(sizeof(struct xfs_bulkstat),
|
||||||
|
Reference in New Issue
Block a user