]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: Do not dereference ggtt_node in xe_bo.c
authorMaarten Lankhorst <dev@lankhorst.se>
Thu, 8 Jan 2026 10:10:20 +0000 (11:10 +0100)
committerMaarten Lankhorst <dev@lankhorst.se>
Mon, 12 Jan 2026 15:28:47 +0000 (16:28 +0100)
commit9086170bfb925c90e298134791a9851ed626b873
treead0600ba947042511f72b97c234c02b968f0adb3
parenta7ae0836917ca617434c416f9c61dc6024d04949
drm/xe: Do not dereference ggtt_node in xe_bo.c

A careful inspection of __xe_ggtt_insert_bo_at() shows that
the ggtt_node can always be seen as inserted from xe_bo.c
due to the way error handling is performed.

The checks are also a little bit too paranoid, since we
never create a bo with ggtt_node[id] initialised but not
inserted into the GGTT, which can be seen by looking at
__xe_ggtt_insert_bo_at()

Additionally, the size of the GGTT is never bigger than 4 GB,
so adding a check at that level is incorrect.

Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260108101014.579906-14-dev@lankhorst.se
drivers/gpu/drm/xe/xe_bo.c