kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Avi Kivity <avi@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>,
	linux-kernel@vger.kernel.org,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Gleb Natapov <gleb@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Gregory Haskins <ghaskins@novell.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH] x86: KVM, fix lock imbalance
Date: Wed, 7 Jul 2010 16:10:08 +0200	[thread overview]
Message-ID: <20100707141008.GA7419@elte.hu> (raw)
In-Reply-To: <4C347F3C.2010704@redhat.com>


* Avi Kivity <avi@redhat.com> wrote:

> On 07/07/2010 04:07 PM, Jiri Slaby wrote:
> >
> >>A cleanliness comment: why is that tear-down/dealloc sequence open-coded? It
> >>should be at the end of the function, with goto labels, like we do it in
> >>similar cases.
> >Because the lock is around a block only. I usually don't create a goto
> >fail-paths in these cases. Do you want one?
> 
> In any case, the patch is a minimal fix, so I'll apply it.  Any clean ups 
> can go on top.

The reason the pattern caught my attention is that it is one of the typical 
cases where goto labels help prevent similar bugs. I.e. had it been clean to 
begin with the bug might not have happened.

Thanks,

	Ingo

  reply	other threads:[~2010-07-07 14:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07 13:02 [PATCH] x86: KVM, fix lock imbalance Jiri Slaby
2010-07-07 13:05 ` Ingo Molnar
2010-07-07 13:07   ` Jiri Slaby
2010-07-07 13:12     ` Jiri Slaby
2010-07-07 13:21     ` Avi Kivity
2010-07-07 14:10       ` Ingo Molnar [this message]
2010-07-07 14:14         ` Avi Kivity

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=20100707141008.GA7419@elte.hu \
    --to=mingo@elte.hu \
    --cc=avi@redhat.com \
    --cc=ghaskins@novell.com \
    --cc=gleb@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jirislaby@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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;
as well as URLs for NNTP newsgroup(s).