ia64/xen-unstable

changeset 74:cc3048fbafd8

bitkeeper revision 1.7.3.49 (3e0c2489ydVVZ3GITjahg_tKSLWCGA)

kmalloc bug fix
author lynx@idefix.cl.cam.ac.uk
date Fri Dec 27 09:59:37 2002 +0000 (2002-12-27)
parents 4900a90a3842
children dd6547801b23
files xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c
line diff
     1.1 --- a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c	Thu Dec 26 12:11:13 2002 +0000
     1.2 +++ b/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c	Fri Dec 27 09:59:37 2002 +0000
     1.3 @@ -128,7 +128,7 @@ static void create_proc_dom_entries(int 
     1.4  
     1.5      snprintf(dir_name, MAX_LEN, "%s%d", DOM_DIR, dom);
     1.6  
     1.7 -    dom_data = (dom_procdata_t *)kmalloc(GFP_KERNEL, 128);
     1.8 +    dom_data = (dom_procdata_t *)kmalloc(sizeof(proc_domdata_t), GFP_KERNEL);
     1.9      dom_data->domain = dom;
    1.10  
    1.11      dir = proc_mkdir(dir_name, xeno_base);
    1.12 @@ -215,7 +215,7 @@ static int dom_map_mem(unsigned int dom,
    1.13                  file->nlink = 1;
    1.14                  file->proc_fops = &dom_mem_ops;
    1.15  
    1.16 -                memdata = (proc_memdata_t *)kmalloc(GFP_KERNEL, sizeof(proc_memdata_t));
    1.17 +                memdata = (proc_memdata_t *)kmalloc(sizeof(proc_memdata_t), GFP_KERNEL);
    1.18                  memdata->pfn = pfn;
    1.19                  memdata->tot_pages = tot_pages;
    1.20                  file->data = memdata;
     2.1 --- a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c	Thu Dec 26 12:11:13 2002 +0000
     2.2 +++ b/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c	Fri Dec 27 09:59:37 2002 +0000
     2.3 @@ -184,8 +184,8 @@ unsigned long direct_mmap(unsigned long 
     2.4      /* add node on the list of directly mapped areas, make sure the
     2.5  	 * list remains sorted.
     2.6  	 */ 
     2.7 -    //dmmap = (direct_mmap_node_t *)kmalloc(GFP_KERNEL, sizeof(direct_mmap_node_t));
     2.8 -    dmmap = (direct_mmap_node_t *)kmalloc(GFP_KERNEL, KMALLOC_SIZE);
     2.9 +    //dmmap = (direct_mmap_node_t *)kmalloc(sizeof(direct_mmap_node_t), GFP_KERNEL);
    2.10 +    dmmap = (direct_mmap_node_t *)kmalloc(KMALLOC_SIZE, GFP_KERNEL);
    2.11      dmmap->vm_start = addr;
    2.12      dmmap->vm_end = addr + size;
    2.13  	entry = find_direct(&current->mm->context.direct_list, addr);