Message ID | 4A2E45EA.5040705@gaisler.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
On Tue, Jun 09, 2009 at 01:22:18PM +0200, Konrad Eisele wrote: > From f95779d3a4d478d9df1070cc54a42163993f3b97 Mon Sep 17 00:00:00 2001 > From: Konrad Eisele <konrad@gaisler.com> > Date: Tue, 9 Jun 2009 13:05:17 +0200 > Subject: [PATCH 6/7] Handle sparc-leon SRMMU specific bug. Shielded by > CONFIG_LEON. > > Signed-off-by: Konrad Eisele <konrad@gaisler.com> > --- > arch/sparc/mm/fault_32.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c > index 12e447f..602eb82 100644 > --- a/arch/sparc/mm/fault_32.c > +++ b/arch/sparc/mm/fault_32.c > @@ -227,7 +227,11 @@ asmlinkage void do_sparc_fault(struct pt > */ > good_area: > info.si_code = SEGV_ACCERR; > - if(write) { > + if (write > +#ifdef CONFIG_LEON > + && !text_fault > +#endif > + ) { > if(!(vma->vm_flags & VM_WRITE)) > goto bad_area; > } else { We do not break up an if like this. And you need to comment on this. Consider using an inline helper function or similar to avoid obscufating the code. Sam -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c index 12e447f..602eb82 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c @@ -227,7 +227,11 @@ asmlinkage void do_sparc_fault(struct pt */ good_area: info.si_code = SEGV_ACCERR; - if(write) { + if (write +#ifdef CONFIG_LEON + && !text_fault +#endif + ) { if(!(vma->vm_flags & VM_WRITE)) goto bad_area; } else {