diff options
Diffstat (limited to 'mm/kasan/kasan.c')
| -rw-r--r-- | mm/kasan/kasan.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index 18b6a2b8d183..6845f9294696 100644 --- a/mm/kasan/kasan.c +++ b/mm/kasan/kasan.c | |||
| @@ -508,7 +508,7 @@ void kasan_slab_alloc(struct kmem_cache *cache, void *object, gfp_t flags) | |||
| 508 | kasan_kmalloc(cache, object, cache->object_size, flags); | 508 | kasan_kmalloc(cache, object, cache->object_size, flags); |
| 509 | } | 509 | } |
| 510 | 510 | ||
| 511 | void kasan_poison_slab_free(struct kmem_cache *cache, void *object) | 511 | static void kasan_poison_slab_free(struct kmem_cache *cache, void *object) |
| 512 | { | 512 | { |
| 513 | unsigned long size = cache->object_size; | 513 | unsigned long size = cache->object_size; |
| 514 | unsigned long rounded_up_size = round_up(size, KASAN_SHADOW_SCALE_SIZE); | 514 | unsigned long rounded_up_size = round_up(size, KASAN_SHADOW_SCALE_SIZE); |
| @@ -626,7 +626,7 @@ void kasan_krealloc(const void *object, size_t size, gfp_t flags) | |||
| 626 | kasan_kmalloc(page->slab_cache, object, size, flags); | 626 | kasan_kmalloc(page->slab_cache, object, size, flags); |
| 627 | } | 627 | } |
| 628 | 628 | ||
| 629 | void kasan_kfree(void *ptr) | 629 | void kasan_poison_kfree(void *ptr) |
| 630 | { | 630 | { |
| 631 | struct page *page; | 631 | struct page *page; |
| 632 | 632 | ||
| @@ -636,7 +636,7 @@ void kasan_kfree(void *ptr) | |||
| 636 | kasan_poison_shadow(ptr, PAGE_SIZE << compound_order(page), | 636 | kasan_poison_shadow(ptr, PAGE_SIZE << compound_order(page), |
| 637 | KASAN_FREE_PAGE); | 637 | KASAN_FREE_PAGE); |
| 638 | else | 638 | else |
| 639 | kasan_slab_free(page->slab_cache, ptr); | 639 | kasan_poison_slab_free(page->slab_cache, ptr); |
| 640 | } | 640 | } |
| 641 | 641 | ||
| 642 | void kasan_kfree_large(const void *ptr) | 642 | void kasan_kfree_large(const void *ptr) |
| @@ -763,8 +763,8 @@ static int kasan_mem_notifier(struct notifier_block *nb, | |||
| 763 | 763 | ||
| 764 | static int __init kasan_memhotplug_init(void) | 764 | static int __init kasan_memhotplug_init(void) |
| 765 | { | 765 | { |
| 766 | pr_err("WARNING: KASAN doesn't support memory hot-add\n"); | 766 | pr_info("WARNING: KASAN doesn't support memory hot-add\n"); |
| 767 | pr_err("Memory hot-add will be disabled\n"); | 767 | pr_info("Memory hot-add will be disabled\n"); |
| 768 | 768 | ||
| 769 | hotplug_memory_notifier(kasan_mem_notifier, 0); | 769 | hotplug_memory_notifier(kasan_mem_notifier, 0); |
| 770 | 770 | ||
