mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 05:30:52 +07:00
iommu: Fix a check in iommu_check_bind_data()
The "data->flags" variable is a u64 so if one of the high 32 bits is
set the original code will allow it, but it should be rejected. The
fix is to declare "mask" as a u64 instead of a u32.
Fixes: d90573812e
("iommu/uapi: Handle data and argsz filled by users")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201103101623.GA1127762@mwanda
Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
71cd8e2d16
commit
4dd6ce4780
@ -2071,7 +2071,7 @@ EXPORT_SYMBOL_GPL(iommu_uapi_cache_invalidate);
|
||||
|
||||
static int iommu_check_bind_data(struct iommu_gpasid_bind_data *data)
|
||||
{
|
||||
u32 mask;
|
||||
u64 mask;
|
||||
int i;
|
||||
|
||||
if (data->version != IOMMU_GPASID_BIND_VERSION_1)
|
||||
|
Loading…
Reference in New Issue
Block a user