Skip to content

Commit

Permalink
drm/xe: Add fault injection for xe_oa_alloc_regs
Browse files Browse the repository at this point in the history
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@intel.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://lore.kernel.org/r/20250227102339.2859726-1-nakshtra.goyal@intel.com
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
  • Loading branch information
Nakshtra Goyal authored and Himal Prasad Ghimiray committed Mar 26, 2025
1 parent bf6cb06 commit 6fe653f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/xe/xe_oa.c
Original file line number Diff line number Diff line change
Expand Up @@ -2221,6 +2221,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,
Expand Down

0 comments on commit 6fe653f

Please sign in to comment.