aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/modules.py
diff options
context:
space:
mode:
authorThomas Hellström <[email protected]>2023-03-07 15:46:15 +0100
committerThomas Hellström <[email protected]>2023-03-07 18:26:38 +0100
commit9a9a8fe26751334b7739193a94eba741073b8a55 (patch)
treea11152e5e156ba71a50c9614f6311260267f2d09 /scripts/gdb/linux/modules.py
parentc22f2ff8724b49dce2ae797e9fbf4bc0fa91112f (diff)
drm/ttm: Fix a NULL pointer dereference
The LRU mechanism may look up a resource in the process of being removed from an object. The locking rules here are a bit unclear but it looks currently like res->bo assignment is protected by the LRU lock, whereas bo->resource is protected by the object lock, while *clearing* of bo->resource is also protected by the LRU lock. This means that if we check that bo->resource points to the LRU resource under the LRU lock we should be safe. So perform that check before deciding to swap out a bo. That avoids dereferencing a NULL bo->resource in ttm_bo_swapout(). Fixes: 6a9b02899402 ("drm/ttm: move the LRU into resource handling v4") Cc: Christian König <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Christian Koenig <[email protected]> Cc: Huang Rui <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Felix Kuehling <[email protected]> Cc: Philip Yang <[email protected]> Cc: Qiang Yu <[email protected]> Cc: Matthew Auld <[email protected]> Cc: Nirmoy Das <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Cc: "Thomas Hellström" <[email protected]> Cc: Anshuman Gupta <[email protected]> Cc: Arunpravin Paneer Selvam <[email protected]> Cc: [email protected] Cc: <[email protected]> # v5.19+ Signed-off-by: Thomas Hellström <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions