On Mon, Oct 25, 2010 at 06:13:56PM -0200, Marcelo Tosatti wrote: > On Mon, Oct 25, 2010 at 03:20:59PM +0200, Michael S. Tsirkin wrote: > > On Mon, Oct 25, 2010 at 11:52:29AM -0200, Marcelo Tosatti wrote: > > > On Sun, Oct 24, 2010 at 07:16:10PM +0200, Michael S. Tsirkin wrote: > > > > srcu_idx is easy to misuse as it can not be used > > > > in nested srcu_read_lock calls. Switch to local > > > > index to make correctness easier to verify. > > > > > > > > Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx> > > > > > > > > --- > > > > > > Looks good to me. > > > > > > Not needed for -stable, i don't see a problem with the current > > > code? > > > > It's just that I can not convince myself current code never nestes > > read_locks with srcu_idx. I used to see host crashes under migration > > stress they seem gone now but did not retest - could be just luck. > > Well, you just changed where srcu index is saved. I don't see how it > could make a difference in practice. > If there is nested call to srcu read lock if srcu_idx is stored in vcpu nested call will override previous srcu_idx value and srcu unlock will not be called on it, but it will be called twice on new srcu_idx value. If srcu_idx is saved on stack this will not happen, no? -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html