/[linux-patches]/genpatches-2.6/trunk/2.6.16/1009_linux-2.6.16.10.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.16/1009_linux-2.6.16.10.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 436 - (show annotations) (download) (as text)
Tue Apr 25 11:32:37 2006 UTC (14 years, 6 months ago) by dsd
File MIME type: text/x-diff
File size: 20457 byte(s)
Linux 2.6.16.10
1 diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
2 index 05312a8..558d2d2 100644
3 --- a/arch/i386/kernel/apm.c
4 +++ b/arch/i386/kernel/apm.c
5 @@ -1081,7 +1081,7 @@ static int apm_console_blank(int blank)
6 break;
7 }
8
9 - if (error == APM_NOT_ENGAGED && state != APM_STATE_READY) {
10 + if (error == APM_NOT_ENGAGED) {
11 static int tried;
12 int eng_error;
13 if (tried++ == 0) {
14 diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c
15 index e7aea77..40dfc29 100644
16 --- a/drivers/char/agp/efficeon-agp.c
17 +++ b/drivers/char/agp/efficeon-agp.c
18 @@ -64,6 +64,12 @@ static struct gatt_mask efficeon_generic
19 {.mask = 0x00000001, .type = 0}
20 };
21
22 +/* This function does the same thing as mask_memory() for this chipset... */
23 +static inline unsigned long efficeon_mask_memory(unsigned long addr)
24 +{
25 + return addr | 0x00000001;
26 +}
27 +
28 static struct aper_size_info_lvl2 efficeon_generic_sizes[4] =
29 {
30 {256, 65536, 0},
31 @@ -251,7 +257,7 @@ static int efficeon_insert_memory(struct
32 last_page = NULL;
33 for (i = 0; i < count; i++) {
34 int index = pg_start + i;
35 - unsigned long insert = mem->memory[i];
36 + unsigned long insert = efficeon_mask_memory(mem->memory[i]);
37
38 page = (unsigned int *) efficeon_private.l1_table[index >> 10];
39
40 diff --git a/drivers/char/ipmi/ipmi_bt_sm.c b/drivers/char/ipmi/ipmi_bt_sm.c
41 index 58dcdee..0030cd8 100644
42 --- a/drivers/char/ipmi/ipmi_bt_sm.c
43 +++ b/drivers/char/ipmi/ipmi_bt_sm.c
44 @@ -165,7 +165,7 @@ static int bt_start_transaction(struct s
45 {
46 unsigned int i;
47
48 - if ((size < 2) || (size > IPMI_MAX_MSG_LENGTH))
49 + if ((size < 2) || (size > (IPMI_MAX_MSG_LENGTH - 2)))
50 return -1;
51
52 if ((bt->state != BT_STATE_IDLE) && (bt->state != BT_STATE_HOSED))
53 diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
54 index 53d3d06..edaee70 100644
55 --- a/drivers/char/tty_io.c
56 +++ b/drivers/char/tty_io.c
57 @@ -2706,7 +2706,11 @@ #else
58 }
59 task_lock(p);
60 if (p->files) {
61 - rcu_read_lock();
62 + /*
63 + * We don't take a ref to the file, so we must
64 + * hold ->file_lock instead.
65 + */
66 + spin_lock(&p->files->file_lock);
67 fdt = files_fdtable(p->files);
68 for (i=0; i < fdt->max_fds; i++) {
69 filp = fcheck_files(p->files, i);
70 @@ -2721,7 +2725,7 @@ #else
71 break;
72 }
73 }
74 - rcu_read_unlock();
75 + spin_unlock(&p->files->file_lock);
76 }
77 task_unlock(p);
78 } while_each_task_pid(session, PIDTYPE_SID, p);
79 diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
80 index 8e0f315..dfca749 100644
81 --- a/drivers/i2c/busses/i2c-i801.c
82 +++ b/drivers/i2c/busses/i2c-i801.c
83 @@ -478,6 +478,11 @@ static s32 i801_access(struct i2c_adapte
84 ret = i801_transaction();
85 }
86
87 + /* Some BIOSes don't like it when PEC is enabled at reboot or resume
88 + time, so we forcibly disable it after every transaction. */
89 + if (hwpec)
90 + outb_p(0, SMBAUXCTL);
91 +
92 if(block)
93 return ret;
94 if(ret)
95 diff --git a/drivers/i2c/chips/m41t00.c b/drivers/i2c/chips/m41t00.c
96 index 2dc3d48..2836fb3 100644
97 --- a/drivers/i2c/chips/m41t00.c
98 +++ b/drivers/i2c/chips/m41t00.c
99 @@ -129,13 +129,13 @@ m41t00_set_tlet(ulong arg)
100 if ((i2c_smbus_write_byte_data(save_client, 0, tm.tm_sec & 0x7f) < 0)
101 || (i2c_smbus_write_byte_data(save_client, 1, tm.tm_min & 0x7f)
102 < 0)
103 - || (i2c_smbus_write_byte_data(save_client, 2, tm.tm_hour & 0x7f)
104 + || (i2c_smbus_write_byte_data(save_client, 2, tm.tm_hour & 0x3f)
105 < 0)
106 - || (i2c_smbus_write_byte_data(save_client, 4, tm.tm_mday & 0x7f)
107 + || (i2c_smbus_write_byte_data(save_client, 4, tm.tm_mday & 0x3f)
108 < 0)
109 - || (i2c_smbus_write_byte_data(save_client, 5, tm.tm_mon & 0x7f)
110 + || (i2c_smbus_write_byte_data(save_client, 5, tm.tm_mon & 0x1f)
111 < 0)
112 - || (i2c_smbus_write_byte_data(save_client, 6, tm.tm_year & 0x7f)
113 + || (i2c_smbus_write_byte_data(save_client, 6, tm.tm_year & 0xff)
114 < 0))
115
116 dev_warn(&save_client->dev,"m41t00: can't write to rtc chip\n");
117 diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
118 index cf84350..8b24b4f 100644
119 --- a/drivers/ide/pci/alim15x3.c
120 +++ b/drivers/ide/pci/alim15x3.c
121 @@ -731,6 +731,8 @@ static unsigned int __devinit ata66_ali1
122
123 if(m5229_revision <= 0x20)
124 tmpbyte = (tmpbyte & (~0x02)) | 0x01;
125 + else if (m5229_revision == 0xc7)
126 + tmpbyte |= 0x03;
127 else
128 tmpbyte |= 0x01;
129
130 diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
131 index 5ebfd1d..5282fec 100644
132 --- a/drivers/macintosh/therm_adt746x.c
133 +++ b/drivers/macintosh/therm_adt746x.c
134 @@ -627,8 +627,8 @@ thermostat_init(void)
135 if(therm_type == ADT7460)
136 device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed);
137
138 -#ifndef CONFIG_I2C_KEYWEST
139 - request_module("i2c-keywest");
140 +#ifndef CONFIG_I2C_POWERMAC
141 + request_module("i2c-powermac");
142 #endif
143
144 return i2c_add_driver(&thermostat_driver);
145 diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
146 index 1fc4c13..cfe288a 100644
147 --- a/drivers/mtd/nand/Kconfig
148 +++ b/drivers/mtd/nand/Kconfig
149 @@ -178,17 +178,16 @@ config MTD_NAND_DISKONCHIP_BBTWRITE
150 Even if you leave this disabled, you can enable BBT writes at module
151 load time (assuming you build diskonchip as a module) with the module
152 parameter "inftl_bbt_write=1".
153 -
154 - config MTD_NAND_SHARPSL
155 - bool "Support for NAND Flash on Sharp SL Series (C7xx + others)"
156 - depends on MTD_NAND && ARCH_PXA
157 -
158 - config MTD_NAND_NANDSIM
159 - bool "Support for NAND Flash Simulator"
160 - depends on MTD_NAND && MTD_PARTITIONS
161
162 +config MTD_NAND_SHARPSL
163 + tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)"
164 + depends on MTD_NAND && ARCH_PXA
165 +
166 +config MTD_NAND_NANDSIM
167 + tristate "Support for NAND Flash Simulator"
168 + depends on MTD_NAND && MTD_PARTITIONS
169 help
170 The simulator may simulate verious NAND flash chips for the
171 MTD nand layer.
172 -
173 +
174 endmenu
175 diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
176 index d9152d0..9132549 100644
177 --- a/drivers/scsi/3w-9xxx.c
178 +++ b/drivers/scsi/3w-9xxx.c
179 @@ -85,7 +85,7 @@ #include <scsi/scsi_cmnd.h>
180 #include "3w-9xxx.h"
181
182 /* Globals */
183 -#define TW_DRIVER_VERSION "2.26.02.005"
184 +#define TW_DRIVER_VERSION "2.26.02.007"
185 static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT];
186 static unsigned int twa_device_extension_count;
187 static int twa_major = -1;
188 @@ -1944,9 +1944,13 @@ static void twa_scsiop_execute_scsi_comp
189 }
190 if (tw_dev->srb[request_id]->use_sg == 1) {
191 struct scatterlist *sg = (struct scatterlist *)tw_dev->srb[request_id]->request_buffer;
192 - char *buf = kmap_atomic(sg->page, KM_IRQ0) + sg->offset;
193 + char *buf;
194 + unsigned long flags = 0;
195 + local_irq_save(flags);
196 + buf = kmap_atomic(sg->page, KM_IRQ0) + sg->offset;
197 memcpy(buf, tw_dev->generic_buffer_virt[request_id], sg->length);
198 kunmap_atomic(buf - sg->offset, KM_IRQ0);
199 + local_irq_restore(flags);
200 }
201 }
202 } /* End twa_scsiop_execute_scsi_complete() */
203 diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
204 index 25f678d..e8e41e6 100644
205 --- a/drivers/scsi/3w-xxxx.c
206 +++ b/drivers/scsi/3w-xxxx.c
207 @@ -1508,10 +1508,12 @@ static void tw_transfer_internal(TW_Devi
208 struct scsi_cmnd *cmd = tw_dev->srb[request_id];
209 void *buf;
210 unsigned int transfer_len;
211 + unsigned long flags = 0;
212
213 if (cmd->use_sg) {
214 struct scatterlist *sg =
215 (struct scatterlist *)cmd->request_buffer;
216 + local_irq_save(flags);
217 buf = kmap_atomic(sg->page, KM_IRQ0) + sg->offset;
218 transfer_len = min(sg->length, len);
219 } else {
220 @@ -1526,6 +1528,7 @@ static void tw_transfer_internal(TW_Devi
221
222 sg = (struct scatterlist *)cmd->request_buffer;
223 kunmap_atomic(buf - sg->offset, KM_IRQ0);
224 + local_irq_restore(flags);
225 }
226 }
227
228 diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
229 index 996c7b5..b3094ae 100644
230 --- a/drivers/video/fbmem.c
231 +++ b/drivers/video/fbmem.c
232 @@ -669,13 +669,19 @@ fb_write(struct file *file, const char _
233 total_size = info->fix.smem_len;
234
235 if (p > total_size)
236 - return 0;
237 + return -EFBIG;
238
239 - if (count >= total_size)
240 + if (count > total_size) {
241 + err = -EFBIG;
242 count = total_size;
243 + }
244 +
245 + if (count + p > total_size) {
246 + if (!err)
247 + err = -ENOSPC;
248
249 - if (count + p > total_size)
250 count = total_size - p;
251 + }
252
253 buffer = kmalloc((count > PAGE_SIZE) ? PAGE_SIZE : count,
254 GFP_KERNEL);
255 @@ -717,7 +723,7 @@ fb_write(struct file *file, const char _
256
257 kfree(buffer);
258
259 - return (err) ? err : cnt;
260 + return (cnt) ? cnt : err;
261 }
262
263 #ifdef CONFIG_KMOD
264 diff --git a/fs/locks.c b/fs/locks.c
265 index 909eab8..e75ac39 100644
266 --- a/fs/locks.c
267 +++ b/fs/locks.c
268 @@ -2212,7 +2212,12 @@ void steal_locks(fl_owner_t from)
269
270 lock_kernel();
271 j = 0;
272 - rcu_read_lock();
273 +
274 + /*
275 + * We are not taking a ref to the file structures, so
276 + * we need to acquire ->file_lock.
277 + */
278 + spin_lock(&files->file_lock);
279 fdt = files_fdtable(files);
280 for (;;) {
281 unsigned long set;
282 @@ -2230,7 +2235,7 @@ void steal_locks(fl_owner_t from)
283 set >>= 1;
284 }
285 }
286 - rcu_read_unlock();
287 + spin_unlock(&files->file_lock);
288 unlock_kernel();
289 }
290 EXPORT_SYMBOL(steal_locks);
291 diff --git a/fs/open.c b/fs/open.c
292 index 70e0230..f697914 100644
293 --- a/fs/open.c
294 +++ b/fs/open.c
295 @@ -330,7 +330,10 @@ out:
296
297 asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length)
298 {
299 - return do_sys_ftruncate(fd, length, 1);
300 + long ret = do_sys_ftruncate(fd, length, 1);
301 + /* avoid REGPARM breakage on x86: */
302 + prevent_tail_call(ret);
303 + return ret;
304 }
305
306 /* LFS versions of truncate are only needed on 32 bit machines */
307 @@ -342,7 +345,10 @@ asmlinkage long sys_truncate64(const cha
308
309 asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length)
310 {
311 - return do_sys_ftruncate(fd, length, 0);
312 + long ret = do_sys_ftruncate(fd, length, 0);
313 + /* avoid REGPARM breakage on x86: */
314 + prevent_tail_call(ret);
315 + return ret;
316 }
317 #endif
318
319 @@ -1083,20 +1089,30 @@ long do_sys_open(int dfd, const char __u
320
321 asmlinkage long sys_open(const char __user *filename, int flags, int mode)
322 {
323 + long ret;
324 +
325 if (force_o_largefile())
326 flags |= O_LARGEFILE;
327
328 - return do_sys_open(AT_FDCWD, filename, flags, mode);
329 + ret = do_sys_open(AT_FDCWD, filename, flags, mode);
330 + /* avoid REGPARM breakage on x86: */
331 + prevent_tail_call(ret);
332 + return ret;
333 }
334 EXPORT_SYMBOL_GPL(sys_open);
335
336 asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
337 int mode)
338 {
339 + long ret;
340 +
341 if (force_o_largefile())
342 flags |= O_LARGEFILE;
343
344 - return do_sys_open(dfd, filename, flags, mode);
345 + ret = do_sys_open(dfd, filename, flags, mode);
346 + /* avoid REGPARM breakage on x86: */
347 + prevent_tail_call(ret);
348 + return ret;
349 }
350 EXPORT_SYMBOL_GPL(sys_openat);
351
352 diff --git a/fs/proc/base.c b/fs/proc/base.c
353 index 20feb75..c192cb2 100644
354 --- a/fs/proc/base.c
355 +++ b/fs/proc/base.c
356 @@ -294,16 +294,20 @@ static int proc_fd_link(struct inode *in
357
358 files = get_files_struct(task);
359 if (files) {
360 - rcu_read_lock();
361 + /*
362 + * We are not taking a ref to the file structure, so we must
363 + * hold ->file_lock.
364 + */
365 + spin_lock(&files->file_lock);
366 file = fcheck_files(files, fd);
367 if (file) {
368 *mnt = mntget(file->f_vfsmnt);
369 *dentry = dget(file->f_dentry);
370 - rcu_read_unlock();
371 + spin_unlock(&files->file_lock);
372 put_files_struct(files);
373 return 0;
374 }
375 - rcu_read_unlock();
376 + spin_unlock(&files->file_lock);
377 put_files_struct(files);
378 }
379 return -ENOENT;
380 @@ -1485,7 +1489,12 @@ static struct dentry *proc_lookupfd(stru
381 if (!files)
382 goto out_unlock;
383 inode->i_mode = S_IFLNK;
384 - rcu_read_lock();
385 +
386 + /*
387 + * We are not taking a ref to the file structure, so we must
388 + * hold ->file_lock.
389 + */
390 + spin_lock(&files->file_lock);
391 file = fcheck_files(files, fd);
392 if (!file)
393 goto out_unlock2;
394 @@ -1493,7 +1502,7 @@ static struct dentry *proc_lookupfd(stru
395 inode->i_mode |= S_IRUSR | S_IXUSR;
396 if (file->f_mode & 2)
397 inode->i_mode |= S_IWUSR | S_IXUSR;
398 - rcu_read_unlock();
399 + spin_unlock(&files->file_lock);
400 put_files_struct(files);
401 inode->i_op = &proc_pid_link_inode_operations;
402 inode->i_size = 64;
403 @@ -1503,7 +1512,7 @@ static struct dentry *proc_lookupfd(stru
404 return NULL;
405
406 out_unlock2:
407 - rcu_read_unlock();
408 + spin_unlock(&files->file_lock);
409 put_files_struct(files);
410 out_unlock:
411 iput(inode);
412 diff --git a/ipc/util.c b/ipc/util.c
413 index 8626219..303b058 100644
414 --- a/ipc/util.c
415 +++ b/ipc/util.c
416 @@ -182,8 +182,7 @@ static int grow_ary(struct ipc_ids* ids,
417 if(new == NULL)
418 return size;
419 new->size = newsize;
420 - memcpy(new->p, ids->entries->p, sizeof(struct kern_ipc_perm *)*size +
421 - sizeof(struct ipc_id_ary));
422 + memcpy(new->p, ids->entries->p, sizeof(struct kern_ipc_perm *)*size);
423 for(i=size;i<newsize;i++) {
424 new->p[i] = NULL;
425 }
426 diff --git a/kernel/uid16.c b/kernel/uid16.c
427 index aa25605..187e2a4 100644
428 --- a/kernel/uid16.c
429 +++ b/kernel/uid16.c
430 @@ -20,43 +20,67 @@ #include <asm/uaccess.h>
431
432 asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gid_t group)
433 {
434 - return sys_chown(filename, low2highuid(user), low2highgid(group));
435 + long ret = sys_chown(filename, low2highuid(user), low2highgid(group));
436 + /* avoid REGPARM breakage on x86: */
437 + prevent_tail_call(ret);
438 + return ret;
439 }
440
441 asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_gid_t group)
442 {
443 - return sys_lchown(filename, low2highuid(user), low2highgid(group));
444 + long ret = sys_lchown(filename, low2highuid(user), low2highgid(group));
445 + /* avoid REGPARM breakage on x86: */
446 + prevent_tail_call(ret);
447 + return ret;
448 }
449
450 asmlinkage long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group)
451 {
452 - return sys_fchown(fd, low2highuid(user), low2highgid(group));
453 + long ret = sys_fchown(fd, low2highuid(user), low2highgid(group));
454 + /* avoid REGPARM breakage on x86: */
455 + prevent_tail_call(ret);
456 + return ret;
457 }
458
459 asmlinkage long sys_setregid16(old_gid_t rgid, old_gid_t egid)
460 {
461 - return sys_setregid(low2highgid(rgid), low2highgid(egid));
462 + long ret = sys_setregid(low2highgid(rgid), low2highgid(egid));
463 + /* avoid REGPARM breakage on x86: */
464 + prevent_tail_call(ret);
465 + return ret;
466 }
467
468 asmlinkage long sys_setgid16(old_gid_t gid)
469 {
470 - return sys_setgid(low2highgid(gid));
471 + long ret = sys_setgid(low2highgid(gid));
472 + /* avoid REGPARM breakage on x86: */
473 + prevent_tail_call(ret);
474 + return ret;
475 }
476
477 asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid)
478 {
479 - return sys_setreuid(low2highuid(ruid), low2highuid(euid));
480 + long ret = sys_setreuid(low2highuid(ruid), low2highuid(euid));
481 + /* avoid REGPARM breakage on x86: */
482 + prevent_tail_call(ret);
483 + return ret;
484 }
485
486 asmlinkage long sys_setuid16(old_uid_t uid)
487 {
488 - return sys_setuid(low2highuid(uid));
489 + long ret = sys_setuid(low2highuid(uid));
490 + /* avoid REGPARM breakage on x86: */
491 + prevent_tail_call(ret);
492 + return ret;
493 }
494
495 asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid)
496 {
497 - return sys_setresuid(low2highuid(ruid), low2highuid(euid),
498 - low2highuid(suid));
499 + long ret = sys_setresuid(low2highuid(ruid), low2highuid(euid),
500 + low2highuid(suid));
501 + /* avoid REGPARM breakage on x86: */
502 + prevent_tail_call(ret);
503 + return ret;
504 }
505
506 asmlinkage long sys_getresuid16(old_uid_t __user *ruid, old_uid_t __user *euid, old_uid_t __user *suid)
507 @@ -72,8 +96,11 @@ asmlinkage long sys_getresuid16(old_uid_
508
509 asmlinkage long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid)
510 {
511 - return sys_setresgid(low2highgid(rgid), low2highgid(egid),
512 - low2highgid(sgid));
513 + long ret = sys_setresgid(low2highgid(rgid), low2highgid(egid),
514 + low2highgid(sgid));
515 + /* avoid REGPARM breakage on x86: */
516 + prevent_tail_call(ret);
517 + return ret;
518 }
519
520 asmlinkage long sys_getresgid16(old_gid_t __user *rgid, old_gid_t __user *egid, old_gid_t __user *sgid)
521 @@ -89,12 +116,18 @@ asmlinkage long sys_getresgid16(old_gid_
522
523 asmlinkage long sys_setfsuid16(old_uid_t uid)
524 {
525 - return sys_setfsuid(low2highuid(uid));
526 + long ret = sys_setfsuid(low2highuid(uid));
527 + /* avoid REGPARM breakage on x86: */
528 + prevent_tail_call(ret);
529 + return ret;
530 }
531
532 asmlinkage long sys_setfsgid16(old_gid_t gid)
533 {
534 - return sys_setfsgid(low2highgid(gid));
535 + long ret = sys_setfsgid(low2highgid(gid));
536 + /* avoid REGPARM breakage on x86: */
537 + prevent_tail_call(ret);
538 + return ret;
539 }
540
541 static int groups16_to_user(old_gid_t __user *grouplist,
542 diff --git a/net/core/dev.c b/net/core/dev.c
543 index 2afb0de..12a214c 100644
544 --- a/net/core/dev.c
545 +++ b/net/core/dev.c
546 @@ -2932,11 +2932,11 @@ void netdev_run_todo(void)
547
548 switch(dev->reg_state) {
549 case NETREG_REGISTERING:
550 + dev->reg_state = NETREG_REGISTERED;
551 err = netdev_register_sysfs(dev);
552 if (err)
553 printk(KERN_ERR "%s: failed sysfs registration (%d)\n",
554 dev->name, err);
555 - dev->reg_state = NETREG_REGISTERED;
556 break;
557
558 case NETREG_UNREGISTERING:
559 diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
560 index 9f498a6..310f2e6 100644
561 --- a/net/ipv4/tcp_output.c
562 +++ b/net/ipv4/tcp_output.c
563 @@ -537,7 +537,9 @@ int tcp_fragment(struct sock *sk, struct
564 buff = sk_stream_alloc_skb(sk, nsize, GFP_ATOMIC);
565 if (buff == NULL)
566 return -ENOMEM; /* We'll just try again later. */
567 - sk_charge_skb(sk, buff);
568 +
569 + buff->truesize = skb->len - len;
570 + skb->truesize -= buff->truesize;
571
572 /* Correct the sequence numbers. */
573 TCP_SKB_CB(buff)->seq = TCP_SKB_CB(skb)->seq + len;
574 diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
575 index 2a1e7e4..d88cab7 100644
576 --- a/net/ipv6/exthdrs.c
577 +++ b/net/ipv6/exthdrs.c
578 @@ -489,6 +489,18 @@ int ipv6_parse_hopopts(struct sk_buff *s
579 {
580 struct inet6_skb_parm *opt = IP6CB(skb);
581
582 + /*
583 + * skb->nh.raw is equal to skb->data, and
584 + * skb->h.raw - skb->nh.raw is always equal to
585 + * sizeof(struct ipv6hdr) by definition of
586 + * hop-by-hop options.
587 + */
588 + if (!pskb_may_pull(skb, sizeof(struct ipv6hdr) + 8) ||
589 + !pskb_may_pull(skb, sizeof(struct ipv6hdr) + ((skb->h.raw[1] + 1) << 3))) {
590 + kfree_skb(skb);
591 + return -1;
592 + }
593 +
594 opt->hop = sizeof(struct ipv6hdr);
595 if (ip6_parse_tlv(tlvprochopopt_lst, skb)) {
596 skb->h.raw += (skb->h.raw[1]+1)<<3;
597 diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
598 index 91cce8b..88c840f 100644
599 --- a/net/ipv6/xfrm6_policy.c
600 +++ b/net/ipv6/xfrm6_policy.c
601 @@ -191,16 +191,18 @@ error:
602 static inline void
603 _decode_session6(struct sk_buff *skb, struct flowi *fl)
604 {
605 - u16 offset = sizeof(struct ipv6hdr);
606 + u16 offset = skb->h.raw - skb->nh.raw;
607 struct ipv6hdr *hdr = skb->nh.ipv6h;
608 - struct ipv6_opt_hdr *exthdr = (struct ipv6_opt_hdr*)(skb->nh.raw + offset);
609 - u8 nexthdr = skb->nh.ipv6h->nexthdr;
610 + struct ipv6_opt_hdr *exthdr;
611 + u8 nexthdr = skb->nh.raw[IP6CB(skb)->nhoff];
612
613 memset(fl, 0, sizeof(struct flowi));
614 ipv6_addr_copy(&fl->fl6_dst, &hdr->daddr);
615 ipv6_addr_copy(&fl->fl6_src, &hdr->saddr);
616
617 while (pskb_may_pull(skb, skb->nh.raw + offset + 1 - skb->data)) {
618 + exthdr = (struct ipv6_opt_hdr*)(skb->nh.raw + offset);
619 +
620 switch (nexthdr) {
621 case NEXTHDR_ROUTING:
622 case NEXTHDR_HOP:
623 diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c
624 index 640d0bf..84047f6 100644
625 --- a/security/selinux/ss/mls.c
626 +++ b/security/selinux/ss/mls.c
627 @@ -264,7 +264,7 @@ int mls_context_to_sid(char oldc,
628
629 if (!selinux_mls_enabled) {
630 if (def_sid != SECSID_NULL && oldc)
631 - *scontext += strlen(*scontext);
632 + *scontext += strlen(*scontext)+1;
633 return 0;
634 }
635
636 diff --git a/sound/oss/dmasound/tas_common.c b/sound/oss/dmasound/tas_common.c
637 index 8131599..882ae98 100644
638 --- a/sound/oss/dmasound/tas_common.c
639 +++ b/sound/oss/dmasound/tas_common.c
640 @@ -195,8 +195,8 @@ tas_init(int driver_id, const char *driv
641
642 printk(KERN_INFO "tas driver [%s])\n", driver_name);
643
644 -#ifndef CONFIG_I2C_KEYWEST
645 - request_module("i2c-keywest");
646 +#ifndef CONFIG_I2C_POWERMAC
647 + request_module("i2c-powermac");
648 #endif
649 tas_node = find_devices("deq");
650 if (tas_node == NULL)
651 diff --git a/sound/ppc/daca.c b/sound/ppc/daca.c
652 index 08cde51..b96cd94 100644
653 --- a/sound/ppc/daca.c
654 +++ b/sound/ppc/daca.c
655 @@ -256,7 +256,7 @@ int __init snd_pmac_daca_init(struct snd
656
657 #ifdef CONFIG_KMOD
658 if (current->fs->root)
659 - request_module("i2c-keywest");
660 + request_module("i2c-powermac");
661 #endif /* CONFIG_KMOD */
662
663 mix = kmalloc(sizeof(*mix), GFP_KERNEL);
664 diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
665 index 838fc11..39d4cde 100644
666 --- a/sound/ppc/tumbler.c
667 +++ b/sound/ppc/tumbler.c
668 @@ -1314,7 +1314,7 @@ int __init snd_pmac_tumbler_init(struct
669
670 #ifdef CONFIG_KMOD
671 if (current->fs->root)
672 - request_module("i2c-keywest");
673 + request_module("i2c-powermac");
674 #endif /* CONFIG_KMOD */
675
676 mix = kmalloc(sizeof(*mix), GFP_KERNEL);

  ViewVC Help
Powered by ViewVC 1.1.20