From 169a0335a0b4a86eec83544b962bab7b5a99387f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 9 Aug 2021 13:49:01 +0200 Subject: [PATCH] 5.10-stable patches added patches: drm-i915-avoid-uninitialised-var-in-eb_parse.patch --- ...-avoid-uninitialised-var-in-eb_parse.patch | 47 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 48 insertions(+) create mode 100644 queue-5.10/drm-i915-avoid-uninitialised-var-in-eb_parse.patch diff --git a/queue-5.10/drm-i915-avoid-uninitialised-var-in-eb_parse.patch b/queue-5.10/drm-i915-avoid-uninitialised-var-in-eb_parse.patch new file mode 100644 index 00000000000..a4a85dd3359 --- /dev/null +++ b/queue-5.10/drm-i915-avoid-uninitialised-var-in-eb_parse.patch @@ -0,0 +1,47 @@ +From jsg@jsg.id.au Mon Aug 9 13:47:05 2021 +From: Jonathan Gray +Date: Mon, 9 Aug 2021 21:30:22 +1000 +Subject: drm/i915: avoid uninitialised var in eb_parse() +To: stable@vger.kernel.org +Cc: jason@jlekstrand.net +Message-ID: <20210809113022.49484-1-jsg@jsg.id.au> + +From: Jonathan Gray + +The backport of c9d9fdbc108af8915d3f497bbdf3898bf8f321b8 to 5.10 in +6976f3cf34a1a8b791c048bbaa411ebfe48666b1 removed more than it should +have leading to 'batch' being used uninitialised. The 5.13 backport and +the mainline commit did not remove the portion this patch adds back. + +Signed-off-by: Jonathan Gray +Fixes: 6976f3cf34a1 ("drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"") +Cc: # 5.10 +Cc: Jason Ekstrand +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c ++++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +@@ -2351,6 +2351,12 @@ static int eb_parse(struct i915_execbuff + eb->batch_flags |= I915_DISPATCH_SECURE; + } + ++ batch = eb_dispatch_secure(eb, shadow); ++ if (IS_ERR(batch)) { ++ err = PTR_ERR(batch); ++ goto err_trampoline; ++ } ++ + err = intel_engine_cmd_parser(eb->engine, + eb->batch->vma, + eb->batch_start_offset, +@@ -2377,6 +2383,7 @@ secure_batch: + err_unpin_batch: + if (batch) + i915_vma_unpin(batch); ++err_trampoline: + if (trampoline) + i915_vma_unpin(trampoline); + err_shadow: diff --git a/queue-5.10/series b/queue-5.10/series index 1c3a6cf1965..db3590e8a29 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -122,3 +122,4 @@ drm-i915-correct-sfc_done-register-offset.patch soc-ixp4xx-qmgr-fix-invalid-__iomem-access.patch perf-x86-amd-don-t-touch-the-amd64_eventsel_hostonly-bit-inside-the-guest.patch sched-rt-fix-double-enqueue-caused-by-rt_effective_prio.patch +drm-i915-avoid-uninitialised-var-in-eb_parse.patch -- 2.47.3