Re: [PATCH] powerpc/mm: bail out early when flushing TLB page

2015-02-01 Thread Arseny Solokha
> On Fri, 2015-01-30 at 19:08 +0700, Arseny Solokha wrote: >> 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 >> legitimatel

Re: [PATCH] powerpc/mm: bail out early when flushing TLB page

2015-01-31 Thread Benjamin Herrenschmidt
On Fri, 2015-01-30 at 19:08 +0700, Arseny Solokha wrote: > 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 pass

Re: [PATCH] powerpc/mm: bail out early when flushing TLB page

2015-01-30 Thread Arseny Solokha
> On Fri, 2015-01-30 at 19:08 +0700, Arseny Solokha wrote: >> MMU_NO_CONTEXT is conditionally defined as 0 or (unsigned int)-1. > > For nohash it is specifically -1. >> However, in __flush_tlb_page() a corresponding variable is only tested >> for open coded 0, which can cause NULL pointer derefer

Re: [PATCH] powerpc/mm: bail out early when flushing TLB page

2015-01-30 Thread Scott Wood
On Fri, 2015-01-30 at 19:08 +0700, Arseny Solokha wrote: > MMU_NO_CONTEXT is conditionally defined as 0 or (unsigned int)-1. For nohash it is specifically -1. > However, in __flush_tlb_page() a corresponding variable is only tested > for open coded 0, which can cause NULL pointer dereference if

[PATCH] powerpc/mm: bail out early when flushing TLB page

2015-01-30 Thread Arseny Solokha
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, t