Matthew Auld
1604cb2aa7
drm/i915: check i915_vm_alloc_pt_stash for errors
If we are really unlucky and encounter an error during
i915_vm_alloc_pt_stash, we end up passing an empty pt/pd stash all the
way down into the low-level ppgtt alloc code, leading to explosions,
since it expects at least the required number of pt/pd for the va range.
[ 211.981418] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 211.981421] #PF: supervisor read access in kernel mode
[ 211.981422] #PF: error_code(0x0000) - not-present page
[ 211.981424] PGD 80000008439cb067 P4D 80000008439cb067 PUD 84a37f067 PMD 0
[ 211.981427] Oops: 0000 [#1] SMP PTI
[ 211.981428] CPU: 1 PID: 1301 Comm: i915_selftest Tainted: G U I 5.9.0-rc5+ #3
[ 211.981430] Hardware name: /NUC6i7KYB, BIOS KYSKLi70.86A.0050.2017.0831.1924 08/31/2017
[ 211.981521] RIP: 0010:__gen8_ppgtt_alloc+0x1ed/0x3c0 [i915]
[ 211.981523] Code: c1 48 c7 c7 5d 5d fe c0 65 ff 0d ee 1d 03 3f e8 d9 91 1f e2 8b 55 c4 31 c0 48 8b 75 b8 85 d2 0f 95 c0 48 8b 1c c6 48 89 45 98 <48> 8b 03 48 8b 90 58 02 00 00 48 85 d2 0f 84 07 ea 15 00 48 81 fa
[ 211.981526] RSP: 0018:ffffba2cc0eb3970 EFLAGS: 00010202
[ 211.981527] RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000004
[ 211.981529] RDX: 0000000000000002 RSI: ffff9be998bdb8c0 RDI: ffff9be99c844300
[ 211.981530] RBP: ffffba2cc0eb39d8 R08: 0000000000000640 R09: ffff9be97cdfd000
[ 211.981531] R10: ffff9be97cdfd614 R11: 0000000000000000 R12: 0000000000000000
[ 211.981532] R13: ffff9be98607ba20 R14: ffff9be995a0b400 R15: ffffba2cc0eb39e8
[ 211.981534] FS: 00007f0f10b31000(0000) GS:ffff9be99fc40000(0000) knlGS:0000000000000000
[ 211.981536] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 211.981538] CR2: 0000000000000000 CR3: 000000084d74e006 CR4: 00000000003706e0
[ 211.981539] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 211.981541] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 211.981542] Call Trace:
[ 211.981609] gen8_ppgtt_alloc+0x79/0x90 [i915]
[ 211.981678] ppgtt_bind_vma+0x36/0x80 [i915]
[ 211.981756] __vma_bind+0x39/0x40 [i915]
[ 211.981818] fence_work+0x21/0x98 [i915]
[ 211.981879] fence_notify+0x8d/0x128 [i915]
[ 211.981939] __i915_sw_fence_complete+0x62/0x240 [i915]
[ 211.982018] i915_vma_pin_ww+0x1ee/0x9c0 [i915]
Fixes: cd0452aa2a ("drm/i915: Preallocate stashes for vma page-directories")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200921160844.73186-1-matthew.auld@intel.com
2020-09-22 09:00:02 +01:00
..
2020-08-06 14:56:11 -07:00
2020-08-15 08:18:22 -07:00
2020-07-29 17:05:44 +02:00
2020-08-05 20:13:21 -07:00
2020-08-06 18:09:34 -07:00
2020-08-07 13:13:09 -07:00
2020-08-02 18:26:51 +03:00
2020-08-15 20:36:42 -07:00
2020-07-31 15:11:52 -07:00
2020-08-06 10:54:07 -07:00
2020-08-11 11:58:31 +10:00
2020-08-15 08:18:22 -07:00
2020-08-20 10:58:13 -07:00
2020-08-11 17:29:45 +02:00
2020-08-07 10:33:50 -07:00
2020-08-11 14:34:17 -07:00
2020-08-11 10:59:19 -07:00
2020-07-30 17:22:58 +09:00
2020-08-07 21:14:30 -07:00
2020-08-10 19:07:44 -07:00
2020-08-18 15:40:30 +02:00
2020-08-20 11:18:58 +02:00
2020-07-27 11:49:37 +02:00
2020-08-05 12:56:27 -07:00
2020-09-22 09:00:02 +01:00
2020-07-29 16:58:08 +02:00
2020-08-10 16:33:54 -07:00
2020-08-14 13:31:25 -07:00
2020-08-14 16:00:09 -07:00
2020-08-15 08:18:22 -07:00
2020-08-04 13:49:43 -07:00
2020-08-20 08:35:19 -03:00
2020-08-15 18:50:32 -07:00
2020-08-05 11:43:47 -07:00
2020-08-14 16:27:00 +02:00
2020-08-04 18:11:58 -07:00
2020-07-24 16:36:13 -07:00
2020-08-05 19:24:27 -07:00
2020-08-07 10:33:50 -07:00
2020-08-14 19:56:57 -07:00
2020-08-15 20:36:42 -07:00
2020-08-11 14:13:24 -07:00
2020-08-11 14:13:24 -07:00
2020-08-05 13:23:24 -07:00
2020-08-15 08:09:38 -07:00
2020-08-07 21:14:30 -07:00
2020-08-06 11:55:43 -07:00
2020-07-31 14:38:12 +02:00
2020-08-10 18:20:04 -07:00
2020-08-23 10:52:33 -07:00
2020-08-14 19:56:57 -07:00
2020-08-14 19:56:56 -07:00
2020-08-05 11:12:34 -07:00
2020-07-29 17:12:09 +02:00
2020-08-19 16:30:57 -06:00
2020-08-20 11:30:22 +05:30
2020-08-12 12:41:15 -07:00
2020-08-22 10:12:49 -07:00
2020-08-07 13:35:51 -07:00
2020-08-09 12:52:28 -07:00
2020-08-12 12:13:44 -07:00
2020-08-07 21:27:37 -07:00
2020-08-06 11:55:43 -07:00
2020-08-19 16:23:22 -07:00
2020-08-14 16:00:09 -07:00
2020-08-12 10:58:01 -07:00
2020-07-30 23:27:08 +01:00
2020-08-11 11:17:45 -07:00
2020-07-27 14:24:51 +02:00
2020-08-12 17:17:00 -07:00
2020-08-22 10:12:49 -07:00
2020-08-17 22:43:55 -04:00
2020-08-14 19:56:57 -07:00
2020-08-07 21:14:30 -07:00
2020-08-18 14:27:12 -07:00
2020-08-05 20:13:21 -07:00
2020-08-07 18:48:15 -07:00
2020-08-14 16:01:59 -07:00
2020-08-15 08:09:38 -07:00
2020-08-09 11:06:10 -07:00
2020-08-06 14:56:11 -07:00
2020-08-07 13:00:53 -07:00
2020-08-11 14:34:17 -07:00
2020-08-17 11:09:13 -06:00
2020-08-11 14:34:17 -07:00
2020-08-28 12:38:06 +10:00
2020-08-19 06:43:28 +02:00
2020-08-12 12:13:44 -07:00
2020-08-14 13:34:37 -07:00