Maarten Lankhorst
0953e76e91
drm/ttm: fix delayed ttm_bo_cleanup_refs_and_unlock delayed handling
Fix regression introduced by 85b144f860
"drm/ttm: call ttm_bo_cleanup_refs with reservation and lru lock held, v3"
Slowpath ttm_bo_cleanup_refs_and_unlock accidentally tried to increase
refcount on &bo->sync_obj instead of bo->sync_obj.
The compiler didn't complain since sync_obj_ref takes a void pointer,
so it was still valid c.
This could result in lockups, memory corruptions, and warnings like
these when graphics card VRAM usage is high:
------------[ cut here ]------------
WARNING: at include/linux/kref.h:42 radeon_fence_ref+0x2c/0x40()
Hardware name: System Product Name
Pid: 157, comm: X Not tainted 3.7.0-rc7-00520-g85b144f-dirty #174
Call Trace:
[<ffffffff81058c84>] ? warn_slowpath_common+0x74/0xb0
[<ffffffff8129273c>] ? radeon_fence_ref+0x2c/0x40
[<ffffffff8125e95c>] ? ttm_bo_cleanup_refs_and_unlock+0x18c/0x2d0
[<ffffffff8125f17c>] ? ttm_mem_evict_first+0x1dc/0x2a0
[<ffffffff81264452>] ? ttm_bo_man_get_node+0x62/0xb0
[<ffffffff8125f4ce>] ? ttm_bo_mem_space+0x28e/0x340
[<ffffffff8125fb0c>] ? ttm_bo_move_buffer+0xfc/0x170
[<ffffffff810de172>] ? kmem_cache_alloc+0xb2/0xc0
[<ffffffff8125fc15>] ? ttm_bo_validate+0x95/0x110
[<ffffffff8125ff7c>] ? ttm_bo_init+0x2ec/0x3b0
[<ffffffff8129419a>] ? radeon_bo_create+0x18a/0x200
[<ffffffff81293e80>] ? radeon_bo_clear_va+0x40/0x40
[<ffffffff812a5342>] ? radeon_gem_object_create+0x92/0x160
[<ffffffff812a575c>] ? radeon_gem_create_ioctl+0x6c/0x150
[<ffffffff812a529f>] ? radeon_gem_object_free+0x2f/0x40
[<ffffffff81246b60>] ? drm_ioctl+0x420/0x4f0
[<ffffffff812a56f0>] ? radeon_gem_pwrite_ioctl+0x20/0x20
[<ffffffff810f53a4>] ? do_vfs_ioctl+0x2e4/0x4e0
[<ffffffff810e5588>] ? vfs_read+0x118/0x160
[<ffffffff810f55ec>] ? sys_ioctl+0x4c/0xa0
[<ffffffff810e5851>] ? sys_read+0x51/0xa0
[<ffffffff814b0612>] ? system_call_fastpath+0x16/0x1b
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-20 07:46:20 +10:00
..
2012-11-03 09:52:54 +08:00
2012-11-22 09:14:54 -10:00
2012-10-06 03:04:40 +09:00
2012-11-23 20:55:06 +01:00
2012-10-15 14:45:51 -04:00
2012-11-23 14:32:55 +01:00
2012-11-09 16:45:37 +01:00
2012-11-07 09:35:53 -08:00
2012-11-20 09:22:35 +10:00
2012-11-12 10:20:23 -08:00
2012-10-02 18:32:35 -07:00
2012-10-02 13:38:27 -07:00
2012-10-31 21:02:57 +01:00
2012-10-08 22:52:54 -04:00
2012-10-07 20:55:16 +09:00
2012-10-26 14:59:01 -07:00
2012-10-30 10:05:51 +01:00
2012-10-23 16:32:18 +09:00
2012-11-13 22:45:42 -08:00
2012-10-19 14:07:47 -07:00
2012-11-17 22:22:24 +01:00
2012-12-20 07:46:20 +10:00
2012-11-16 07:58:20 -08:00
2012-10-24 15:46:27 -07:00
2012-11-05 21:54:40 +01:00
2012-11-23 11:59:26 -10:00
2012-10-06 03:04:41 +09:00
2012-09-26 22:28:21 -04:00
2012-10-19 19:44:06 +01:00
2012-10-23 09:03:49 -07:00
2012-11-22 21:45:34 -10:00
2012-11-17 13:27:15 +01:00
2012-11-06 07:37:10 -08:00
2012-11-07 18:59:26 -05:00
2012-11-11 12:09:43 -08:00
2012-10-07 21:04:56 +09:00
2012-10-06 03:16:12 +09:00
2012-11-23 12:11:13 -10:00
2012-10-17 16:45:56 -03:00
2012-09-26 14:04:09 -07:00
2012-10-07 17:29:24 +09:00
2012-10-10 20:15:24 +09:00
2012-11-07 15:40:52 -05:00
2012-11-21 10:38:13 +00:00
2012-11-23 14:17:36 -05:00
2012-11-20 00:09:26 +01:00
2012-10-17 15:53:03 -05:00
2012-10-09 16:22:18 +09:00
2012-10-09 16:11:46 +09:00
2012-11-05 16:59:59 -07:00
2012-10-19 15:40:18 -07:00
2012-11-15 11:58:24 +01:00
2012-10-09 01:47:35 -04:00
2012-10-13 11:27:59 +09:00
2012-10-06 03:04:56 +09:00
2012-10-10 20:15:24 +09:00
2012-11-16 14:33:04 -08:00
2012-11-15 11:16:02 +09:00
2012-10-07 21:04:56 +09:00
2012-10-07 21:04:56 +09:00
2012-10-25 14:37:53 -07:00
2012-11-16 14:10:15 -08:00
2012-11-13 22:45:42 -08:00
2012-10-15 14:08:48 +09:00
2012-10-28 11:13:54 -07:00
2012-11-13 13:04:43 -08:00
2012-11-01 00:38:45 -07:00
2012-11-03 09:52:55 +08:00
2012-11-14 14:49:42 -08:00
2012-10-09 16:22:19 +09:00
2012-11-22 09:14:54 -10:00
2012-10-10 09:10:32 -06:00
2012-10-24 23:19:30 -04:00
2012-11-23 12:01:02 -10:00
2012-11-09 14:54:24 +10:30
2012-10-01 12:09:59 -07:00
2012-10-07 21:06:10 +09:00
2012-11-20 18:52:01 -10:00
2012-10-01 18:46:13 -07:00
2012-10-16 18:07:12 -07:00