From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] [POWERPC] Fix oops related to 4xx flush_tlb_page modification
Date: Sat, 10 Nov 2007 08:11:58 +1100 [thread overview]
Message-ID: <1194642718.21340.20.camel@pasglop> (raw)
In-Reply-To: <Pine.LNX.4.64.0711090358300.28266@blarg.am.freescale.net>
On Fri, 2007-11-09 at 03:58 -0600, Kumar Gala wrote:
> 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.
Ack.
> ---
> 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,
prev parent reply other threads:[~2007-11-09 21:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-09 9:58 [PATCH] [POWERPC] Fix oops related to 4xx flush_tlb_page modification Kumar Gala
2007-11-09 21:11 ` Benjamin Herrenschmidt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1194642718.21340.20.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).