From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: KVM: MMU: rmap_write_protect() hugepage iteration bug Date: Sun, 8 Jun 2008 21:20:41 -0300 Message-ID: <20080609002041.GA5100@dmt.cnet> References: <20080608002736.GA25582@dmt.cnet> <20080608015452.GC8321@duo.random> <20080608044853.GA1408@dmt.cnet> <20080608183119.GA21835@duo.random> <20080608195215.GA5824@dmt.cnet> <20080608203037.GB9921@duo.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm-devel To: Andrea Arcangeli Return-path: Received: from mx1.redhat.com ([66.187.233.31]:43658 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756582AbYFIAV2 (ORCPT ); Sun, 8 Jun 2008 20:21:28 -0400 Content-Disposition: inline In-Reply-To: <20080608203037.GB9921@duo.random> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Jun 08, 2008 at 10:30:37PM +0200, Andrea Arcangeli wrote: > On Sun, Jun 08, 2008 at 04:52:15PM -0300, Marcelo Tosatti wrote: > > We do. The case is were you have two entries in the array. rmap_remove > > will first remove the entry at index 0, and move the entry at index 1 to > > 0. > > > > Then we call "rmap_next()" with a non-NULL spte, which will skip the > > only remaining entry at index 0. IOW rmap_next() requires the spte > > argument to be NULL if the array has one valid entry. > > How exactly we could call rmap_next with not-NULL spte after any > rmap_remove with your last patch applied? With the original code.