aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-01-03 16:03:07 -0500
committerLen Brown <len.brown@intel.com>2006-01-03 16:03:07 -0500
commitd78fef14c2218ba9666687aabc57392c54569048 (patch)
tree273c138af78d03b65ac609aea44917e40f54f0ce
parent04348e69e7e78ad69a09b2e1157f628d6c764370 (diff)
parent88026842b0a760145aa71d69e74fbc9ec118ca44 (diff)
Pull linus into release branch
-rw-r--r--Makefile2
-rw-r--r--arch/i386/kernel/process.c4
-rw-r--r--drivers/input/joystick/warrior.c2
-rw-r--r--drivers/macintosh/therm_pm72.c6
-rw-r--r--drivers/serial/pxa.c4
-rw-r--r--drivers/usb/input/kbtab.c2
-rw-r--r--drivers/usb/input/wacom.c2
-rw-r--r--fs/proc/generic.c47
-rw-r--r--include/asm-i386/param.h3
-rw-r--r--include/asm-x86_64/param.h3
-rw-r--r--kernel/sysctl.c29
-rw-r--r--mm/mempolicy.c4
12 files changed, 57 insertions, 51 deletions
diff --git a/Makefile b/Makefile
index f937f1f4595e..497884d3d556 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 15 3SUBLEVEL = 15
4EXTRAVERSION =-rc7 4EXTRAVERSION =
5NAME=Sliding Snow Leopard 5NAME=Sliding Snow Leopard
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index df6c2bcde067..2333aead0563 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -554,7 +554,9 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
554 struct pt_regs ptregs; 554 struct pt_regs ptregs;
555 555
556 ptregs = *(struct pt_regs *) 556 ptregs = *(struct pt_regs *)
557 ((unsigned long)tsk->thread_info+THREAD_SIZE - sizeof(ptregs)); 557 ((unsigned long)tsk->thread_info +
558 /* see comments in copy_thread() about -8 */
559 THREAD_SIZE - sizeof(ptregs) - 8);
558 ptregs.xcs &= 0xffff; 560 ptregs.xcs &= 0xffff;
559 ptregs.xds &= 0xffff; 561 ptregs.xds &= 0xffff;
560 ptregs.xes &= 0xffff; 562 ptregs.xes &= 0xffff;
diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c
index 99a642d2a1fe..1849b176cf18 100644
--- a/drivers/input/joystick/warrior.c
+++ b/drivers/input/joystick/warrior.c
@@ -172,7 +172,7 @@ static int warrior_connect(struct serio *serio, struct serio_driver *drv)
172 input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 8); 172 input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 8);
173 input_set_abs_params(input_dev, ABS_THROTTLE, -112, 112, 0, 0); 173 input_set_abs_params(input_dev, ABS_THROTTLE, -112, 112, 0, 0);
174 input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0); 174 input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0);
175 input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0); 175 input_set_abs_params(input_dev, ABS_HAT0Y, -1, 1, 0, 0);
176 176
177 serio_set_drvdata(serio, warrior); 177 serio_set_drvdata(serio, warrior);
178 178
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index 5bb36274a5c6..190878eef990 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -923,7 +923,7 @@ static void do_monitor_cpu_combined(void)
923 if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) { 923 if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) {
924 printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n", 924 printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n",
925 temp_combi >> 16); 925 temp_combi >> 16);
926 state0->overtemp = CPU_MAX_OVERTEMP; 926 state0->overtemp += CPU_MAX_OVERTEMP / 4;
927 } else if (temp_combi > (state0->mpu.tmax << 16)) 927 } else if (temp_combi > (state0->mpu.tmax << 16))
928 state0->overtemp++; 928 state0->overtemp++;
929 else 929 else
@@ -998,7 +998,7 @@ static void do_monitor_cpu_split(struct cpu_pid_state *state)
998 printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" 998 printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum"
999 " (%d) !\n", 999 " (%d) !\n",
1000 state->index, temp >> 16); 1000 state->index, temp >> 16);
1001 state->overtemp = CPU_MAX_OVERTEMP; 1001 state->overtemp += CPU_MAX_OVERTEMP / 4;
1002 } else if (temp > (state->mpu.tmax << 16)) 1002 } else if (temp > (state->mpu.tmax << 16))
1003 state->overtemp++; 1003 state->overtemp++;
1004 else 1004 else
@@ -1060,7 +1060,7 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state)
1060 printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" 1060 printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum"
1061 " (%d) !\n", 1061 " (%d) !\n",
1062 state->index, temp >> 16); 1062 state->index, temp >> 16);
1063 state->overtemp = CPU_MAX_OVERTEMP; 1063 state->overtemp = CPU_MAX_OVERTEMP / 4;
1064 } else if (temp > (state->mpu.tmax << 16)) 1064 } else if (temp > (state->mpu.tmax << 16))
1065 state->overtemp++; 1065 state->overtemp++;
1066 else 1066 else
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index ff5e6309d682..cc998b99a19f 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -361,7 +361,7 @@ static int serial_pxa_startup(struct uart_port *port)
361 if (port->line == 3) /* HWUART */ 361 if (port->line == 3) /* HWUART */
362 up->mcr |= UART_MCR_AFE; 362 up->mcr |= UART_MCR_AFE;
363 else 363 else
364 up->mcr = 0; 364 up->mcr = 0;
365 365
366 /* 366 /*
367 * Allocate the IRQ 367 * Allocate the IRQ
@@ -641,7 +641,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
641 int i; 641 int i;
642 642
643 /* 643 /*
644 * First save the UER then disable the interrupts 644 * First save the IER then disable the interrupts
645 */ 645 */
646 ier = serial_in(up, UART_IER); 646 ier = serial_in(up, UART_IER);
647 serial_out(up, UART_IER, UART_IER_UUE); 647 serial_out(up, UART_IER, UART_IER_UUE);
diff --git a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c
index a248664b5d1d..fd48e74e78ed 100644
--- a/drivers/usb/input/kbtab.c
+++ b/drivers/usb/input/kbtab.c
@@ -159,7 +159,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
159 input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH); 159 input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH);
160 input_dev->mscbit[0] |= BIT(MSC_SERIAL); 160 input_dev->mscbit[0] |= BIT(MSC_SERIAL);
161 input_set_abs_params(input_dev, ABS_X, 0, 0x2000, 4, 0); 161 input_set_abs_params(input_dev, ABS_X, 0, 0x2000, 4, 0);
162 input_set_abs_params(input_dev, ABS_X, 0, 0x1750, 4, 0); 162 input_set_abs_params(input_dev, ABS_Y, 0, 0x1750, 4, 0);
163 input_set_abs_params(input_dev, ABS_PRESSURE, 0, 0xff, 0, 0); 163 input_set_abs_params(input_dev, ABS_PRESSURE, 0, 0xff, 0, 0);
164 164
165 endpoint = &intf->cur_altsetting->endpoint[0].desc; 165 endpoint = &intf->cur_altsetting->endpoint[0].desc;
diff --git a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c
index aea1cfae34cc..dc099bbe12bf 100644
--- a/drivers/usb/input/wacom.c
+++ b/drivers/usb/input/wacom.c
@@ -854,7 +854,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
854 854
855 input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); 855 input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS);
856 input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); 856 input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS);
857 input_set_abs_params(input_dev, ABS_X, 0, wacom->features->y_max, 4, 0); 857 input_set_abs_params(input_dev, ABS_X, 0, wacom->features->x_max, 4, 0);
858 input_set_abs_params(input_dev, ABS_Y, 0, wacom->features->y_max, 4, 0); 858 input_set_abs_params(input_dev, ABS_Y, 0, wacom->features->y_max, 4, 0);
859 input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom->features->pressure_max, 0, 0); 859 input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom->features->pressure_max, 0, 0);
860 860
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index b638fb500743..72b431d0a0a4 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -54,6 +54,18 @@ proc_file_read(struct file *file, char __user *buf, size_t nbytes,
54 ssize_t n, count; 54 ssize_t n, count;
55 char *start; 55 char *start;
56 struct proc_dir_entry * dp; 56 struct proc_dir_entry * dp;
57 unsigned long long pos;
58
59 /*
60 * Gaah, please just use "seq_file" instead. The legacy /proc
61 * interfaces cut loff_t down to off_t for reads, and ignore
62 * the offset entirely for writes..
63 */
64 pos = *ppos;
65 if (pos > MAX_NON_LFS)
66 return 0;
67 if (nbytes > MAX_NON_LFS - pos)
68 nbytes = MAX_NON_LFS - pos;
57 69
58 dp = PDE(inode); 70 dp = PDE(inode);
59 if (!(page = (char*) __get_free_page(GFP_KERNEL))) 71 if (!(page = (char*) __get_free_page(GFP_KERNEL)))
@@ -202,30 +214,17 @@ proc_file_write(struct file *file, const char __user *buffer,
202static loff_t 214static loff_t
203proc_file_lseek(struct file *file, loff_t offset, int orig) 215proc_file_lseek(struct file *file, loff_t offset, int orig)
204{ 216{
205 lock_kernel(); 217 loff_t retval = -EINVAL;
206 218 switch (orig) {
207 switch (orig) { 219 case 1:
208 case 0: 220 offset += file->f_pos;
209 if (offset < 0) 221 /* fallthrough */
210 goto out; 222 case 0:
211 file->f_pos = offset; 223 if (offset < 0 || offset > MAX_NON_LFS)
212 unlock_kernel(); 224 break;
213 return(file->f_pos); 225 file->f_pos = retval = offset;
214 case 1: 226 }
215 if (offset + file->f_pos < 0) 227 return retval;
216 goto out;
217 file->f_pos += offset;
218 unlock_kernel();
219 return(file->f_pos);
220 case 2:
221 goto out;
222 default:
223 goto out;
224 }
225
226out:
227 unlock_kernel();
228 return -EINVAL;
229} 228}
230 229
231static int proc_notify_change(struct dentry *dentry, struct iattr *iattr) 230static int proc_notify_change(struct dentry *dentry, struct iattr *iattr)
diff --git a/include/asm-i386/param.h b/include/asm-i386/param.h
index fa02e67ea86b..095580f3a45c 100644
--- a/include/asm-i386/param.h
+++ b/include/asm-i386/param.h
@@ -1,9 +1,8 @@
1#include <linux/config.h>
2
3#ifndef _ASMi386_PARAM_H 1#ifndef _ASMi386_PARAM_H
4#define _ASMi386_PARAM_H 2#define _ASMi386_PARAM_H
5 3
6#ifdef __KERNEL__ 4#ifdef __KERNEL__
5# include <linux/config.h>
7# define HZ CONFIG_HZ /* Internal kernel timer frequency */ 6# define HZ CONFIG_HZ /* Internal kernel timer frequency */
8# define USER_HZ 100 /* .. some user interfaces are in "ticks" */ 7# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
9# define CLOCKS_PER_SEC (USER_HZ) /* like times() */ 8# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
diff --git a/include/asm-x86_64/param.h b/include/asm-x86_64/param.h
index 40b11937180d..5956b23b57c2 100644
--- a/include/asm-x86_64/param.h
+++ b/include/asm-x86_64/param.h
@@ -1,9 +1,8 @@
1#include <linux/config.h>
2
3#ifndef _ASMx86_64_PARAM_H 1#ifndef _ASMx86_64_PARAM_H
4#define _ASMx86_64_PARAM_H 2#define _ASMx86_64_PARAM_H
5 3
6#ifdef __KERNEL__ 4#ifdef __KERNEL__
5# include <linux/config.h>
7# define HZ CONFIG_HZ /* Internal kernel timer frequency */ 6# define HZ CONFIG_HZ /* Internal kernel timer frequency */
8# define USER_HZ 100 /* .. some user interfaces are in "ticks */ 7# define USER_HZ 100 /* .. some user interfaces are in "ticks */
9#define CLOCKS_PER_SEC (USER_HZ) /* like times() */ 8#define CLOCKS_PER_SEC (USER_HZ) /* like times() */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 9990e10192e8..b53115b882e1 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2192,29 +2192,32 @@ int sysctl_string(ctl_table *table, int __user *name, int nlen,
2192 void __user *oldval, size_t __user *oldlenp, 2192 void __user *oldval, size_t __user *oldlenp,
2193 void __user *newval, size_t newlen, void **context) 2193 void __user *newval, size_t newlen, void **context)
2194{ 2194{
2195 size_t l, len;
2196
2197 if (!table->data || !table->maxlen) 2195 if (!table->data || !table->maxlen)
2198 return -ENOTDIR; 2196 return -ENOTDIR;
2199 2197
2200 if (oldval && oldlenp) { 2198 if (oldval && oldlenp) {
2201 if (get_user(len, oldlenp)) 2199 size_t bufsize;
2200 if (get_user(bufsize, oldlenp))
2202 return -EFAULT; 2201 return -EFAULT;
2203 if (len) { 2202 if (bufsize) {
2204 l = strlen(table->data); 2203 size_t len = strlen(table->data), copied;
2205 if (len > l) len = l; 2204
2206 if (len >= table->maxlen) 2205 /* This shouldn't trigger for a well-formed sysctl */
2206 if (len > table->maxlen)
2207 len = table->maxlen; 2207 len = table->maxlen;
2208 if(copy_to_user(oldval, table->data, len)) 2208
2209 return -EFAULT; 2209 /* Copy up to a max of bufsize-1 bytes of the string */
2210 if(put_user(0, ((char __user *) oldval) + len)) 2210 copied = (len >= bufsize) ? bufsize - 1 : len;
2211
2212 if (copy_to_user(oldval, table->data, copied) ||
2213 put_user(0, (char __user *)(oldval + copied)))
2211 return -EFAULT; 2214 return -EFAULT;
2212 if(put_user(len, oldlenp)) 2215 if (put_user(len, oldlenp))
2213 return -EFAULT; 2216 return -EFAULT;
2214 } 2217 }
2215 } 2218 }
2216 if (newval && newlen) { 2219 if (newval && newlen) {
2217 len = newlen; 2220 size_t len = newlen;
2218 if (len > table->maxlen) 2221 if (len > table->maxlen)
2219 len = table->maxlen; 2222 len = table->maxlen;
2220 if(copy_from_user(table->data, newval, len)) 2223 if(copy_from_user(table->data, newval, len))
@@ -2223,7 +2226,7 @@ int sysctl_string(ctl_table *table, int __user *name, int nlen,
2223 len--; 2226 len--;
2224 ((char *) table->data)[len] = 0; 2227 ((char *) table->data)[len] = 0;
2225 } 2228 }
2226 return 0; 2229 return 1;
2227} 2230}
2228 2231
2229/* 2232/*
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index bec88c81244e..72f402cc9c9a 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -161,6 +161,10 @@ static struct mempolicy *mpol_new(int mode, nodemask_t *nodes)
161 switch (mode) { 161 switch (mode) {
162 case MPOL_INTERLEAVE: 162 case MPOL_INTERLEAVE:
163 policy->v.nodes = *nodes; 163 policy->v.nodes = *nodes;
164 if (nodes_weight(*nodes) == 0) {
165 kmem_cache_free(policy_cache, policy);
166 return ERR_PTR(-EINVAL);
167 }
164 break; 168 break;
165 case MPOL_PREFERRED: 169 case MPOL_PREFERRED:
166 policy->v.preferred_node = first_node(*nodes); 170 policy->v.preferred_node = first_node(*nodes);