aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 95b6c5eb40b3..6a1ad0b9a94f 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1612,7 +1612,7 @@ static void *kmem_getpages(struct kmem_cache *cachep, gfp_t flags, int nodeid)
1612 if (cachep->flags & SLAB_RECLAIM_ACCOUNT) 1612 if (cachep->flags & SLAB_RECLAIM_ACCOUNT)
1613 flags |= __GFP_RECLAIMABLE; 1613 flags |= __GFP_RECLAIMABLE;
1614 1614
1615 page = alloc_pages_node(nodeid, flags, cachep->gfporder); 1615 page = alloc_pages_node(nodeid, flags | __GFP_NOTRACK, cachep->gfporder);
1616 if (!page) 1616 if (!page)
1617 return NULL; 1617 return NULL;
1618 1618
@@ -1626,8 +1626,14 @@ static void *kmem_getpages(struct kmem_cache *cachep, gfp_t flags, int nodeid)
1626 for (i = 0; i < nr_pages; i++) 1626 for (i = 0; i < nr_pages; i++)
1627 __SetPageSlab(page + i); 1627 __SetPageSlab(page + i);
1628 1628
1629 if (kmemcheck_enabled && !(cachep->flags & SLAB_NOTRACK)) 1629 if (kmemcheck_enabled && !(cachep->flags & SLAB_NOTRACK)) {
1630 kmemcheck_alloc_shadow(cachep, flags, nodeid, page, cachep->gfporder); 1630 kmemcheck_alloc_shadow(page, cachep->gfporder, flags, nodeid);
1631
1632 if (cachep->ctor)
1633 kmemcheck_mark_uninitialized_pages(page, nr_pages);
1634 else
1635 kmemcheck_mark_unallocated_pages(page, nr_pages);
1636 }
1631 1637
1632 return page_address(page); 1638 return page_address(page);
1633} 1639}
@@ -1641,8 +1647,7 @@ static void kmem_freepages(struct kmem_cache *cachep, void *addr)
1641 struct page *page = virt_to_page(addr); 1647 struct page *page = virt_to_page(addr);
1642 const unsigned long nr_freed = i; 1648 const unsigned long nr_freed = i;
1643 1649
1644 if (kmemcheck_page_is_tracked(page)) 1650 kmemcheck_free_shadow(page, cachep->gfporder);
1645 kmemcheck_free_shadow(cachep, page, cachep->gfporder);
1646 1651
1647 if (cachep->flags & SLAB_RECLAIM_ACCOUNT) 1652 if (cachep->flags & SLAB_RECLAIM_ACCOUNT)
1648 sub_zone_page_state(page_zone(page), 1653 sub_zone_page_state(page_zone(page),