diff options
| author | Shuicheng Lin <shuicheng.lin@intel.com> | 2025-12-06 02:47:18 +0300 |
|---|---|---|
| committer | Matthew Brost <matthew.brost@intel.com> | 2025-12-16 00:33:58 +0300 |
| commit | e057b2d2b8d815df3858a87dffafa2af37e5945b (patch) | |
| tree | c02d18d0f26b92ca33b9ef039e936d75789d23fd /include/linux/netdev_features.h | |
| parent | b07bac9bd708ec468cd1b8a5fe70ae2ac9b0a11c (diff) | |
| download | linux-e057b2d2b8d815df3858a87dffafa2af37e5945b.tar.xz | |
drm/xe/oa: Limit num_syncs to prevent oversized allocations
The OA open parameters did not validate num_syncs, allowing
userspace to pass arbitrarily large values, potentially
leading to excessive allocations.
Add check to ensure that num_syncs does not exceed DRM_XE_MAX_SYNCS,
returning -EINVAL when the limit is violated.
v2: use XE_IOCTL_DBG() and drop duplicated check. (Ashutosh)
Fixes: c8507a25cebd ("drm/xe/oa/uapi: Define and parse OA sync properties")
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20251205234715.2476561-6-shuicheng.lin@intel.com
Diffstat (limited to 'include/linux/netdev_features.h')
0 files changed, 0 insertions, 0 deletions
