linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/tlb: fix allnoconfig building warning
@ 2012-07-20  1:18 Alex Shi
  2012-07-20  8:54 ` Borislav Petkov
  2012-07-20 22:34 ` [tip:x86/mm] x86/tlb: Fix build warning and crash when building for !SMP tip-bot for Alex Shi
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Shi @ 2012-07-20  1:18 UTC (permalink / raw)
  To: hpa
  Cc: tglx, mingo, alex.shi, tj, akpm, sfr, linux-kernel, bp, penguin-kernel

The incompatible parameter of flush_tlb_mm_range cause build warning.
Fix it by correct parameter.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Alex Shi <alex.shi@intel.com>
---
 arch/x86/include/asm/tlbflush.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index 621b959..4fc8faf 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -105,10 +105,10 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
 		__flush_tlb();
 }
 
-static inline void flush_tlb_mm_range(struct vm_area_struct *vma,
+static inline void flush_tlb_mm_range(struct mm_struct *mm,
 	   unsigned long start, unsigned long end, unsigned long vmflag)
 {
-	if (vma->vm_mm == current->active_mm)
+	if (mm == current->active_mm)
 		__flush_tlb();
 }
 
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/tlb: fix allnoconfig building warning
  2012-07-20  1:18 [PATCH] x86/tlb: fix allnoconfig building warning Alex Shi
@ 2012-07-20  8:54 ` Borislav Petkov
  2012-07-20 22:34 ` [tip:x86/mm] x86/tlb: Fix build warning and crash when building for !SMP tip-bot for Alex Shi
  1 sibling, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2012-07-20  8:54 UTC (permalink / raw)
  To: Alex Shi
  Cc: hpa, tglx, mingo, tj, akpm, sfr, linux-kernel, bp, penguin-kernel

On Fri, Jul 20, 2012 at 09:18:23AM +0800, Alex Shi wrote:
> The incompatible parameter of flush_tlb_mm_range cause build warning.
> Fix it by correct parameter.
> 
> Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Signed-off-by: Alex Shi <alex.shi@intel.com>

Thanks for this.

Btw, the patch Subject should say: 

"[PATCH] x86, tlb: Fix flush_tlb_mm_range signature"

or

"[PATCH] x86, tlb: Fix non-SMP build warning"

or similar. Having "allnoconfig" in the name is a bit misleading as it
is only one of the reasons why we build a !CONFIG_SMP kernel - this can
happen with a randbuild too. And the hunk below touches the "#ifndef
CONFIG_SMP" part of tlbflush.h...

So, long story short, hpa, can pls you correct this when applying?

> ---
>  arch/x86/include/asm/tlbflush.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
> index 621b959..4fc8faf 100644
> --- a/arch/x86/include/asm/tlbflush.h
> +++ b/arch/x86/include/asm/tlbflush.h
> @@ -105,10 +105,10 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
>  		__flush_tlb();
>  }
>  
> -static inline void flush_tlb_mm_range(struct vm_area_struct *vma,
> +static inline void flush_tlb_mm_range(struct mm_struct *mm,
>  	   unsigned long start, unsigned long end, unsigned long vmflag)
>  {
> -	if (vma->vm_mm == current->active_mm)
> +	if (mm == current->active_mm)
>  		__flush_tlb();
>  }

Thanks.

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:x86/mm] x86/tlb: Fix build warning and crash when building for !SMP
  2012-07-20  1:18 [PATCH] x86/tlb: fix allnoconfig building warning Alex Shi
  2012-07-20  8:54 ` Borislav Petkov
@ 2012-07-20 22:34 ` tip-bot for Alex Shi
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Alex Shi @ 2012-07-20 22:34 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, penguin-kernel, alex.shi, tglx

Commit-ID:  7efa1c87963d23cc57ba40c07316d3e28cc75a3a
Gitweb:     http://git.kernel.org/tip/7efa1c87963d23cc57ba40c07316d3e28cc75a3a
Author:     Alex Shi <alex.shi@intel.com>
AuthorDate: Fri, 20 Jul 2012 09:18:23 +0800
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Fri, 20 Jul 2012 15:01:48 -0700

x86/tlb: Fix build warning and crash when building for !SMP

The incompatible parameter of flush_tlb_mm_range cause build warning.
Fix it by correct parameter.

Ingo Molnar found that this could also cause a user space crash.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Alex Shi <alex.shi@intel.com>
Link: http://lkml.kernel.org/r/1342747103-19765-1-git-send-email-alex.shi@intel.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/include/asm/tlbflush.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index b5a27bd..74a4433 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -105,10 +105,10 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
 		__flush_tlb();
 }
 
-static inline void flush_tlb_mm_range(struct vm_area_struct *vma,
+static inline void flush_tlb_mm_range(struct mm_struct *mm,
 	   unsigned long start, unsigned long end, unsigned long vmflag)
 {
-	if (vma->vm_mm == current->active_mm)
+	if (mm == current->active_mm)
 		__flush_tlb();
 }
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-20 22:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20  1:18 [PATCH] x86/tlb: fix allnoconfig building warning Alex Shi
2012-07-20  8:54 ` Borislav Petkov
2012-07-20 22:34 ` [tip:x86/mm] x86/tlb: Fix build warning and crash when building for !SMP tip-bot for Alex Shi

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).