diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 8f4b859a04b3ff95caabfcfce54523e3adc1c313..eb4d7fe05938eac3324ed500f90ebd2cd62fddcd 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -888,6 +888,12 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) return; } down_read(&mm->mmap_sem); + } else { + /* + * The above down_read_trylock() might have succeeded in which + * case we'll have missed the might_sleep() from down_read(). + */ + might_sleep(); } vma = find_vma(mm, address);