Re: [PATCH v2] drm/radeon: Fix NULL dereference when updating memory stats

2021-06-23 Thread Mikel Rychliski
On Wednesday, June 23, 2021 2:55:04 AM EDT Christian König wrote: > Please rather keep the new resource as parameter here and update before > adjusting bo->resource. > > This way you also don't need to export radeon_update_memory_usage(). I wasn't sure exactly what you intended with the request t

Re: [PATCH v2] drm/radeon: Fix NULL dereference when updating memory stats

2021-06-22 Thread Christian König
Am 22.06.21 um 23:26 schrieb Mikel Rychliski: radeon_ttm_bo_destroy() is attempting to access the resource object to update memory counters. However, the resource object is already freed when ttm calls this function via the destroy callback. This causes an oops when a bo is freed: BUG: k

[PATCH v2] drm/radeon: Fix NULL dereference when updating memory stats

2021-06-22 Thread Mikel Rychliski
radeon_ttm_bo_destroy() is attempting to access the resource object to update memory counters. However, the resource object is already freed when ttm calls this function via the destroy callback. This causes an oops when a bo is freed: BUG: kernel NULL pointer dereference, address: 000