From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH 1/3] agp/intel-gtt: Don't leak the scratch page
Date: Tue, 26 Jan 2016 19:49:54 +0100 [thread overview]
Message-ID: <1453834196-5741-1-git-send-email-daniel.vetter@ffwll.ch> (raw)
Recently discovered by enabling CONFIG_DMA_API_DEBUG in our CI. By the
looks of it broken since forever.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93793
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
drivers/char/agp/intel-gtt.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 1341a94cc779..432ae61a8715 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1430,6 +1430,14 @@ void intel_gmch_remove(void)
if (--intel_private.refcount)
return;
+ if (intel_private.scratch_page) {
+ if (intel_private.needs_dmar)
+ pci_unmap_page(intel_private.pcidev,
+ intel_private.scratch_page_dma,
+ PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
+
+ __free_page(intel_private.scratch_page);
+ }
if (intel_private.pcidev)
pci_dev_put(intel_private.pcidev);
if (intel_private.bridge_dev)
--
2.5.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2016-01-26 18:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 18:49 Daniel Vetter [this message]
2016-01-26 18:49 ` [PATCH 2/3] drm/i915: Stop depending upon CONFIG_AGP/_INTEL Daniel Vetter
2016-01-26 20:56 ` Chris Wilson
2016-01-27 11:37 ` Ville Syrjälä
2016-01-26 18:49 ` [PATCH 3/3] agp/intel-gtt: Only register fake agp driver for gen1 Daniel Vetter
2016-01-26 20:58 ` Chris Wilson
2016-01-26 21:00 ` [PATCH 1/3] agp/intel-gtt: Don't leak the scratch page Chris Wilson
2016-01-27 17:52 ` ✗ Fi.CI.BAT: failure for series starting with [1/3] " Patchwork
2016-01-28 14:56 ` ✓ Fi.CI.BAT: success " Patchwork
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=1453834196-5741-1-git-send-email-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.