domctl: move early special casing of XEN_DOMCTL_shadow_op

This wants xsm_domctl() invoked, but the domctl lock not taken. Move the
handling to the respective switch(), thus eliminating the need for a
separate xsm_domctl() invocation.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
This commit is contained in:
Jan Beulich committed 2026-06-18 10:01:30 +02:00
1 parent 0fbf40089a
commit 77e03ac856
1 file changed
+10 -11
+10 -11
View File
@@ -512,17 +512,6 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
/* Other sub-ops handled further down. */
break;
case XEN_DOMCTL_shadow_op:
if ( op->u.shadow_op.op == XEN_DOMCTL_SHADOW_OP_CLEAN ||
op->u.shadow_op.op == XEN_DOMCTL_SHADOW_OP_PEEK )
{
ret = xsm_domctl(XSM_PRIV, d, op);
if ( !ret )
ret = arch_do_domctl(op, d, u_domctl);
goto domctl_out_unlock_rcuonly;
}
break;
case XEN_DOMCTL_get_device_group:
ret = iommu_do_domctl(op, d, u_domctl);
goto domctl_out_unlock_rcuonly;
@@ -568,6 +557,16 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
goto domctl_out_unlock_rcuonly;
}
case XEN_DOMCTL_shadow_op:
if ( op->u.shadow_op.op == XEN_DOMCTL_SHADOW_OP_CLEAN ||
op->u.shadow_op.op == XEN_DOMCTL_SHADOW_OP_PEEK )
{
ret = arch_do_domctl(op, d, u_domctl);
goto domctl_out_unlock_rcuonly;
}
/* Other sub-ops handled by arch_do_domctl() further down. */
break;
default:
/* Everything else handled further up or further down. */
break;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.