Re: [patch 2.6.13-rc4] fix get_user_pages bug

Hugh Dickins
2005-08-01T19:31:42Z

On Mon, 1 Aug 2005, Linus Torvalds wrote:
>
> that "continue" will continue without the spinlock held, and now do

Yes, I was at last about to reply on that point and others.
I'll make those comments in a separate mail to Nick and all.

> Instead, I'd suggest changing the logic for "lookup_write". Make it
> require that the page table entry is _dirty_ (not writable), and then

Attractive, I very much wanted to do that rather than change all the
arches, but I think s390 rules it out: its pte_mkdirty does nothing,
its pte_dirty just says no.

Whether your patch suits all other uses of (__)follow_page I've not
investigated (and I don't see how you can go without the set_page_dirty
if it was necessary before); but at present see no alternative to
something like Nick's patch, though I'd much prefer smaller.

Or should we change s390 to set a flag in the pte just for this purpose?

Hugh