aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-03-27 01:07:55 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-27 01:07:55 -0800
commit7bebd83dbf096d0bf4b4bfbaf5d8844a05f5eafc (patch)
treeea583040c5d9fbd8d72e7b9bfa831c9f7b553a5e /arch
parent5d5d7727a8cde78f798ecf04bac8031eff536f9d (diff)
downloadkernel_samsung_smdk4412-7bebd83dbf096d0bf4b4bfbaf5d8844a05f5eafc.zip
kernel_samsung_smdk4412-7bebd83dbf096d0bf4b4bfbaf5d8844a05f5eafc.tar.gz
kernel_samsung_smdk4412-7bebd83dbf096d0bf4b4bfbaf5d8844a05f5eafc.tar.bz2
[SPARC64]: Fix off-by-1 error in TSB grow check.
The worst part about this bug is what it would cause a hugepage TSB to be allocated for every address space since "0 >= 0". Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/mm/fault.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c
index d21ff32..0db2f7d 100644
--- a/arch/sparc64/mm/fault.c
+++ b/arch/sparc64/mm/fault.c
@@ -413,12 +413,12 @@ good_area:
#ifdef CONFIG_HUGETLB_PAGE
mm_rss -= (mm->context.huge_pte_count * (HPAGE_SIZE / PAGE_SIZE));
#endif
- if (unlikely(mm_rss >=
+ if (unlikely(mm_rss >
mm->context.tsb_block[MM_TSB_BASE].tsb_rss_limit))
tsb_grow(mm, MM_TSB_BASE, mm_rss);
#ifdef CONFIG_HUGETLB_PAGE
mm_rss = mm->context.huge_pte_count;
- if (unlikely(mm_rss >=
+ if (unlikely(mm_rss >
mm->context.tsb_block[MM_TSB_HUGE].tsb_rss_limit))
tsb_grow(mm, MM_TSB_HUGE, mm_rss);
#endif