]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe: fixup xe_alloc_pf_queue
authorMatthew Auld <matthew.auld@intel.com>
Wed, 21 Aug 2024 17:19:18 +0000 (18:19 +0100)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 22 Aug 2024 02:38:24 +0000 (19:38 -0700)
commit321d6b4b9cbe3dd0bc99937d5e5b4d730b5b5798
treecf87d5ea26fae54917d2301f95fa9e20f2d76c62
parent40520283e0fd11237ed9dfc0991503b3403d5fa4
drm/xe: fixup xe_alloc_pf_queue

kzalloc expects number of bytes, therefore we should convert the number
of dw into bytes, otherwise we are likely just accessing beyond the
array causing all kinds of carnage. Also fixup the error handling while
we are here.

v2:
 - Prefer kcalloc (dim)

Fixes: 3338e4f90c14 ("drm/xe: Use topology to determine page fault queue size")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Stuart Summers <stuart.summers@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240821171917.417386-2-matthew.auld@intel.com
drivers/gpu/drm/xe/xe_gt_pagefault.c