History

drm/ttm: fix missing NULL check in ttm_device_swapout

Resources about to be destructed are not tied to BOs any more.

Christian König committed 4 years ago

Commit 81b0d0e1 parent 4527d471 file · +5 −1Browse files

Unified · Split

drivers/gpu/drm/ttm/ttm_device.c+5−1
@@ -156,8 +156,12 @@ int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx, · 155 unmodified lines
156156
157157 ttm_resource_manager_for_each_res(man, &cursor, res) {
158158 struct ttm_buffer_object *bo = res->bo;
159− uint32_t num_pages = PFN_UP(bo->base.size);
159+ uint32_t num_pages;
160160
161+ if (!bo)
162+ continue;
163+
164+ num_pages = PFN_UP(bo->base.size);
161165 ret = ttm_bo_swapout(bo, ctx, gfp_flags);
162166 /* ttm_bo_swapout has dropped the lru_lock */
163167 if (!ret)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t