linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	"Christian König" <christian.koenig@amd.com>,
	"Michel Dänzer" <michel.daenzer@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>
Subject: [PATCH 4.15 17/52] drm/amdgpu: fix prime teardown order
Date: Mon, 19 Mar 2018 19:08:15 +0100	[thread overview]
Message-ID: <20180319180736.118516188@linuxfoundation.org> (raw)
In-Reply-To: <20180319180734.976730813@linuxfoundation.org>

4.15-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Christian König <christian.koenig@amd.com>

commit 342038d92403b3efa1138a8599666b9f026279d6 upstream.

We unmapped imported DMA-bufs when the GEM handle was dropped, not when the
hardware was done with the buffere.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c    |    2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c |    2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -36,8 +36,6 @@ void amdgpu_gem_object_free(struct drm_g
 	struct amdgpu_bo *robj = gem_to_amdgpu_bo(gobj);
 
 	if (robj) {
-		if (robj->gem_base.import_attach)
-			drm_prime_gem_destroy(&robj->gem_base, robj->tbo.sg);
 		amdgpu_mn_unregister(robj);
 		amdgpu_bo_unref(&robj);
 	}
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -44,6 +44,8 @@ static void amdgpu_ttm_bo_destroy(struct
 
 	amdgpu_bo_kunmap(bo);
 
+	if (bo->gem_base.import_attach)
+		drm_prime_gem_destroy(&bo->gem_base, bo->tbo.sg);
 	drm_gem_object_release(&bo->gem_base);
 	amdgpu_bo_unref(&bo->parent);
 	if (!list_empty(&bo->shadow_list)) {

  parent reply	other threads:[~2018-03-19 18:08 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 18:07 [PATCH 4.15 00/52] 4.15.12-stable review Greg Kroah-Hartman
2018-03-19 18:07 ` [PATCH 4.15 01/52] x86/cpufeatures: Add Intel Total Memory Encryption cpufeature Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 02/52] x86/cpufeatures: Add Intel PCONFIG cpufeature Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 03/52] selftests/x86/entry_from_vm86: Exit with 1 if we fail Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 04/52] selftests/x86/entry_from_vm86: Add test cases for POPF Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 05/52] x86/vm86/32: Fix POPF emulation Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 06/52] x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 07/52] x86/speculation: Remove Skylake C2 from Speculation Control microcode blacklist Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 08/52] KVM: x86: Fix device passthrough when SME is active Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 09/52] x86/mm: Fix vmalloc_fault to use pXd_large Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 10/52] parisc: Handle case where flush_cache_range is called with no context Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 11/52] ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats() Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 12/52] ALSA: hda - Revert power_save option default value Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 13/52] ALSA: seq: Fix possible UAF in snd_seq_check_queue() Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 14/52] ALSA: seq: Clear client entry before deleting else at closing Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 15/52] drm/nouveau/bl: Fix oops on driver unbind Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 16/52] drm/nouveau/mmu: ALIGN_DOWN correct variable Greg Kroah-Hartman
2018-03-19 18:08 ` Greg Kroah-Hartman [this message]
2018-03-19 18:08 ` [PATCH 4.15 18/52] drm/radeon: fix prime teardown order Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 19/52] drm/amdgpu/dce: Dont turn off DP sink when disconnected Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 20/52] fs: Teach path_connected to handle nfs filesystems with multiple roots Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 21/52] KVM: arm/arm64: Reduce verbosity of KVM init log Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 22/52] KVM: arm/arm64: Reset mapped IRQs on VM reset Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 23/52] kvm: arm/arm64: vgic-v3: Tighten synchronization for guests using v2 on v3 Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 24/52] KVM: arm/arm64: vgic: Dont populate multiple LRs with the same vintid Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 25/52] lock_parent() needs to recheck if dentry got __dentry_killed under it Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 26/52] fs/aio: Add explicit RCU grace period when freeing kioctx Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 27/52] fs/aio: Use RCU accessors for kioctx_table->table[] Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 28/52] RDMAVT: Fix synchronization around percpu_ref Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 29/52] irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 30/52] nvme: fix subsystem multiple controllers support check Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 31/52] xfs: preserve i_rdev when recycling a reclaimable inode Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 32/52] btrfs: Fix NULL pointer exception in find_bio_stripe Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 33/52] btrfs: add missing initialization in btrfs_check_shared Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 34/52] btrfs: alloc_chunk: fix DUP stripe size handling Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 35/52] btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 36/52] btrfs: remove spurious WARN_ON(ref->count < 0) in find_parent_nodes Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 37/52] btrfs: Fix memory barriers usage with device stats counters Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 38/52] scsi: qla2xxx: Fix smatch warning in qla25xx_delete_{rsp|req}_que Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 39/52] scsi: qla2xxx: Fix NULL pointer access for fcport structure Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 40/52] scsi: qla2xxx: Fix logo flag for qlt_free_session_done() Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 41/52] scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 42/52] usb: dwc2: fix STM32F7 USB OTG HS compatible Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 43/52] dt-bindings: usb: fix the STM32F7 DWC2 OTG HS core binding Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 44/52] USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe() Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 45/52] usb: dwc3: Fix GDBGFIFOSPACE_TYPE values Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 46/52] usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 47/52] usb: dwc3: of-simple: fix oops by unbalanced clk disable call Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 48/52] usb: gadget: udc: renesas_usb3: fix oops in renesas_usb3_remove() Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 49/52] phy: phy-brcm-usb: Fix two DT properties to match bindings doc Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 50/52] phy: phy-brcm-usb-init: Some Low Speed keyboards fail on 7271 Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 51/52] phy: phy-brcm-usb-init: DRD mode can cause crash on startup Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.15 52/52] phy: phy-brcm-usb-init: Power down USB 3.0 PHY when XHCI disabled Greg Kroah-Hartman
2018-03-19 23:20 ` [PATCH 4.15 00/52] 4.15.12-stable review kernelci.org bot
2018-03-20  6:47 ` Naresh Kamboju
2018-03-20  7:44   ` Greg Kroah-Hartman
2018-03-20 12:24 ` Thadeu Lima de Souza Cascardo
2018-03-21 11:07   ` Greg Kroah-Hartman
2018-03-20 16:11 ` Guenter Roeck
2018-03-21 12:29   ` Greg Kroah-Hartman
2018-03-20 20:11 ` Shuah Khan
2018-03-21  9:42   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180319180736.118516188@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michel.daenzer@amd.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).