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-28 12:38:06 +10:00
2020-06-10 09:02:03 +02:00
2020-08-18 15:26:32 +02:00
2020-06-24 15:45:51 +10:00
2020-07-24 08:48:05 +10:00
2020-08-19 09:14:40 +02:00
2020-07-02 20:25:51 +02:00
2020-08-11 11:58:31 +10:00
2020-08-26 19:13:37 +02:00
2020-07-23 15:28:10 +10:00
2020-08-18 14:14:25 +02:00
2020-08-08 09:06:33 +02:00
2020-08-19 15:49:10 +02:00
2020-08-25 20:49:06 -04:00
2020-08-06 14:27:31 -07:00
2020-07-20 09:34:24 +02:00
2020-09-22 09:00:02 +01:00
2020-08-12 20:42:08 +02:00
2020-07-30 18:19:57 +02:00
2020-08-11 11:58:31 +10:00
2020-08-15 12:14:18 +02:00
2020-08-08 09:06:33 +02:00
2020-07-24 08:48:05 +10:00
2020-08-27 11:17:52 +02:00
2020-08-18 14:14:25 +02:00
2020-07-28 17:21:58 +02:00
2020-08-24 17:00:48 +10:00
2020-08-21 15:15:11 +03:00
2020-08-21 19:14:28 +02:00
2020-08-18 14:14:25 +02:00
2020-07-23 10:06:22 +02:00
2020-08-24 17:00:48 +10:00
2020-04-03 17:11:41 +02:00
2020-08-24 17:06:08 +10:00
2020-08-12 20:42:08 +02:00
2020-08-18 14:14:25 +02:00
2020-08-06 11:55:43 -07:00
2020-06-23 15:57:30 +02:00
2020-06-10 09:05:18 +02:00
2020-08-18 14:14:25 +02:00
2020-07-08 11:47:01 +02:00
2020-08-18 10:49:13 +02:00
2020-08-12 20:42:08 +02:00
2020-08-21 15:17:05 +03:00
2020-07-14 10:32:33 +02:00
2020-06-24 09:17:34 +02:00
2020-08-24 17:06:08 +10:00
2020-06-10 09:06:11 +02:00
2020-06-10 10:17:21 +02:00
2020-08-10 15:32:00 +02:00
2020-07-16 22:12:50 +02:00
2020-07-07 10:51:58 +02:00
2020-08-10 15:31:02 +02:00
2020-08-28 12:38:06 +10:00
2020-08-10 15:31:19 +02:00
2020-08-24 17:00:48 +10:00
2020-08-14 13:34:37 -07:00
2020-08-01 01:56:10 +00:00
2020-08-06 14:27:31 -07:00
2020-06-23 19:53:27 +02:00
2020-07-02 20:25:51 +02:00
2020-07-02 15:26:00 +02:00
2020-07-02 15:26:00 +02:00
2020-06-15 14:49:50 +01:00
2020-05-14 02:10:52 +03:00
2020-08-26 19:11:41 +02:00
2020-06-23 19:53:27 +02:00
2020-07-02 15:26:00 +02:00
2020-05-27 14:31:42 +03:00
2020-05-26 13:31:01 +02:00
2020-08-11 14:06:04 +02:00
2020-03-16 09:23:55 +01:00
2020-07-13 13:29:20 -04:00
2020-07-02 15:26:00 +02:00
2020-03-18 17:53:28 +01:00
2020-07-02 15:26:00 +02:00
2020-06-25 15:47:14 -07:00
2020-04-03 17:11:41 +02:00
2020-08-11 14:06:04 +02:00
2020-08-04 12:21:11 -04:00
2020-07-27 22:06:13 +02:00
2020-08-05 19:50:06 -07:00
2020-06-19 09:20:21 +02:00
2020-04-21 08:15:03 +02:00
2020-08-11 11:58:31 +10:00
2020-07-02 15:26:00 +02:00
2020-05-26 13:33:08 +02:00
2020-06-19 13:33:40 +01:00
2020-07-02 15:26:00 +02:00
2020-07-20 09:34:24 +02:00
2020-05-19 22:31:31 +01:00
2020-06-16 19:11:51 +02:00
2020-05-19 22:31:31 +01:00
2020-08-24 17:00:48 +10:00
2020-08-11 12:00:30 +10:00
2020-05-05 14:01:53 -04:00
2020-07-16 18:16:31 -04:00
2020-07-02 15:26:00 +02:00
2020-06-24 15:45:51 +10:00
2020-05-29 12:58:11 +02:00
2020-07-02 15:26:00 +02:00
2020-07-02 15:26:00 +02:00
2020-05-18 16:27:54 +01:00
2020-08-11 11:58:31 +10:00
2020-07-10 20:21:45 +02:00
2020-06-23 15:46:40 +02:00
2020-07-02 15:26:00 +02:00
2020-05-05 10:51:56 +02:00
2020-07-20 11:47:28 +02:00
2020-08-11 11:58:31 +10:00
2020-08-04 11:45:23 +02:00
2020-08-16 17:12:18 +02:00
2020-07-02 15:26:00 +02:00
2020-07-02 15:26:00 +02:00
2020-07-02 15:26:00 +02:00
2020-07-31 14:42:37 +10:00
2020-06-02 10:59:11 -07:00
2020-03-06 09:24:29 +01:00
2020-08-02 15:22:31 +02:00
2020-06-03 10:24:23 +02:00
2020-08-06 11:55:43 -07:00
2020-07-21 11:08:35 -04:00
2020-06-24 15:45:51 +10:00
2020-05-20 20:03:45 +02:00
2020-07-18 02:59:16 +03:00
2020-07-23 15:31:38 +10:00