mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
[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>
This commit is contained in:
parent
5d5d7727a8
commit
7bebd83dbf
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue