File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -506,6 +506,13 @@ int iommu_get_group_resv_regions(struct iommu_group *group,
506
506
list_for_each_entry (device , & group -> devices , list ) {
507
507
struct list_head dev_resv_regions ;
508
508
509
+ /*
510
+ * Non-API groups still expose reserved_regions in sysfs,
511
+ * so filter out calls that get here that way.
512
+ */
513
+ if (!device -> dev -> iommu )
514
+ break ;
515
+
509
516
INIT_LIST_HEAD (& dev_resv_regions );
510
517
iommu_get_resv_regions (device -> dev , & dev_resv_regions );
511
518
ret = iommu_insert_device_resv_regions (& dev_resv_regions , head );
@@ -3019,7 +3026,7 @@ static ssize_t iommu_group_store_type(struct iommu_group *group,
3019
3026
if (!capable (CAP_SYS_ADMIN ) || !capable (CAP_SYS_RAWIO ))
3020
3027
return - EACCES ;
3021
3028
3022
- if (WARN_ON (!group ))
3029
+ if (WARN_ON (!group ) || ! group -> default_domain )
3023
3030
return - EINVAL ;
3024
3031
3025
3032
if (sysfs_streq (buf , "identity" ))
You can’t perform that action at this time.
0 commit comments