diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-19 03:44:37 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-19 03:44:37 -0500 |
commit | 3ac3ba0b396fd99550e08034b0e4c27fdf39c252 (patch) | |
tree | f9f69fac41d66540a37a33808714d055d702328f /mm/vmalloc.c | |
parent | 934352f214b3251eb0793c1209d346595a661d80 (diff) | |
parent | 7f0f598a0069d1ab072375965a4b69137233169c (diff) |
Merge branch 'linus' into sched/core
Conflicts:
kernel/Makefile
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 66fad3fc02b1..ba6b0f5f7fac 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -592,6 +592,8 @@ static void free_unmap_vmap_area_addr(unsigned long addr) | |||
592 | 592 | ||
593 | #define VMAP_BLOCK_SIZE (VMAP_BBMAP_BITS * PAGE_SIZE) | 593 | #define VMAP_BLOCK_SIZE (VMAP_BBMAP_BITS * PAGE_SIZE) |
594 | 594 | ||
595 | static bool vmap_initialized __read_mostly = false; | ||
596 | |||
595 | struct vmap_block_queue { | 597 | struct vmap_block_queue { |
596 | spinlock_t lock; | 598 | spinlock_t lock; |
597 | struct list_head free; | 599 | struct list_head free; |
@@ -828,6 +830,9 @@ void vm_unmap_aliases(void) | |||
828 | int cpu; | 830 | int cpu; |
829 | int flush = 0; | 831 | int flush = 0; |
830 | 832 | ||
833 | if (unlikely(!vmap_initialized)) | ||
834 | return; | ||
835 | |||
831 | for_each_possible_cpu(cpu) { | 836 | for_each_possible_cpu(cpu) { |
832 | struct vmap_block_queue *vbq = &per_cpu(vmap_block_queue, cpu); | 837 | struct vmap_block_queue *vbq = &per_cpu(vmap_block_queue, cpu); |
833 | struct vmap_block *vb; | 838 | struct vmap_block *vb; |
@@ -942,6 +947,8 @@ void __init vmalloc_init(void) | |||
942 | INIT_LIST_HEAD(&vbq->dirty); | 947 | INIT_LIST_HEAD(&vbq->dirty); |
943 | vbq->nr_dirty = 0; | 948 | vbq->nr_dirty = 0; |
944 | } | 949 | } |
950 | |||
951 | vmap_initialized = true; | ||
945 | } | 952 | } |
946 | 953 | ||
947 | void unmap_kernel_range(unsigned long addr, unsigned long size) | 954 | void unmap_kernel_range(unsigned long addr, unsigned long size) |