Re: [PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

/Thomas





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux