public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Thomas Wood <thomas.wood@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH i-g-t] gem_storedw_loop: fix segfault when listing subtests
Date: Thu, 24 Sep 2015 08:23:29 -0700	[thread overview]
Message-ID: <56041571.8070000@virtuousgeek.org> (raw)
In-Reply-To: <1443089594-20673-1-git-send-email-thomas.wood@intel.com>

On 09/24/2015 03:13 AM, Thomas Wood wrote:
> Commit fb66cd5 (tests/gem_storedw_loop: Fix use after free for bufmgr)
> introduced a segmentation fault when listing subtests because
> drm_intel_bufmgr_destroy is called with NULL. Move this and the call to
> the close function inside an igt_fixture block to prevent them being
> called when listing subtests.
> 
> Cc: Robert Beckett <robert.beckett@intel.com>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
> ---
>  tests/gem_storedw_loop.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/gem_storedw_loop.c b/tests/gem_storedw_loop.c
> index e7ebcc2..e17e190 100644
> --- a/tests/gem_storedw_loop.c
> +++ b/tests/gem_storedw_loop.c
> @@ -180,6 +180,8 @@ igt_main
>  		}
>  	}
>  
> -	drm_intel_bufmgr_destroy(bufmgr);
> -	close(fd);
> +	igt_fixture {
> +		drm_intel_bufmgr_destroy(bufmgr);
> +		close(fd);
> +	}
>  }
> 

Um, yes. :)  I won't pretend to know how the fixture stuff ought to
work, so:
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2015-09-24 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 18:02 [PATCH i-g-t] tests/gem_storedw_loop: Fix use after free for bufmgr robert.beckett
2015-09-22 19:08 ` 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 [this message]

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=56041571.8070000@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.wood@intel.com \
    /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