Re: KVM: MMU: rmap_write_protect() hugepage iteration bug

Marcelo Tosatti
2008-06-09T00:21:28Z

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.