public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] lib/drmtest: don't use asprintf on signal paths
Date: Wed, 05 Feb 2014 00:04:46 +0200	[thread overview]
Message-ID: <1391551486.3416.14.camel@ideak-mobl> (raw)
In-Reply-To: <20140204212929.GJ11603@nuc-i3427.alporthouse.com>

On Tue, 2014-02-04 at 21:29 +0000, Chris Wilson wrote:
> On Tue, Feb 04, 2014 at 09:15:14PM +0200, Imre Deak wrote:
> > It's not signal safe and I got kms_flip in hung state with the backtrace
> > below, while the parent process waiting for the signal helper to exit.
> > It was quite easy to reproduce the bug by running
> > 
> > kms_flip --run-subtest=flip-vs-dpms-off-vs-modeset
> 
> snprintf is not signalsafe either (man 7 signal). X goes as far as
> implementing its own limited pnprintf() instead.

Thanks. I got only as far as to realize that asprintf is not signal-safe
b/c of malloc and didn't remember any place with an official list of
allowed functions..

I also missed at least igt_skip() calling vprintf(), so this needs some
more thought.

--Imre

  reply	other threads:[~2014-02-04 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 19:15 [PATCH] lib/drmtest: don't use asprintf on signal paths Imre Deak
2014-02-04 21:29 ` Chris Wilson
2014-02-04 22:04   ` Imre Deak [this message]
2014-02-04 23:19     ` Daniel Vetter
2014-02-05  9:29       ` Imre Deak

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=1391551486.3416.14.camel@ideak-mobl \
    --to=imre.deak@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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