• Arseny Solokha's avatar
    powerpc/mm: bail out early when flushing TLB page · 0dc294f7
    Arseny Solokha authored
    MMU_NO_CONTEXT is conditionally defined as 0 or (unsigned int)-1. However,
    in __flush_tlb_page() a corresponding variable is only tested for open
    coded 0, which can cause NULL pointer dereference if `mm' argument was
    legitimately passed as such.
    
    Bail out early in case the first argument is NULL, thus eliminate confusion
    between different values of MMU_NO_CONTEXT and avoid disabling and then
    re-enabling preemption unnecessarily.
    Signed-off-by: default avatarArseny Solokha <asolokha@kb.kras.ru>
    Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
    0dc294f7
tlb_nohash.c 18.8 KB