On Tue, Sep 24, 2019 at 08:45:18AM -0700, Matthew Wilcox wrote: [...] > Oh, and while you're looking at the callers of handle_mm_fault(), a > lot of them don't check conditions in the right order. x86, at least, > handles FAULT_RETRY before handling FAULT_ERROR, which is clearly wrong. > > Kirill and I recently discussed it here: > https://lore.kernel.org/linux-mm/20190911152338.gqqgxrmqycodfocb@box/T/ Is there any existing path in master that we can get VM_FAULT_RETRY returned with any existing VM_FAULT_ERROR bit? It seems to me that above link is the first one that is going to introduce such case? If so, I'm uncertain now on whether I should have one patch to handle the ERROR case first as you suggested with this series, because otherwise that patch won't explain itself without a real benefit... Thanks, -- Peter Xu