From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 45D8FDDE02 for ; Fri, 9 Nov 2007 20:59:56 +1100 (EST) Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.13.8/8.13.8) with ESMTP id lA99xplb030693 for ; Fri, 9 Nov 2007 03:59:51 -0600 Date: Fri, 9 Nov 2007 03:58:49 -0600 (CST) From: Kumar Gala To: linuxppc-dev@ozlabs.org Subject: [PATCH] [POWERPC] Fix oops related to 4xx flush_tlb_page modification Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , kmap_atomic calls flush_tlb_page with a NULL VMA and thus we end up dereferencing a NULL pointer to try and get the context.id. If the VMA is null use the global pid value of 0. --- include/asm-powerpc/tlbflush.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/asm-powerpc/tlbflush.h b/include/asm-powerpc/tlbflush.h index e7b4c0d..5c91081 100644 --- a/include/asm-powerpc/tlbflush.h +++ b/include/asm-powerpc/tlbflush.h @@ -44,13 +44,13 @@ static inline void flush_tlb_mm(struct mm_struct *mm) static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) { - _tlbie(vmaddr, vma->vm_mm->context.id); + _tlbie(vmaddr, vma ? vma->vm_mm->context.id : 0); } static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, unsigned long vmaddr) { - _tlbie(vmaddr, vma->vm_mm->context.id); + _tlbie(vmaddr, vma ? vma->vm_mm->context.id : 0); } static inline void flush_tlb_range(struct vm_area_struct *vma, -- 1.5.3.3