On 6/7/21 6:40 PM, Thomas Hellström (Intel) wrote:

On 6/2/21 12:09 PM, Christian König wrote:
...
@@ -728,14 +728,15 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
   */
  static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,
                    const struct ttm_place *place,
-                  struct ttm_resource *mem,
+                  struct ttm_resource **mem,
                    struct ttm_operation_ctx *ctx)
  {
      struct ttm_device *bdev = bo->bdev;
-    struct ttm_resource_manager *man = ttm_manager_type(bdev, mem->mem_type);
+    struct ttm_resource_manager *man;
      struct ww_acquire_ctx *ticket;
      int ret;
  +    man = ttm_manager_type(bdev, (*mem)->mem_type);

Isn't (*mem) uninitialized here? Should be place->mem_type? Eviction is immediately sent to the bushes.

Got at least one additional NULL pointer deref to track down in the eviction code, but could be a merge error of mine as well.

Actually this last one was probably due to a bad temporary fix of the above one.

/Thomas



Reply via email to