Skip to contentSkip to conversation

Patch "drm/amdgpu: fix parser init error path to avoid crash in parser fini" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Dec 18, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/amdgpu: fix parser init error path to avoid crash in parser fini

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-amdgpu-fix-parser-init-error-path-to-avoid-crash-in-parser-fini.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Mon Dec 18 14:12:34 CET 2017

From: Dave Airlie <[email protected]>
Date: Fri, 10 Mar 2017 12:13:04 +1000
Subject: drm/amdgpu: fix parser init error path to avoid crash in parser fini

From: Dave Airlie <[email protected]>

[ Upstream commit 607523d19c9d67ba4cf7bdaced644f11ed04992c ]

If we don't reset the chunk info in the error path, the subsequent fini path will double free.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2 -0
@@ -240,6 +240,8 @@ free_partial_kdata:
 	for (; i >= 0; i--)
 		drm_free_large(p->chunks[i].kdata);
 	kfree(p->chunks);
+	p->chunks = NULL;
+	p->nchunks = 0;
 put_ctx:
 	amdgpu_ctx_put(p->ctx);
 free_chunk:

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/drm-amdgpu-fix-parser-init-error-path-to-avoid-crash-in-parser-fini.patch