public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: robert.beckett@intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] tests/gem_storedw_loop: Fix use after free for bufmgr
Date: Tue, 22 Sep 2015 19:02:39 +0100	[thread overview]
Message-ID: <1442944959-29467-1-git-send-email-robert.beckett@intel.com> (raw)

From: Robert Beckett <robert.beckett@intel.com>

Move bufmgr destruction to end of tests. This avoids use after free on
successive tests.

This could be squashed with the following patch to aid bisectability:

commit 0679702150157706a6def66b893b29c16345f4db
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Wed Aug 5 16:06:31 2015 -0700

    tests/gem_storedw_loop: add new store_dword test to unify per-ring ones v2

Signed-off-by: Robert Beckett <robert.beckett@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 tests/gem_storedw_loop.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/gem_storedw_loop.c b/tests/gem_storedw_loop.c
index 10b12d4..e7ebcc2 100644
--- a/tests/gem_storedw_loop.c
+++ b/tests/gem_storedw_loop.c
@@ -128,7 +128,6 @@ store_test(int ring, int count)
 
 	drm_intel_bo_unreference(target_buffer);
 	intel_batchbuffer_free(batch);
-	drm_intel_bufmgr_destroy(bufmgr);
 }
 
 struct ring {
@@ -181,5 +180,6 @@ igt_main
 		}
 	}
 
+	drm_intel_bufmgr_destroy(bufmgr);
 	close(fd);
 }
-- 
1.7.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2015-09-22 18:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 18:02 robert.beckett [this message]
2015-09-22 19:08 ` [PATCH i-g-t] tests/gem_storedw_loop: Fix use after free for bufmgr Jesse Barnes
2015-09-23 16:01   ` Daniel Vetter
2015-09-23 16:27     ` Thomas Wood
2015-09-24 10:13       ` [PATCH i-g-t] gem_storedw_loop: fix segfault when listing subtests Thomas Wood
2015-09-24 15:23         ` Jesse Barnes

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=1442944959-29467-1-git-send-email-robert.beckett@intel.com \
    --to=robert.beckett@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox