From: Nakshtra Goyal Date: Thu, 27 Feb 2025 10:23:39 +0000 (+0530) Subject: drm/xe: Add fault injection for xe_oa_alloc_regs X-Git-Tag: v6.16-rc1~144^2~18^2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fe653f82402fafecb913375e74f386f52c10938;p=thirdparty%2Fkernel%2Fstable.git drm/xe: Add fault injection for xe_oa_alloc_regs 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 Reviewed-by: Francois Dugast Reviewed-by: Himal Prasad Ghimiray Link: https://lore.kernel.org/r/20250227102339.2859726-1-nakshtra.goyal@intel.com Signed-off-by: Himal Prasad Ghimiray --- diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c index 6f185632da14b..75655b1f17f92 100644 --- a/drivers/gpu/drm/xe/xe_oa.c +++ b/drivers/gpu/drm/xe/xe_oa.c @@ -2221,6 +2221,7 @@ addr_err: 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,