]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - mm/vmalloc.c
x86, AMD, MCE thresholding: Fix the MCi_MISCj iteration order
[net-next-2.6.git] / mm / vmalloc.c
index 8b5e4370540be67f1abcb2cc884a3ce82f46bf1a..6b8889da69a60612301c2bd26244ae0f3e1e1966 100644 (file)
@@ -31,6 +31,7 @@
 #include <asm/tlbflush.h>
 #include <asm/shmparam.h>
 
+bool vmap_lazy_unmap __read_mostly = true;
 
 /*** Page table manipulation functions ***/
 
@@ -502,6 +503,9 @@ static unsigned long lazy_max_pages(void)
 {
        unsigned int log;
 
+       if (!vmap_lazy_unmap)
+               return 0;
+
        log = fls(num_online_cpus());
 
        return log * (32UL * 1024 * 1024 / PAGE_SIZE);
@@ -2437,8 +2441,11 @@ static int vmalloc_open(struct inode *inode, struct file *file)
        unsigned int *ptr = NULL;
        int ret;
 
-       if (NUMA_BUILD)
+       if (NUMA_BUILD) {
                ptr = kmalloc(nr_node_ids * sizeof(unsigned int), GFP_KERNEL);
+               if (ptr == NULL)
+                       return -ENOMEM;
+       }
        ret = seq_open(file, &vmalloc_op);
        if (!ret) {
                struct seq_file *m = file->private_data;