lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450741676-5865-3-git-send-email-viro@ZenIV.linux.org.uk>
Date:	Mon, 21 Dec 2015 23:46:36 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	linux-kernel@...r.kernel.org
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [POC][PATCH 03/83] switch get_zeroed_page() to returning void *

From: Al Viro <viro@...iv.linux.org.uk>

Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
 arch/arm64/kernel/vdso.c                |  2 +-
 arch/ia64/hp/sim/simserial.c            |  2 +-
 arch/nios2/mm/init.c                    |  2 +-
 arch/s390/kernel/perf_cpum_sf.c         |  2 +-
 arch/s390/kernel/vdso.c                 |  4 ++--
 arch/s390/kvm/kvm-s390.c                |  2 +-
 arch/s390/kvm/priv.c                    |  4 ++--
 arch/s390/oprofile/hwsampler.c          |  2 +-
 arch/sh/boards/mach-hp6xx/pm.c          |  2 +-
 arch/sparc/kernel/irq_64.c              |  2 +-
 arch/sparc/kernel/pci_sun4v.c           |  2 +-
 arch/um/kernel/skas/mmu.c               |  2 +-
 arch/x86/kernel/amd_gart_64.c           |  2 +-
 drivers/char/agp/efficeon-agp.c         |  2 +-
 drivers/hsi/clients/cmt_speech.c        |  2 +-
 drivers/infiniband/hw/qib/qib_qp.c      |  2 +-
 drivers/lguest/lguest_user.c            |  2 +-
 drivers/lguest/page_tables.c            |  4 ++--
 drivers/net/wireless/libertas/debugfs.c | 30 +++++++++++++++---------------
 drivers/net/wireless/mwifiex/debugfs.c  | 28 ++++++++++++++--------------
 drivers/s390/char/sclp_ftp.c            |  2 +-
 drivers/s390/cio/qdio_main.c            |  2 +-
 drivers/s390/net/qeth_core_main.c       |  2 +-
 drivers/staging/rdma/ehca/ipz_pt_fn.c   |  2 +-
 drivers/staging/rdma/hfi1/qp.c          |  2 +-
 drivers/staging/rdma/ipath/ipath_qp.c   |  2 +-
 drivers/tty/amiserial.c                 |  2 +-
 drivers/tty/cyclades.c                  |  2 +-
 drivers/tty/serial/crisv10.c            |  2 +-
 drivers/tty/serial/serial_core.c        |  2 +-
 drivers/usb/mon/mon_bin.c               |  2 +-
 drivers/xen/xenbus/xenbus_probe.c       |  2 +-
 fs/configfs/symlink.c                   |  2 +-
 fs/kernfs/symlink.c                     |  2 +-
 include/linux/gfp.h                     |  2 +-
 mm/page_alloc.c                         |  4 ++--
 net/atm/proc.c                          |  2 +-
 net/rds/cong.c                          |  2 +-
 sound/oss/vidc.c                        |  2 +-
 39 files changed, 70 insertions(+), 70 deletions(-)

diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index 97bc68f..07e4d14 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -64,7 +64,7 @@ static int alloc_vectors_page(void)
 	int sigret_sz = __aarch32_sigret_code_end - __aarch32_sigret_code_start;
 	unsigned long vpage;
 
-	vpage = get_zeroed_page(GFP_ATOMIC);
+	vpage = (unsigned long)get_zeroed_page(GFP_ATOMIC);
 
 	if (!vpage)
 		return -ENOMEM;
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index 36b3217..6e81449 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -367,7 +367,7 @@ static int activate(struct tty_port *port, struct tty_struct *tty)
 	unsigned long flags, page;
 	int retval = 0;
 
-	page = get_zeroed_page(GFP_KERNEL);
+	page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!page)
 		return -ENOMEM;
 
diff --git a/arch/nios2/mm/init.c b/arch/nios2/mm/init.c
index e75c75d..e03a757 100644
--- a/arch/nios2/mm/init.c
+++ b/arch/nios2/mm/init.c
@@ -105,7 +105,7 @@ static int alloc_kuser_page(void)
 	int kuser_sz = __kuser_helper_end - __kuser_helper_start;
 	unsigned long vpage;
 
-	vpage = get_zeroed_page(GFP_ATOMIC);
+	vpage = (unsigned long)get_zeroed_page(GFP_ATOMIC);
 	if (!vpage)
 		return -ENOMEM;
 
diff --git a/arch/s390/kernel/perf_cpum_sf.c b/arch/s390/kernel/perf_cpum_sf.c
index 0dca133..9698d67 100644
--- a/arch/s390/kernel/perf_cpum_sf.c
+++ b/arch/s390/kernel/perf_cpum_sf.c
@@ -158,7 +158,7 @@ static int alloc_sample_data_block(unsigned long *sdbt, gfp_t gfp_flags)
 	unsigned long sdb, *trailer;
 
 	/* Allocate and initialize sample-data-block */
-	sdb = get_zeroed_page(gfp_flags);
+	sdb = (unsigned long)get_zeroed_page(gfp_flags);
 	if (!sdb)
 		return -ENOMEM;
 	trailer = trailer_entry_ptr(sdb);
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index 2518d55..d0ec7748 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -102,8 +102,8 @@ int vdso_alloc_per_cpu(struct _lowcore *lowcore)
 		return 0;
 
 	segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER);
-	page_table = get_zeroed_page(GFP_KERNEL | GFP_DMA);
-	page_frame = get_zeroed_page(GFP_KERNEL);
+	page_table = (unsigned long)get_zeroed_page(GFP_KERNEL | GFP_DMA);
+	page_frame = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!segment_table || !page_table || !page_frame)
 		goto out;
 
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 940dd42..2b7580c 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -1396,7 +1396,7 @@ void kvm_s390_vcpu_unsetup_cmma(struct kvm_vcpu *vcpu)
 
 int kvm_s390_vcpu_setup_cmma(struct kvm_vcpu *vcpu)
 {
-	vcpu->arch.sie_block->cbrlo = get_zeroed_page(GFP_KERNEL);
+	vcpu->arch.sie_block->cbrlo = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!vcpu->arch.sie_block->cbrlo)
 		return -ENOMEM;
 
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index 9ed1a25..af22195 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -538,7 +538,7 @@ static int handle_stsi(struct kvm_vcpu *vcpu)
 	switch (fc) {
 	case 1: /* same handling for 1 and 2 */
 	case 2:
-		mem = get_zeroed_page(GFP_KERNEL);
+		mem = (unsigned long)get_zeroed_page(GFP_KERNEL);
 		if (!mem)
 			goto out_no_data;
 		if (stsi((void *) mem, fc, sel1, sel2))
@@ -547,7 +547,7 @@ static int handle_stsi(struct kvm_vcpu *vcpu)
 	case 3:
 		if (sel1 != 2 || sel2 != 2)
 			goto out_no_data;
-		mem = get_zeroed_page(GFP_KERNEL);
+		mem = (unsigned long)get_zeroed_page(GFP_KERNEL);
 		if (!mem)
 			goto out_no_data;
 		handle_stsi_3_2_2(vcpu, (void *) mem);
diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c
index 62f6aa2..24165f3 100644
--- a/arch/s390/oprofile/hwsampler.c
+++ b/arch/s390/oprofile/hwsampler.c
@@ -279,7 +279,7 @@ static int allocate_sdbt(int cpu)
 
 		for (k = 0; k < num_sdb; k++) {
 			/* get and set SDB page */
-			sdb = get_zeroed_page(GFP_KERNEL);
+			sdb = (unsigned long)get_zeroed_page(GFP_KERNEL);
 
 			mutex_lock(&hws_sem_oom);
 			/* OOM killer might have been activated */
diff --git a/arch/sh/boards/mach-hp6xx/pm.c b/arch/sh/boards/mach-hp6xx/pm.c
index 83b3302..1a8aacd 100644
--- a/arch/sh/boards/mach-hp6xx/pm.c
+++ b/arch/sh/boards/mach-hp6xx/pm.c
@@ -68,7 +68,7 @@ static void pm_enter(void)
 
 	/* set interrupt handler */
 	asm volatile("stc vbr, %0" : "=r" (vbr_old));
-	vbr_new = get_zeroed_page(GFP_ATOMIC);
+	vbr_new = (unsigned long)get_zeroed_page(GFP_ATOMIC);
 	udelay(50);
 	memcpy((void*)(vbr_new + INTR_OFFSET),
 	       &wakeup_start, &wakeup_end - &wakeup_start);
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
index e22416c..24847b2 100644
--- a/arch/sparc/kernel/irq_64.c
+++ b/arch/sparc/kernel/irq_64.c
@@ -1037,7 +1037,7 @@ static void __init init_cpu_send_mondo_info(struct trap_per_cpu *tb)
 
 	BUILD_BUG_ON((NR_CPUS * sizeof(u16)) > (PAGE_SIZE - 64));
 
-	page = get_zeroed_page(GFP_KERNEL);
+	page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!page) {
 		prom_printf("SUN4V: Error, cannot allocate cpu mondo page.\n");
 		prom_halt();
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
index 1a678fc..3eb8907 100644
--- a/arch/sparc/kernel/pci_sun4v.c
+++ b/arch/sparc/kernel/pci_sun4v.c
@@ -938,7 +938,7 @@ static int pci_sun4v_probe(struct platform_device *op)
 	err = -ENOMEM;
 	if (!iommu_batch_initialized) {
 		for_each_possible_cpu(i) {
-			unsigned long page = get_zeroed_page(GFP_KERNEL);
+			unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 
 			if (!page)
 				goto out_err;
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index ef2762b..6898b23 100644
--- a/arch/um/kernel/skas/mmu.c
+++ b/arch/um/kernel/skas/mmu.c
@@ -54,7 +54,7 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)
 	unsigned long stack = 0;
 	int ret = -ENOMEM;
 
-	stack = get_zeroed_page(GFP_KERNEL);
+	stack = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (stack == 0)
 		goto out;
 
diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c
index 8e3842f..2ef2933 100644
--- a/arch/x86/kernel/amd_gart_64.c
+++ b/arch/x86/kernel/amd_gart_64.c
@@ -841,7 +841,7 @@ int __init gart_iommu_init(void)
 	 * Any prefetches that hit unmapped entries won't get an bus abort
 	 * then. (P2P bridge may be prefetching on DMA reads).
 	 */
-	scratch = get_zeroed_page(GFP_KERNEL);
+	scratch = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!scratch)
 		panic("Cannot allocate iommu scratch page");
 	gart_unmapped_entry = GPTE_ENCODE(__pa(scratch));
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c
index 1416595..c3d0d44 100644
--- a/drivers/char/agp/efficeon-agp.c
+++ b/drivers/char/agp/efficeon-agp.c
@@ -214,7 +214,7 @@ static int efficeon_create_gatt_table(struct agp_bridge_data *bridge)
 		page = efficeon_private.l1_table[index];
 		BUG_ON(page);
 
-		page = get_zeroed_page(GFP_KERNEL);
+		page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 		if (!page) {
 			efficeon_free_gatt_table(agp_bridge);
 			return -ENOMEM;
diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c
index 7fa47a8..96d98fc 100644
--- a/drivers/hsi/clients/cmt_speech.c
+++ b/drivers/hsi/clients/cmt_speech.c
@@ -1300,7 +1300,7 @@ static int cs_char_open(struct inode *unused, struct file *file)
 	cs_char_data.dataind_pending = 0;
 	spin_unlock_bh(&cs_char_data.lock);
 
-	p = get_zeroed_page(GFP_KERNEL);
+	p = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!p) {
 		ret = -ENOMEM;
 		goto out2;
diff --git a/drivers/infiniband/hw/qib/qib_qp.c b/drivers/infiniband/hw/qib/qib_qp.c
index 6ff0112..0daa083 100644
--- a/drivers/infiniband/hw/qib/qib_qp.c
+++ b/drivers/infiniband/hw/qib/qib_qp.c
@@ -102,7 +102,7 @@ static u32 credit_table[31] = {
 
 static void get_map_page(struct qib_qpn_table *qpt, struct qpn_map *map)
 {
-	unsigned long page = get_zeroed_page(GFP_KERNEL);
+	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 
 	/*
 	 * Free the page if someone raced with us installing it.
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c
index 328e249..fe2e859 100644
--- a/drivers/lguest/lguest_user.c
+++ b/drivers/lguest/lguest_user.c
@@ -170,7 +170,7 @@ static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip)
 	 * We need a complete page for the Guest registers: they are accessible
 	 * to the Guest and we can only grant it access to whole pages.
 	 */
-	cpu->regs_page = get_zeroed_page(GFP_KERNEL);
+	cpu->regs_page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!cpu->regs_page)
 		return -ENOMEM;
 
diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c
index 012b10a..de1c8ac 100644
--- a/drivers/lguest/page_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -319,7 +319,7 @@ static pte_t *find_spte(struct lg_cpu *cpu, unsigned long vaddr, bool allocate,
 		if (!allocate)
 			return NULL;
 
-		ptepage = get_zeroed_page(GFP_KERNEL);
+		ptepage = (unsigned long)get_zeroed_page(GFP_KERNEL);
 		/*
 		 * This is not really the Guest's fault, but killing it is
 		 * simple for this corner case.
@@ -351,7 +351,7 @@ static pte_t *find_spte(struct lg_cpu *cpu, unsigned long vaddr, bool allocate,
 		if (!allocate)
 			return NULL;
 
-		ptepage = get_zeroed_page(GFP_KERNEL);
+		ptepage = (unsigned long)get_zeroed_page(GFP_KERNEL);
 
 		/*
 		 * This is not really the Guest's fault, but killing it is
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index f79c11f..12da2fa 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -34,7 +34,7 @@ static ssize_t lbs_dev_info(struct file *file, char __user *userbuf,
 {
 	struct lbs_private *priv = file->private_data;
 	size_t pos = 0;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	ssize_t res;
 	if (!buf)
@@ -59,7 +59,7 @@ static ssize_t lbs_sleepparams_write(struct file *file,
 	ssize_t buf_size, ret;
 	struct sleep_params sp;
 	int p1, p2, p3, p4, p5, p6;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
@@ -99,7 +99,7 @@ static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf,
 	ssize_t ret;
 	size_t pos = 0;
 	struct sleep_params sp;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
@@ -127,7 +127,7 @@ static ssize_t lbs_host_sleep_write(struct file *file,
 	struct lbs_private *priv = file->private_data;
 	ssize_t buf_size, ret;
 	int host_sleep;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
@@ -172,7 +172,7 @@ static ssize_t lbs_host_sleep_read(struct file *file, char __user *userbuf,
 	struct lbs_private *priv = file->private_data;
 	ssize_t ret;
 	size_t pos = 0;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
@@ -449,7 +449,7 @@ static ssize_t lbs_rdmac_read(struct file *file, char __user *userbuf,
 	struct lbs_private *priv = file->private_data;
 	ssize_t pos = 0;
 	int ret;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	u32 val = 0;
 
@@ -473,7 +473,7 @@ static ssize_t lbs_rdmac_write(struct file *file,
 {
 	struct lbs_private *priv = file->private_data;
 	ssize_t res, buf_size;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
@@ -498,7 +498,7 @@ static ssize_t lbs_wrmac_write(struct file *file,
 	struct lbs_private *priv = file->private_data;
 	ssize_t res, buf_size;
 	u32 offset, value;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
@@ -530,7 +530,7 @@ static ssize_t lbs_rdbbp_read(struct file *file, char __user *userbuf,
 	struct lbs_private *priv = file->private_data;
 	ssize_t pos = 0;
 	int ret;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	u32 val;
 
@@ -555,7 +555,7 @@ static ssize_t lbs_rdbbp_write(struct file *file,
 {
 	struct lbs_private *priv = file->private_data;
 	ssize_t res, buf_size;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
@@ -580,7 +580,7 @@ static ssize_t lbs_wrbbp_write(struct file *file,
 	struct lbs_private *priv = file->private_data;
 	ssize_t res, buf_size;
 	u32 offset, value;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
@@ -612,7 +612,7 @@ static ssize_t lbs_rdrf_read(struct file *file, char __user *userbuf,
 	struct lbs_private *priv = file->private_data;
 	ssize_t pos = 0;
 	int ret;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	u32 val;
 
@@ -637,7 +637,7 @@ static ssize_t lbs_rdrf_write(struct file *file,
 {
 	struct lbs_private *priv = file->private_data;
 	ssize_t res, buf_size;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
@@ -662,7 +662,7 @@ static ssize_t lbs_wrrf_write(struct file *file,
 	struct lbs_private *priv = file->private_data;
 	ssize_t res, buf_size;
 	u32 offset, value;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
@@ -863,7 +863,7 @@ static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
 	char *p;
 	int i;
 	struct debug_data *d;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	if (!buf)
 		return -ENOMEM;
diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c
index 4ed3dba..bc23464 100644
--- a/drivers/net/wireless/mwifiex/debugfs.c
+++ b/drivers/net/wireless/mwifiex/debugfs.c
@@ -79,7 +79,7 @@ mwifiex_info_read(struct file *file, char __user *ubuf,
 	struct net_device *netdev = priv->netdev;
 	struct netdev_hw_addr *ha;
 	struct netdev_queue *txq;
-	unsigned long page = get_zeroed_page(GFP_KERNEL);
+	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *p = (char *) page, fmt[64];
 	struct mwifiex_bss_info info;
 	ssize_t ret;
@@ -201,7 +201,7 @@ mwifiex_getlog_read(struct file *file, char __user *ubuf,
 {
 	struct mwifiex_private *priv =
 		(struct mwifiex_private *) file->private_data;
-	unsigned long page = get_zeroed_page(GFP_KERNEL);
+	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *p = (char *) page;
 	ssize_t ret;
 	struct mwifiex_ds_get_stats stats;
@@ -280,7 +280,7 @@ mwifiex_histogram_read(struct file *file, char __user *ubuf,
 	ssize_t ret;
 	struct mwifiex_histogram_data *phist_data;
 	int i, value;
-	unsigned long page = get_zeroed_page(GFP_KERNEL);
+	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *p = (char *)page;
 
 	if (!p)
@@ -413,7 +413,7 @@ mwifiex_debug_read(struct file *file, char __user *ubuf,
 {
 	struct mwifiex_private *priv =
 		(struct mwifiex_private *) file->private_data;
-	unsigned long page = get_zeroed_page(GFP_KERNEL);
+	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *p = (char *) page;
 	ssize_t ret;
 
@@ -447,7 +447,7 @@ static ssize_t
 mwifiex_regrdwr_write(struct file *file,
 		      const char __user *ubuf, size_t count, loff_t *ppos)
 {
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *) addr;
 	size_t buf_size = min_t(size_t, count, PAGE_SIZE - 1);
 	int ret;
@@ -491,7 +491,7 @@ mwifiex_regrdwr_read(struct file *file, char __user *ubuf,
 {
 	struct mwifiex_private *priv =
 		(struct mwifiex_private *) file->private_data;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *) addr;
 	int pos = 0, ret = 0;
 	u32 reg_value;
@@ -545,7 +545,7 @@ mwifiex_debug_mask_read(struct file *file, char __user *ubuf,
 {
 	struct mwifiex_private *priv =
 		(struct mwifiex_private *)file->private_data;
-	unsigned long page = get_zeroed_page(GFP_KERNEL);
+	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)page;
 	size_t ret = 0;
 	int pos = 0;
@@ -572,7 +572,7 @@ mwifiex_debug_mask_write(struct file *file, const char __user *ubuf,
 	int ret;
 	unsigned long debug_mask;
 	struct mwifiex_private *priv = (void *)file->private_data;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (void *)addr;
 	size_t buf_size = min(count, (size_t)(PAGE_SIZE - 1));
 
@@ -609,7 +609,7 @@ mwifiex_memrw_write(struct file *file, const char __user *ubuf, size_t count,
 	struct mwifiex_ds_mem_rw mem_rw;
 	u16 cmd_action;
 	struct mwifiex_private *priv = (void *)file->private_data;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (void *)addr;
 	size_t buf_size = min(count, (size_t)(PAGE_SIZE - 1));
 
@@ -658,7 +658,7 @@ mwifiex_memrw_read(struct file *file, char __user *ubuf,
 		   size_t count, loff_t *ppos)
 {
 	struct mwifiex_private *priv = (void *)file->private_data;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	int ret, pos = 0;
 
@@ -686,7 +686,7 @@ static ssize_t
 mwifiex_rdeeprom_write(struct file *file,
 		       const char __user *ubuf, size_t count, loff_t *ppos)
 {
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *) addr;
 	size_t buf_size = min_t(size_t, count, PAGE_SIZE - 1);
 	int ret = 0;
@@ -729,7 +729,7 @@ mwifiex_rdeeprom_read(struct file *file, char __user *ubuf,
 {
 	struct mwifiex_private *priv =
 		(struct mwifiex_private *) file->private_data;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *) addr;
 	int pos, ret, i;
 	u8 value[MAX_EEPROM_DATA];
@@ -771,7 +771,7 @@ mwifiex_hscfg_write(struct file *file, const char __user *ubuf,
 		    size_t count, loff_t *ppos)
 {
 	struct mwifiex_private *priv = (void *)file->private_data;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	size_t buf_size = min_t(size_t, count, PAGE_SIZE - 1);
 	int ret, arg_num;
@@ -836,7 +836,7 @@ mwifiex_hscfg_read(struct file *file, char __user *ubuf,
 		   size_t count, loff_t *ppos)
 {
 	struct mwifiex_private *priv = (void *)file->private_data;
-	unsigned long addr = get_zeroed_page(GFP_KERNEL);
+	unsigned long addr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	char *buf = (char *)addr;
 	int pos, ret;
 	struct mwifiex_ds_hs_cfg hscfg;
diff --git a/drivers/s390/char/sclp_ftp.c b/drivers/s390/char/sclp_ftp.c
index 66bf759..726e736 100644
--- a/drivers/s390/char/sclp_ftp.c
+++ b/drivers/s390/char/sclp_ftp.c
@@ -248,7 +248,7 @@ int sclp_ftp_startup(void)
 		return rc;
 
 #ifdef DEBUG
-	info = get_zeroed_page(GFP_KERNEL);
+	info = (unsigned long)get_zeroed_page(GFP_KERNEL);
 
 	if (info != 0) {
 		struct sysinfo_2_2_2 *info222 = (struct sysinfo_2_2_2 *)info;
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index 86c4599..0b1ffc2 100644
--- a/drivers/s390/cio/qdio_main.c
+++ b/drivers/s390/cio/qdio_main.c
@@ -1282,7 +1282,7 @@ int qdio_allocate(struct qdio_initialize *init_data)
 	 * qdio_establish. In case of low memory and swap on a zfcp disk
 	 * we may not be able to allocate memory otherwise.
 	 */
-	irq_ptr->chsc_page = get_zeroed_page(GFP_KERNEL);
+	irq_ptr->chsc_page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!irq_ptr->chsc_page)
 		goto out_rel;
 
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index c753f8f..b6bd54c 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -3160,7 +3160,7 @@ static int qeth_query_setdiagass(struct qeth_card *card)
 
 static void qeth_get_trap_id(struct qeth_card *card, struct qeth_trap_id *tid)
 {
-	unsigned long info = get_zeroed_page(GFP_KERNEL);
+	unsigned long info = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	struct sysinfo_2_2_2 *info222 = (struct sysinfo_2_2_2 *)info;
 	struct sysinfo_3_2_2 *info322 = (struct sysinfo_3_2_2 *)info;
 	struct ccw_dev_id ccwid;
diff --git a/drivers/staging/rdma/ehca/ipz_pt_fn.c b/drivers/staging/rdma/ehca/ipz_pt_fn.c
index 0742740..267df34 100644
--- a/drivers/staging/rdma/ehca/ipz_pt_fn.c
+++ b/drivers/staging/rdma/ehca/ipz_pt_fn.c
@@ -140,7 +140,7 @@ static int alloc_small_queue_page(struct ipz_queue *queue, struct ehca_pd *pd)
 		if (!page)
 			goto out;
 
-		page->page = get_zeroed_page(GFP_KERNEL);
+		page->page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 		if (!page->page) {
 			kmem_cache_free(small_qp_cache, page);
 			goto out;
diff --git a/drivers/staging/rdma/hfi1/qp.c b/drivers/staging/rdma/hfi1/qp.c
index 6310b3c..4445610 100644
--- a/drivers/staging/rdma/hfi1/qp.c
+++ b/drivers/staging/rdma/hfi1/qp.c
@@ -120,7 +120,7 @@ static const u16 credit_table[31] = {
 
 static void get_map_page(struct hfi1_qpn_table *qpt, struct qpn_map *map)
 {
-	unsigned long page = get_zeroed_page(GFP_KERNEL);
+	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 
 	/*
 	 * Free the page if someone raced with us installing it.
diff --git a/drivers/staging/rdma/ipath/ipath_qp.c b/drivers/staging/rdma/ipath/ipath_qp.c
index 8ca0b76..51fa380 100644
--- a/drivers/staging/rdma/ipath/ipath_qp.c
+++ b/drivers/staging/rdma/ipath/ipath_qp.c
@@ -85,7 +85,7 @@ static u32 credit_table[31] = {
 
 static void get_map_page(struct ipath_qp_table *qpt, struct qpn_map *map)
 {
-	unsigned long page = get_zeroed_page(GFP_KERNEL);
+	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	unsigned long flags;
 
 	/*
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index d245a36..ec87a8c 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -520,7 +520,7 @@ static int startup(struct tty_struct *tty, struct serial_state *info)
 	int	retval=0;
 	unsigned long page;
 
-	page = get_zeroed_page(GFP_KERNEL);
+	page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!page)
 		return -ENOMEM;
 
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index 3310706..7e3bee8 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -1273,7 +1273,7 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 	card = info->card;
 	channel = info->line - card->first_line;
 
-	page = get_zeroed_page(GFP_KERNEL);
+	page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!page)
 		return -ENOMEM;
 
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c
index 8e792c1..82a868d 100644
--- a/drivers/tty/serial/crisv10.c
+++ b/drivers/tty/serial/crisv10.c
@@ -2593,7 +2593,7 @@ startup(struct e100_serial * info)
 	unsigned long xmit_page;
 	int i;
 
-	xmit_page = get_zeroed_page(GFP_KERNEL);
+	xmit_page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!xmit_page)
 		return -ENOMEM;
 
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 9bc0284..3cdd727 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -152,7 +152,7 @@ static int uart_port_startup(struct tty_struct *tty, struct uart_state *state,
 	 */
 	if (!state->xmit.buf) {
 		/* This is protected by the per port mutex */
-		page = get_zeroed_page(GFP_KERNEL);
+		page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 		if (!page)
 			return -ENOMEM;
 
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index bd463eb..cdc68e5 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -1308,7 +1308,7 @@ static int mon_alloc_buff(struct mon_pgmap *map, int npages)
 	unsigned long vaddr;
 
 	for (n = 0; n < npages; n++) {
-		vaddr = get_zeroed_page(GFP_KERNEL);
+		vaddr = (unsigned long)get_zeroed_page(GFP_KERNEL);
 		if (vaddr == 0) {
 			while (n-- != 0)
 				free_page(map[n].ptr);
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 43eae6a..3e43b5a 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -707,7 +707,7 @@ static int __init xenstored_local_init(void)
 	struct evtchn_alloc_unbound alloc_unbound;
 
 	/* Allocate Xenstore page */
-	page = get_zeroed_page(GFP_KERNEL);
+	page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!page)
 		goto out_err;
 
diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c
index a04bf59..f8f4d9a 100644
--- a/fs/configfs/symlink.c
+++ b/fs/configfs/symlink.c
@@ -281,7 +281,7 @@ static int configfs_getlink(struct dentry *dentry, char * path)
 
 static const char *configfs_follow_link(struct dentry *dentry, void **cookie)
 {
-	unsigned long page = get_zeroed_page(GFP_KERNEL);
+	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	int error;
 
 	if (!page)
diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c
index e98d520..9662b66 100644
--- a/fs/kernfs/symlink.c
+++ b/fs/kernfs/symlink.c
@@ -115,7 +115,7 @@ static int kernfs_getlink(struct dentry *dentry, char *path)
 static const char *kernfs_iop_follow_link(struct dentry *dentry, void **cookie)
 {
 	int error = -ENOMEM;
-	unsigned long page = get_zeroed_page(GFP_KERNEL);
+	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!page)
 		return ERR_PTR(-ENOMEM);
 	error = kernfs_getlink(dentry, (char *)page);
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index df5c0a0..f4304c1 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -474,7 +474,7 @@ extern struct page *alloc_kmem_pages_node(int nid, gfp_t gfp_mask,
 					  unsigned int order);
 
 extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
-extern unsigned long get_zeroed_page(gfp_t gfp_mask);
+extern void *get_zeroed_page(gfp_t gfp_mask);
 
 void *alloc_pages_exact(size_t size, gfp_t gfp_mask);
 void free_pages_exact(void *virt, size_t size);
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 11014f3..aa37489 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3274,9 +3274,9 @@ unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order)
 }
 EXPORT_SYMBOL(__get_free_pages);
 
-unsigned long get_zeroed_page(gfp_t gfp_mask)
+void *get_zeroed_page(gfp_t gfp_mask)
 {
-	return __get_free_pages(gfp_mask | __GFP_ZERO, 0);
+	return (void *)__get_free_pages(gfp_mask | __GFP_ZERO, 0);
 }
 EXPORT_SYMBOL(get_zeroed_page);
 
diff --git a/net/atm/proc.c b/net/atm/proc.c
index 2523c58..cf8993a 100644
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -382,7 +382,7 @@ static ssize_t proc_dev_atm_read(struct file *file, char __user *buf,
 
 	if (count == 0)
 		return 0;
-	page = get_zeroed_page(GFP_KERNEL);
+	page = (unsigned long)get_zeroed_page(GFP_KERNEL);
 	if (!page)
 		return -ENOMEM;
 	dev = PDE_DATA(file_inode(file));
diff --git a/net/rds/cong.c b/net/rds/cong.c
index 15d4725..6f91538 100644
--- a/net/rds/cong.c
+++ b/net/rds/cong.c
@@ -149,7 +149,7 @@ static struct rds_cong_map *rds_cong_from_addr(__be32 addr)
 	INIT_LIST_HEAD(&map->m_conn_list);
 
 	for (i = 0; i < RDS_CONG_MAP_PAGES; i++) {
-		zp = get_zeroed_page(GFP_KERNEL);
+		zp = (unsigned long)get_zeroed_page(GFP_KERNEL);
 		if (zp == 0)
 			goto out;
 		map->m_page_addrs[i] = zp;
diff --git a/sound/oss/vidc.c b/sound/oss/vidc.c
index b73fcc3..3196f35 100644
--- a/sound/oss/vidc.c
+++ b/sound/oss/vidc.c
@@ -468,7 +468,7 @@ static void __init attach_vidc(struct address_info *hw_config)
 		goto mixer_failed;
 
 	for (i = 0; i < 2; i++) {
-		dma_buf[i] = get_zeroed_page(GFP_KERNEL);
+		dma_buf[i] = (unsigned long)get_zeroed_page(GFP_KERNEL);
 		if (!dma_buf[i]) {
 			printk(KERN_ERR "%s: can't allocate required buffers\n",
 				name);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ