On Fri, Apr 10, 2020 at 2:32 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: > > In fixup_user_fault(), it is possible that unlocked is NULL, > so we should test unlocked before using it. This seems wrong. > For example, in arch/arc/kernel/process.c, NULL is passed > to fixup_user_fault(). > > ret = fixup_user_fault(current, current->mm, (unsigned long) uaddr, > FAULT_FLAG_WRITE, NULL); Yes, but it doesn't set FAULT_FLAG_ALLOW_RETRY, exactly _because_ 'unlocked' is NULL. Basically, retry is fundamentally tied to that "unlocked" flag. You can't ask for retry without also saying "please tell me if you unlocked the mmap_sem during the retry". So the two go hand in hand there. So I think this is just coverity not understanding the rules. Or maybe I'm the one missing something. Did you actually see a problem? Linus