]> err.no Git - linux-2.6/blobdiff - kernel/kexec.c
[PATCH] gfp_t: kernel/*
[linux-2.6] / kernel / kexec.c
index 7843548cf2d9576fcc67deeabbb1b1d41f14ddde..36c5d9cd4cc14b8b0f342600c69b7a653132f1f1 100644 (file)
@@ -90,7 +90,7 @@ int kexec_should_crash(struct task_struct *p)
 static int kimage_is_destination_range(struct kimage *image,
                                       unsigned long start, unsigned long end);
 static struct page *kimage_alloc_page(struct kimage *image,
-                                      unsigned int gfp_mask,
+                                      gfp_t gfp_mask,
                                       unsigned long dest);
 
 static int do_kimage_alloc(struct kimage **rimage, unsigned long entry,
@@ -241,7 +241,7 @@ static int kimage_normal_alloc(struct kimage **rimage, unsigned long entry,
 
 static int kimage_crash_alloc(struct kimage **rimage, unsigned long entry,
                                unsigned long nr_segments,
-                               struct kexec_segment *segments)
+                               struct kexec_segment __user *segments)
 {
        int result;
        struct kimage *image;
@@ -326,8 +326,7 @@ static int kimage_is_destination_range(struct kimage *image,
        return 0;
 }
 
-static struct page *kimage_alloc_pages(unsigned int gfp_mask,
-                                       unsigned int order)
+static struct page *kimage_alloc_pages(gfp_t gfp_mask, unsigned int order)
 {
        struct page *pages;
 
@@ -650,11 +649,11 @@ static kimage_entry_t *kimage_dst_used(struct kimage *image,
                }
        }
 
-       return 0;
+       return NULL;
 }
 
 static struct page *kimage_alloc_page(struct kimage *image,
-                                       unsigned int gfp_mask,
+                                       gfp_t gfp_mask,
                                        unsigned long destination)
 {
        /*
@@ -696,7 +695,7 @@ static struct page *kimage_alloc_page(struct kimage *image,
                /* Allocate a page, if we run out of memory give up */
                page = kimage_alloc_pages(gfp_mask, 0);
                if (!page)
-                       return 0;
+                       return NULL;
                /* If the page cannot be used file it away */
                if (page_to_pfn(page) >
                                (KEXEC_SOURCE_MEMORY_LIMIT >> PAGE_SHIFT)) {
@@ -754,7 +753,7 @@ static int kimage_load_normal_segment(struct kimage *image,
        unsigned long maddr;
        unsigned long ubytes, mbytes;
        int result;
-       unsigned char *buf;
+       unsigned char __user *buf;
 
        result = 0;
        buf = segment->buf;
@@ -818,7 +817,7 @@ static int kimage_load_crash_segment(struct kimage *image,
        unsigned long maddr;
        unsigned long ubytes, mbytes;
        int result;
-       unsigned char *buf;
+       unsigned char __user *buf;
 
        result = 0;
        buf = segment->buf;