public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kvm@vger.kernel.org
Subject: Re: [BUG] kvm: dereference srcu-protected pointer without srcu_read_lock() held
Date: Mon, 19 Apr 2010 22:45:04 -0300	[thread overview]
Message-ID: <20100420014504.GB17981@amt.cnet> (raw)
In-Reply-To: <4BCC2B9D.8050008@redhat.com>

On Mon, Apr 19, 2010 at 01:08:29PM +0300, Avi Kivity wrote:
> On 04/19/2010 12:58 PM, Lai Jiangshan wrote:
> >Applied the patch I just sent and let CONFIG_PROVE_RCU=y,
> >we can got the following dmesg. And we found that it is
> >because some codes in KVM dereferences srcu-protected pointer without
> >srcu_read_lock() held or update-side lock held.
> >
> >It is not hard to fix, the problem is that:
> >Where is the most proper place to put a srcu_read_lock()?
> >
> >I can not determine the answer, so I report this bug
> >instead of fixing it.
> >
> 
> I think the else branch in complete_pio() should work.  Marcelo?
> 
> Longer term I'd like to see the lock taken at the high levels
> (ioctls, in virt/kvm) and dropped only for guest entry and when we
> explicitly sleep (hlt emulation).
> 
> Note: complete_pio() is gone in the current code.

Yes, this was fixed by 7fb2ea1e6.

  reply	other threads:[~2010-04-20  1:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19  9:41 [PATCH] kvm: use the correct RCU API Lai Jiangshan
2010-04-19  9:49 ` Avi Kivity
2010-04-19 23:35   ` Paul E. McKenney
2010-04-20  2:09     ` Lai Jiangshan
2010-04-20 18:42       ` Paul E. McKenney
2010-04-19  9:58 ` [BUG] kvm: dereference srcu-protected pointer without srcu_read_lock() held Lai Jiangshan
2010-04-19 10:08   ` Avi Kivity
2010-04-20  1:45     ` Marcelo Tosatti [this message]
2010-04-20  6:29       ` Lai Jiangshan
2010-04-20 22:21         ` Paul E. McKenney
2010-04-21  8:17           ` Avi Kivity
2010-04-21 14:36             ` Paul E. McKenney
2010-04-20 21:55 ` [PATCH] kvm: use the correct RCU API Paul E. McKenney
2010-04-21  8:22   ` Avi Kivity
2010-04-21  8:22 ` 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=20100420014504.GB17981@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.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