All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Liliang <liangx.z.li@intel.com>,
	Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org, aliguori@amazon.com
Subject: Re: [Qemu-devel] [PATCH] qemu-char: Fixed the bug lead to dead lock
Date: Mon, 14 Jul 2014 13:56:06 -0400	[thread overview]
Message-ID: <20140714135606.0a1bed38@redhat.com> (raw)
In-Reply-To: <87oawwclh8.fsf@blackfin.pond.sub.org>

On Fri, 11 Jul 2014 11:07:15 +0200
Markus Armbruster <armbru@redhat.com> wrote:

> Cc'ing folks involved in the flawed commit.
> 
> Liliang <liangx.z.li@intel.com> writes:
> 
> > From: Li Liang <liangx.z.li@intel.com>
> >
> > This bug was introduced in the commit 9005b2a7589540a3733b3abdcfbccfe7746cd1a1,
> > it will cause deadlock when create a vm with the parameter "-monitor pty" and
> > then try to read from /dev/pts/x.
> >
> > Signed-off-by: Li Liang <liangx.z.li@intel.com>
> 
> Long lines in commit message, and the subject isn't as informative as it
> could be.  Suggest something like:
> 
>     qemu-char: Fix deadlock in pty character device
> 
>     To reproduce, run with "-monitor pty", then try to read from the
>     slave /dev/pts/FOO created for it.
> 
>     Broken in commit 9005b2a.

Paolo posted a pull request today with a fix for this issue included:

[PULL 2/5] qemu-char: fix deadlock with "-monitor pty"

Thanks Paolo!

> 
> > ---
> >  qemu-char.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/qemu-char.c b/qemu-char.c
> > index 55e372c..55cdded 100644
> > --- a/qemu-char.c
> > +++ b/qemu-char.c
> > @@ -1103,9 +1103,11 @@ static gboolean pty_chr_timer(gpointer opaque)
> >      s->timer_tag = 0;
> >      if (!s->connected) {
> >          /* Next poll ... */
> > +        qemu_mutex_unlock(&chr->chr_write_lock);
> >          pty_chr_update_read_handler_locked(chr);
> > +    } else {
> > +        qemu_mutex_unlock(&chr->chr_write_lock);
> >      }
> > -    qemu_mutex_unlock(&chr->chr_write_lock);
> >      return FALSE;
> >  }
> 

  reply	other threads:[~2014-07-14 17:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11  4:58 [Qemu-devel] [PATCH] qemu-char: Fixed the bug lead to dead lock Liliang
2014-07-11  9:07 ` Markus Armbruster
2014-07-14 17:56   ` Luiz Capitulino [this message]
2014-07-11  9:07 ` Peter Maydell
2014-07-11  9:30   ` Li, LiangX Z

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=20140714135606.0a1bed38@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=liangx.z.li@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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.