From 7d582abf4d58d5cb61eb9076f4aa94f27c46cdb7 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 23 Nov 2007 15:17:41 -0500 Subject: [PATCH] Import 2.1.133pre1 --- Makefile | 2 +- arch/i386/kernel/irq.c | 2 +- net/wanrouter/wanmain.c | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 39eda5fa88b7..b244ba9e0ea7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 1 -SUBLEVEL = 132 +SUBLEVEL = 133 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c index b1fbe0ebae2d..3844fa00c4a1 100644 --- a/arch/i386/kernel/irq.c +++ b/arch/i386/kernel/irq.c @@ -709,7 +709,7 @@ void enable_irq(unsigned int irq) spin_lock_irqsave(&irq_controller_lock, flags); switch (irq_desc[irq].depth) { case 1: - irq_desc[irq].status &= ~IRQ_DISABLED; + irq_desc[irq].status &= ~(IRQ_DISABLED | IRQ_INPROGRESS); irq_desc[irq].handler->enable(irq); /* fall throught */ default: diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index cce9df8c9cf5..5be5c62efb36 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c @@ -27,6 +27,9 @@ * May 17, 1998 K. Baranowski Fixed SNAP encapsulation in wan_encapsulate * Dec 15, 1998 Arnaldo Melo support for firmwares of up to 128000 bytes * check wandev->setup return value +* Dec 22, 1998 Arnaldo Melo vmalloc/vfree used in device_setup to allocate +* kernel memory and copy configuration data to +* kernel space (for big firmwares) *****************************************************************************/ #include /* offsetof(), etc. */ @@ -34,6 +37,7 @@ #include #include /* support for loadable modules */ #include /* kmalloc(), kfree() */ +#include /* vmalloc(), vfree() */ #include /* verify_area(), etc. */ #include /* inline mem*, str* functions */ #include /* kernel <-> user copy */ @@ -464,7 +468,7 @@ static int device_setup (wan_device_t* wandev, wandev_conf_t* u_conf) if(conf->data_size > 128000 || conf->data_size < 0){ goto bail; } - data = kmalloc(conf->data_size, GFP_KERNEL); + data = vmalloc(conf->data_size); if (data) { if(!copy_from_user(data, conf->data, conf->data_size)) @@ -474,9 +478,8 @@ static int device_setup (wan_device_t* wandev, wandev_conf_t* u_conf) } else err = -ENOBUFS; + vfree(data); } - if (data) - kfree(data); } bail: kfree(conf); -- 2.39.5