Re: [patch 2.6.13-rc4] fix get_user_pages bug

Linus Torvalds
2005-08-02T18:49:10Z

On Tue, 2 Aug 2005, Hugh Dickins wrote:
>
> It might not be so bad. It's going to access the struct page anyway.
> And clearing dirty from parent and child at fork time could save two
> set_page_dirtys at exit time. But I'm not sure that we could batch the
> the dirty bit clearing into one TLB flush like we do the write protection.

Yes, good point. If the thing is still marked dirty in the TLB, some other
thread might be writing to the page after we've cleared dirty but before
we've flushed the TLB - causing the new dirty bit to be lost. I think.

Linus