[PATCH] drm/xe: Add fault injection for xe_oa_alloc_regs

Francois Dugast francois.dugast at intel.com
Thu Feb 27 10:56:10 UTC 2025


On Thu, Feb 27, 2025 at 03:53:39PM +0530, nakshtra.goyal at intel.com wrote:
> From: Nakshtra Goyal <nakshtra.goyal at intel.com>
> 
> Add fault injection for xe_oa_alloc_regs to allow it to fail while
> executing xe_oa_add_config_ioctl().
> This need to be added as it cannot be reached by injecting error through
> IOCTL arguments.
> 
> Signed-off-by: Nakshtra Goyal <nakshtra.goyal at intel.com>

Reviewed-by: Francois Dugast <francois.dugast at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_oa.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
> index d89e6cabf5a5..b8704360f998 100644
> --- a/drivers/gpu/drm/xe/xe_oa.c
> +++ b/drivers/gpu/drm/xe/xe_oa.c
> @@ -2231,6 +2231,7 @@ xe_oa_alloc_regs(struct xe_oa *oa, bool (*is_valid)(struct xe_oa *oa, u32 addr),
>  	kfree(oa_regs);
>  	return ERR_PTR(err);
>  }
> +ALLOW_ERROR_INJECTION(xe_oa_alloc_regs, ERRNO);
>  
>  static ssize_t show_dynamic_id(struct kobject *kobj,
>  			       struct kobj_attribute *attr,
> -- 
> 2.34.1
> 


More information about the Intel-xe mailing list