/[linux-patches]/genpatches-2.6/trunk/2.6.16/1005_linux-2.6.16.6.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.16/1005_linux-2.6.16.6.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 412 - (show annotations) (download) (as text)
Wed Apr 19 09:28:08 2006 UTC (14 years, 7 months ago) by johnm
File MIME type: text/x-diff
File size: 52837 byte(s)
bump to 2.6.16.6
1 diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
2 index b4e5f8f..45308bd 100644
3 --- a/arch/alpha/kernel/setup.c
4 +++ b/arch/alpha/kernel/setup.c
5 @@ -24,6 +24,7 @@
6 #include <linux/config.h> /* CONFIG_ALPHA_LCA etc */
7 #include <linux/mc146818rtc.h>
8 #include <linux/console.h>
9 +#include <linux/cpu.h>
10 #include <linux/errno.h>
11 #include <linux/init.h>
12 #include <linux/string.h>
13 @@ -477,6 +478,22 @@ page_is_ram(unsigned long pfn)
14 #undef PFN_PHYS
15 #undef PFN_MAX
16
17 +static int __init
18 +register_cpus(void)
19 +{
20 + int i;
21 +
22 + for_each_possible_cpu(i) {
23 + struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL);
24 + if (!p)
25 + return -ENOMEM;
26 + register_cpu(p, i, NULL);
27 + }
28 + return 0;
29 +}
30 +
31 +arch_initcall(register_cpus);
32 +
33 void __init
34 setup_arch(char **cmdline_p)
35 {
36 diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
37 index 02c2db0..1852554 100644
38 --- a/arch/alpha/kernel/smp.c
39 +++ b/arch/alpha/kernel/smp.c
40 @@ -439,7 +439,7 @@ setup_smp(void)
41 if ((cpu->flags & 0x1cc) == 0x1cc) {
42 smp_num_probed++;
43 /* Assume here that "whami" == index */
44 - cpu_set(i, cpu_possible_map);
45 + cpu_set(i, cpu_present_mask);
46 cpu->pal_revision = boot_cpu_palrev;
47 }
48
49 @@ -450,9 +450,8 @@ setup_smp(void)
50 }
51 } else {
52 smp_num_probed = 1;
53 - cpu_set(boot_cpuid, cpu_possible_map);
54 + cpu_set(boot_cpuid, cpu_present_mask);
55 }
56 - cpu_present_mask = cpumask_of_cpu(boot_cpuid);
57
58 printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
59 smp_num_probed, cpu_possible_map.bits[0]);
60 @@ -488,9 +487,8 @@ void __devinit
61 smp_prepare_boot_cpu(void)
62 {
63 /*
64 - * Mark the boot cpu (current cpu) as both present and online
65 + * Mark the boot cpu (current cpu) as online
66 */
67 - cpu_set(smp_processor_id(), cpu_present_mask);
68 cpu_set(smp_processor_id(), cpu_online_map);
69 }
70
71 diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c
72 index be8b711..6000950 100644
73 --- a/arch/m32r/kernel/m32r_ksyms.c
74 +++ b/arch/m32r/kernel/m32r_ksyms.c
75 @@ -38,10 +38,6 @@ EXPORT_SYMBOL(__udelay);
76 EXPORT_SYMBOL(__delay);
77 EXPORT_SYMBOL(__const_udelay);
78
79 -EXPORT_SYMBOL(__get_user_1);
80 -EXPORT_SYMBOL(__get_user_2);
81 -EXPORT_SYMBOL(__get_user_4);
82 -
83 EXPORT_SYMBOL(strpbrk);
84 EXPORT_SYMBOL(strstr);
85
86 diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c
87 index d742037..542ed93 100644
88 --- a/arch/m32r/kernel/setup.c
89 +++ b/arch/m32r/kernel/setup.c
90 @@ -9,6 +9,7 @@
91
92 #include <linux/config.h>
93 #include <linux/init.h>
94 +#include <linux/kernel.h>
95 #include <linux/stddef.h>
96 #include <linux/fs.h>
97 #include <linux/sched.h>
98 @@ -218,8 +219,6 @@ static unsigned long __init setup_memory
99 extern unsigned long setup_memory(void);
100 #endif /* CONFIG_DISCONTIGMEM */
101
102 -#define M32R_PCC_PCATCR 0x00ef7014 /* will move to m32r.h */
103 -
104 void __init setup_arch(char **cmdline_p)
105 {
106 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
107 @@ -268,15 +267,14 @@ void __init setup_arch(char **cmdline_p)
108 paging_init();
109 }
110
111 -static struct cpu cpu[NR_CPUS];
112 +static struct cpu cpu_devices[NR_CPUS];
113
114 static int __init topology_init(void)
115 {
116 - int cpu_id;
117 + int i;
118
119 - for (cpu_id = 0; cpu_id < NR_CPUS; cpu_id++)
120 - if (cpu_possible(cpu_id))
121 - register_cpu(&cpu[cpu_id], cpu_id, NULL);
122 + for_each_present_cpu(i)
123 + register_cpu(&cpu_devices[i], i, NULL);
124
125 return 0;
126 }
127 diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c
128 index d7ec16e..840b434 100644
129 --- a/arch/m32r/kernel/smpboot.c
130 +++ b/arch/m32r/kernel/smpboot.c
131 @@ -39,8 +39,10 @@
132 * Martin J. Bligh : Added support for multi-quad systems
133 */
134
135 +#include <linux/module.h>
136 #include <linux/config.h>
137 #include <linux/init.h>
138 +#include <linux/kernel.h>
139 #include <linux/mm.h>
140 #include <linux/smp_lock.h>
141 #include <linux/irq.h>
142 @@ -72,11 +74,15 @@ physid_mask_t phys_cpu_present_map;
143
144 /* Bitmask of currently online CPUs */
145 cpumask_t cpu_online_map;
146 +EXPORT_SYMBOL(cpu_online_map);
147
148 cpumask_t cpu_bootout_map;
149 cpumask_t cpu_bootin_map;
150 -cpumask_t cpu_callout_map;
151 static cpumask_t cpu_callin_map;
152 +cpumask_t cpu_callout_map;
153 +EXPORT_SYMBOL(cpu_callout_map);
154 +cpumask_t cpu_possible_map = CPU_MASK_ALL;
155 +EXPORT_SYMBOL(cpu_possible_map);
156
157 /* Per CPU bogomips and other parameters */
158 struct cpuinfo_m32r cpu_data[NR_CPUS] __cacheline_aligned;
159 @@ -110,7 +116,6 @@ static unsigned int calibration_result;
160
161 void smp_prepare_boot_cpu(void);
162 void smp_prepare_cpus(unsigned int);
163 -static void smp_tune_scheduling(void);
164 static void init_ipi_lock(void);
165 static void do_boot_cpu(int);
166 int __cpu_up(unsigned int);
167 @@ -177,6 +182,9 @@ void __init smp_prepare_cpus(unsigned in
168 }
169 for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++)
170 physid_set(phys_id, phys_cpu_present_map);
171 +#ifndef CONFIG_HOTPLUG_CPU
172 + cpu_present_map = cpu_possible_map;
173 +#endif
174
175 show_mp_info(nr_cpu);
176
177 @@ -186,7 +194,6 @@ void __init smp_prepare_cpus(unsigned in
178 * Setup boot CPU information
179 */
180 smp_store_cpu_info(0); /* Final full version of the data */
181 - smp_tune_scheduling();
182
183 /*
184 * If SMP should be disabled, then really disable it!
185 @@ -230,11 +237,6 @@ smp_done:
186 Dprintk("Boot done.\n");
187 }
188
189 -static void __init smp_tune_scheduling(void)
190 -{
191 - /* Nothing to do. */
192 -}
193 -
194 /*
195 * init_ipi_lock : Initialize IPI locks.
196 */
197 @@ -629,4 +631,3 @@ static void __init unmap_cpu_to_physid(i
198 physid_2_cpu[phys_id] = -1;
199 cpu_2_physid[cpu_id] = -1;
200 }
201 -
202 diff --git a/arch/m32r/lib/Makefile b/arch/m32r/lib/Makefile
203 index e632d10..d16b4e4 100644
204 --- a/arch/m32r/lib/Makefile
205 +++ b/arch/m32r/lib/Makefile
206 @@ -2,6 +2,6 @@
207 # Makefile for M32R-specific library files..
208 #
209
210 -lib-y := checksum.o ashxdi3.o memset.o memcpy.o getuser.o \
211 - putuser.o delay.o strlen.o usercopy.o csum_partial_copy.o
212 +lib-y := checksum.o ashxdi3.o memset.o memcpy.o \
213 + delay.o strlen.o usercopy.o csum_partial_copy.o
214
215 diff --git a/arch/m32r/lib/getuser.S b/arch/m32r/lib/getuser.S
216 deleted file mode 100644
217 index 58a0db0..0000000
218 --- a/arch/m32r/lib/getuser.S
219 +++ /dev/null
220 @@ -1,88 +0,0 @@
221 -/*
222 - * __get_user functions.
223 - *
224 - * (C) Copyright 2001 Hirokazu Takata
225 - *
226 - * These functions have a non-standard call interface
227 - * to make them more efficient, especially as they
228 - * return an error value in addition to the "real"
229 - * return value.
230 - */
231 -
232 -#include <linux/config.h>
233 -
234 -/*
235 - * __get_user_X
236 - *
237 - * Inputs: r0 contains the address
238 - *
239 - * Outputs: r0 is error code (0 or -EFAULT)
240 - * r1 contains zero-extended value
241 - *
242 - * These functions should not modify any other registers,
243 - * as they get called from within inline assembly.
244 - */
245 -
246 -#ifdef CONFIG_ISA_DUAL_ISSUE
247 -
248 - .text
249 - .balign 4
250 - .globl __get_user_1
251 -__get_user_1:
252 -1: ldub r1, @r0 || ldi r0, #0
253 - jmp r14
254 -
255 - .balign 4
256 - .globl __get_user_2
257 -__get_user_2:
258 -2: lduh r1, @r0 || ldi r0, #0
259 - jmp r14
260 -
261 - .balign 4
262 - .globl __get_user_4
263 -__get_user_4:
264 -3: ld r1, @r0 || ldi r0, #0
265 - jmp r14
266 -
267 -bad_get_user:
268 - ldi r1, #0 || ldi r0, #-14
269 - jmp r14
270 -
271 -#else /* not CONFIG_ISA_DUAL_ISSUE */
272 -
273 - .text
274 - .balign 4
275 - .globl __get_user_1
276 -__get_user_1:
277 -1: ldub r1, @r0
278 - ldi r0, #0
279 - jmp r14
280 -
281 - .balign 4
282 - .globl __get_user_2
283 -__get_user_2:
284 -2: lduh r1, @r0
285 - ldi r0, #0
286 - jmp r14
287 -
288 - .balign 4
289 - .globl __get_user_4
290 -__get_user_4:
291 -3: ld r1, @r0
292 - ldi r0, #0
293 - jmp r14
294 -
295 -bad_get_user:
296 - ldi r1, #0
297 - ldi r0, #-14
298 - jmp r14
299 -
300 -#endif /* not CONFIG_ISA_DUAL_ISSUE */
301 -
302 -.section __ex_table,"a"
303 - .long 1b,bad_get_user
304 - .long 2b,bad_get_user
305 - .long 3b,bad_get_user
306 -.previous
307 -
308 - .end
309 diff --git a/arch/m32r/lib/putuser.S b/arch/m32r/lib/putuser.S
310 deleted file mode 100644
311 index 218154c..0000000
312 --- a/arch/m32r/lib/putuser.S
313 +++ /dev/null
314 @@ -1,84 +0,0 @@
315 -/*
316 - * __put_user functions.
317 - *
318 - * (C) Copyright 1998 Linus Torvalds
319 - * (C) Copyright 2001 Hirokazu Takata
320 - *
321 - * These functions have a non-standard call interface
322 - * to make them more efficient.
323 - */
324 -
325 -#include <linux/config.h>
326 -
327 -/*
328 - * __put_user_X
329 - *
330 - * Inputs: r0 contains the address
331 - * r1 contains the value
332 - *
333 - * Outputs: r0 is error code (0 or -EFAULT)
334 - * r1 is corrupted (will contain "current_task").
335 - *
336 - * These functions should not modify any other registers,
337 - * as they get called from within inline assembly.
338 - */
339 -
340 -#ifdef CONFIG_ISA_DUAL_ISSUE
341 -
342 - .text
343 - .balign 4
344 - .globl __put_user_1
345 -__put_user_1:
346 -1: stb r1, @r0 || ldi r0, #0
347 - jmp r14
348 -
349 - .balign 4
350 - .globl __put_user_2
351 -__put_user_2:
352 -2: sth r1, @r0 || ldi r0, #0
353 - jmp r14
354 -
355 - .balign 4
356 - .globl __put_user_4
357 -__put_user_4:
358 -3: st r1, @r0 || ldi r0, #0
359 - jmp r14
360 -
361 -bad_put_user:
362 - ldi r0, #-14 || jmp r14
363 -
364 -#else /* not CONFIG_ISA_DUAL_ISSUE */
365 -
366 - .text
367 - .balign 4
368 - .globl __put_user_1
369 -__put_user_1:
370 -1: stb r1, @r0
371 - ldi r0, #0
372 - jmp r14
373 -
374 - .balign 4
375 - .globl __put_user_2
376 -__put_user_2:
377 -2: sth r1, @r0
378 - ldi r0, #0
379 - jmp r14
380 -
381 - .balign 4
382 - .globl __put_user_4
383 -__put_user_4:
384 -3: st r1, @r0
385 - ldi r0, #0
386 - jmp r14
387 -
388 -bad_put_user:
389 - ldi r0, #-14
390 - jmp r14
391 -
392 -#endif /* not CONFIG_ISA_DUAL_ISSUE */
393 -
394 -.section __ex_table,"a"
395 - .long 1b,bad_put_user
396 - .long 2b,bad_put_user
397 - .long 3b,bad_put_user
398 -.previous
399 diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
400 index f96c49b..abd758f 100644
401 --- a/arch/powerpc/kernel/setup_64.c
402 +++ b/arch/powerpc/kernel/setup_64.c
403 @@ -256,12 +256,10 @@ void __init early_setup(unsigned long dt
404 /*
405 * Initialize stab / SLB management except on iSeries
406 */
407 - if (!firmware_has_feature(FW_FEATURE_ISERIES)) {
408 - if (cpu_has_feature(CPU_FTR_SLB))
409 - slb_initialize();
410 - else
411 - stab_initialize(lpaca->stab_real);
412 - }
413 + if (cpu_has_feature(CPU_FTR_SLB))
414 + slb_initialize();
415 + else if (!firmware_has_feature(FW_FEATURE_ISERIES))
416 + stab_initialize(lpaca->stab_real);
417
418 DBG(" <- early_setup()\n");
419 }
420 diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
421 index 4324f8a..096dfdc 100644
422 --- a/arch/powerpc/kernel/signal_64.c
423 +++ b/arch/powerpc/kernel/signal_64.c
424 @@ -213,7 +213,7 @@ static inline void __user * get_sigframe
425 /* Default to using normal stack */
426 newsp = regs->gpr[1];
427
428 - if (ka->sa.sa_flags & SA_ONSTACK) {
429 + if ((ka->sa.sa_flags & SA_ONSTACK) && current->sas_ss_size) {
430 if (! on_sig_stack(regs->gpr[1]))
431 newsp = (current->sas_ss_sp + current->sas_ss_size);
432 }
433 diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
434 index c149d57..71552e1 100644
435 --- a/drivers/block/cciss.c
436 +++ b/drivers/block/cciss.c
437 @@ -1181,6 +1181,53 @@ static int revalidate_allvol(ctlr_info_t
438 return 0;
439 }
440
441 +static inline void complete_buffers(struct bio *bio, int status)
442 +{
443 + while (bio) {
444 + struct bio *xbh = bio->bi_next;
445 + int nr_sectors = bio_sectors(bio);
446 +
447 + bio->bi_next = NULL;
448 + blk_finished_io(len);
449 + bio_endio(bio, nr_sectors << 9, status ? 0 : -EIO);
450 + bio = xbh;
451 + }
452 +
453 +}
454 +
455 +static void cciss_softirq_done(struct request *rq)
456 +{
457 + CommandList_struct *cmd = rq->completion_data;
458 + ctlr_info_t *h = hba[cmd->ctlr];
459 + unsigned long flags;
460 + u64bit temp64;
461 + int i, ddir;
462 +
463 + if (cmd->Request.Type.Direction == XFER_READ)
464 + ddir = PCI_DMA_FROMDEVICE;
465 + else
466 + ddir = PCI_DMA_TODEVICE;
467 +
468 + /* command did not need to be retried */
469 + /* unmap the DMA mapping for all the scatter gather elements */
470 + for(i=0; i<cmd->Header.SGList; i++) {
471 + temp64.val32.lower = cmd->SG[i].Addr.lower;
472 + temp64.val32.upper = cmd->SG[i].Addr.upper;
473 + pci_unmap_page(h->pdev, temp64.val, cmd->SG[i].Len, ddir);
474 + }
475 +
476 + complete_buffers(rq->bio, rq->errors);
477 +
478 +#ifdef CCISS_DEBUG
479 + printk("Done with %p\n", rq);
480 +#endif /* CCISS_DEBUG */
481 +
482 + spin_lock_irqsave(&h->lock, flags);
483 + end_that_request_last(rq, rq->errors);
484 + cmd_free(h, cmd,1);
485 + spin_unlock_irqrestore(&h->lock, flags);
486 +}
487 +
488 /* This function will check the usage_count of the drive to be updated/added.
489 * If the usage_count is zero then the drive information will be updated and
490 * the disk will be re-registered with the kernel. If not then it will be
491 @@ -1249,6 +1296,8 @@ static void cciss_update_drive_info(int
492
493 blk_queue_max_sectors(disk->queue, 512);
494
495 + blk_queue_softirq_done(disk->queue, cciss_softirq_done);
496 +
497 disk->queue->queuedata = hba[ctlr];
498
499 blk_queue_hardsect_size(disk->queue,
500 @@ -2148,20 +2197,6 @@ static void start_io( ctlr_info_t *h)
501 addQ (&(h->cmpQ), c);
502 }
503 }
504 -
505 -static inline void complete_buffers(struct bio *bio, int status)
506 -{
507 - while (bio) {
508 - struct bio *xbh = bio->bi_next;
509 - int nr_sectors = bio_sectors(bio);
510 -
511 - bio->bi_next = NULL;
512 - blk_finished_io(len);
513 - bio_endio(bio, nr_sectors << 9, status ? 0 : -EIO);
514 - bio = xbh;
515 - }
516 -
517 -}
518 /* Assumes that CCISS_LOCK(h->ctlr) is held. */
519 /* Zeros out the error record and then resends the command back */
520 /* to the controller */
521 @@ -2179,39 +2214,6 @@ static inline void resend_cciss_cmd( ctl
522 start_io(h);
523 }
524
525 -static void cciss_softirq_done(struct request *rq)
526 -{
527 - CommandList_struct *cmd = rq->completion_data;
528 - ctlr_info_t *h = hba[cmd->ctlr];
529 - unsigned long flags;
530 - u64bit temp64;
531 - int i, ddir;
532 -
533 - if (cmd->Request.Type.Direction == XFER_READ)
534 - ddir = PCI_DMA_FROMDEVICE;
535 - else
536 - ddir = PCI_DMA_TODEVICE;
537 -
538 - /* command did not need to be retried */
539 - /* unmap the DMA mapping for all the scatter gather elements */
540 - for(i=0; i<cmd->Header.SGList; i++) {
541 - temp64.val32.lower = cmd->SG[i].Addr.lower;
542 - temp64.val32.upper = cmd->SG[i].Addr.upper;
543 - pci_unmap_page(h->pdev, temp64.val, cmd->SG[i].Len, ddir);
544 - }
545 -
546 - complete_buffers(rq->bio, rq->errors);
547 -
548 -#ifdef CCISS_DEBUG
549 - printk("Done with %p\n", rq);
550 -#endif /* CCISS_DEBUG */
551 -
552 - spin_lock_irqsave(&h->lock, flags);
553 - end_that_request_last(rq, rq->errors);
554 - cmd_free(h, cmd,1);
555 - spin_unlock_irqrestore(&h->lock, flags);
556 -}
557 -
558 /* checks the status of the job and calls complete buffers to mark all
559 * buffers for the completed job. Note that this function does not need
560 * to hold the hba/queue lock.
561 diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c
562 index 2546637..f58ad7f 100644
563 --- a/drivers/char/tlclk.c
564 +++ b/drivers/char/tlclk.c
565 @@ -327,7 +327,7 @@ static ssize_t store_received_ref_clk3a(
566 return strnlen(buf, count);
567 }
568
569 -static DEVICE_ATTR(received_ref_clk3a, S_IWUGO, NULL,
570 +static DEVICE_ATTR(received_ref_clk3a, (S_IWUSR|S_IWGRP), NULL,
571 store_received_ref_clk3a);
572
573
574 @@ -349,7 +349,7 @@ static ssize_t store_received_ref_clk3b(
575 return strnlen(buf, count);
576 }
577
578 -static DEVICE_ATTR(received_ref_clk3b, S_IWUGO, NULL,
579 +static DEVICE_ATTR(received_ref_clk3b, (S_IWUSR|S_IWGRP), NULL,
580 store_received_ref_clk3b);
581
582
583 @@ -371,7 +371,7 @@ static ssize_t store_enable_clk3b_output
584 return strnlen(buf, count);
585 }
586
587 -static DEVICE_ATTR(enable_clk3b_output, S_IWUGO, NULL,
588 +static DEVICE_ATTR(enable_clk3b_output, (S_IWUSR|S_IWGRP), NULL,
589 store_enable_clk3b_output);
590
591 static ssize_t store_enable_clk3a_output(struct device *d,
592 @@ -392,7 +392,7 @@ static ssize_t store_enable_clk3a_output
593 return strnlen(buf, count);
594 }
595
596 -static DEVICE_ATTR(enable_clk3a_output, S_IWUGO, NULL,
597 +static DEVICE_ATTR(enable_clk3a_output, (S_IWUSR|S_IWGRP), NULL,
598 store_enable_clk3a_output);
599
600 static ssize_t store_enable_clkb1_output(struct device *d,
601 @@ -413,7 +413,7 @@ static ssize_t store_enable_clkb1_output
602 return strnlen(buf, count);
603 }
604
605 -static DEVICE_ATTR(enable_clkb1_output, S_IWUGO, NULL,
606 +static DEVICE_ATTR(enable_clkb1_output, (S_IWUSR|S_IWGRP), NULL,
607 store_enable_clkb1_output);
608
609
610 @@ -435,7 +435,7 @@ static ssize_t store_enable_clka1_output
611 return strnlen(buf, count);
612 }
613
614 -static DEVICE_ATTR(enable_clka1_output, S_IWUGO, NULL,
615 +static DEVICE_ATTR(enable_clka1_output, (S_IWUSR|S_IWGRP), NULL,
616 store_enable_clka1_output);
617
618 static ssize_t store_enable_clkb0_output(struct device *d,
619 @@ -456,7 +456,7 @@ static ssize_t store_enable_clkb0_output
620 return strnlen(buf, count);
621 }
622
623 -static DEVICE_ATTR(enable_clkb0_output, S_IWUGO, NULL,
624 +static DEVICE_ATTR(enable_clkb0_output, (S_IWUSR|S_IWGRP), NULL,
625 store_enable_clkb0_output);
626
627 static ssize_t store_enable_clka0_output(struct device *d,
628 @@ -477,7 +477,7 @@ static ssize_t store_enable_clka0_output
629 return strnlen(buf, count);
630 }
631
632 -static DEVICE_ATTR(enable_clka0_output, S_IWUGO, NULL,
633 +static DEVICE_ATTR(enable_clka0_output, (S_IWUSR|S_IWGRP), NULL,
634 store_enable_clka0_output);
635
636 static ssize_t store_select_amcb2_transmit_clock(struct device *d,
637 @@ -519,7 +519,7 @@ static ssize_t store_select_amcb2_transm
638 return strnlen(buf, count);
639 }
640
641 -static DEVICE_ATTR(select_amcb2_transmit_clock, S_IWUGO, NULL,
642 +static DEVICE_ATTR(select_amcb2_transmit_clock, (S_IWUSR|S_IWGRP), NULL,
643 store_select_amcb2_transmit_clock);
644
645 static ssize_t store_select_amcb1_transmit_clock(struct device *d,
646 @@ -560,7 +560,7 @@ static ssize_t store_select_amcb1_transm
647 return strnlen(buf, count);
648 }
649
650 -static DEVICE_ATTR(select_amcb1_transmit_clock, S_IWUGO, NULL,
651 +static DEVICE_ATTR(select_amcb1_transmit_clock, (S_IWUSR|S_IWGRP), NULL,
652 store_select_amcb1_transmit_clock);
653
654 static ssize_t store_select_redundant_clock(struct device *d,
655 @@ -581,7 +581,7 @@ static ssize_t store_select_redundant_cl
656 return strnlen(buf, count);
657 }
658
659 -static DEVICE_ATTR(select_redundant_clock, S_IWUGO, NULL,
660 +static DEVICE_ATTR(select_redundant_clock, (S_IWUSR|S_IWGRP), NULL,
661 store_select_redundant_clock);
662
663 static ssize_t store_select_ref_frequency(struct device *d,
664 @@ -602,7 +602,7 @@ static ssize_t store_select_ref_frequenc
665 return strnlen(buf, count);
666 }
667
668 -static DEVICE_ATTR(select_ref_frequency, S_IWUGO, NULL,
669 +static DEVICE_ATTR(select_ref_frequency, (S_IWUSR|S_IWGRP), NULL,
670 store_select_ref_frequency);
671
672 static ssize_t store_filter_select(struct device *d,
673 @@ -623,7 +623,7 @@ static ssize_t store_filter_select(struc
674 return strnlen(buf, count);
675 }
676
677 -static DEVICE_ATTR(filter_select, S_IWUGO, NULL, store_filter_select);
678 +static DEVICE_ATTR(filter_select, (S_IWUSR|S_IWGRP), NULL, store_filter_select);
679
680 static ssize_t store_hardware_switching_mode(struct device *d,
681 struct device_attribute *attr, const char *buf, size_t count)
682 @@ -643,7 +643,7 @@ static ssize_t store_hardware_switching_
683 return strnlen(buf, count);
684 }
685
686 -static DEVICE_ATTR(hardware_switching_mode, S_IWUGO, NULL,
687 +static DEVICE_ATTR(hardware_switching_mode, (S_IWUSR|S_IWGRP), NULL,
688 store_hardware_switching_mode);
689
690 static ssize_t store_hardware_switching(struct device *d,
691 @@ -664,7 +664,7 @@ static ssize_t store_hardware_switching(
692 return strnlen(buf, count);
693 }
694
695 -static DEVICE_ATTR(hardware_switching, S_IWUGO, NULL,
696 +static DEVICE_ATTR(hardware_switching, (S_IWUSR|S_IWGRP), NULL,
697 store_hardware_switching);
698
699 static ssize_t store_refalign (struct device *d,
700 @@ -684,7 +684,7 @@ static ssize_t store_refalign (struct de
701 return strnlen(buf, count);
702 }
703
704 -static DEVICE_ATTR(refalign, S_IWUGO, NULL, store_refalign);
705 +static DEVICE_ATTR(refalign, (S_IWUSR|S_IWGRP), NULL, store_refalign);
706
707 static ssize_t store_mode_select (struct device *d,
708 struct device_attribute *attr, const char *buf, size_t count)
709 @@ -704,7 +704,7 @@ static ssize_t store_mode_select (struct
710 return strnlen(buf, count);
711 }
712
713 -static DEVICE_ATTR(mode_select, S_IWUGO, NULL, store_mode_select);
714 +static DEVICE_ATTR(mode_select, (S_IWUSR|S_IWGRP), NULL, store_mode_select);
715
716 static ssize_t store_reset (struct device *d,
717 struct device_attribute *attr, const char *buf, size_t count)
718 @@ -724,7 +724,7 @@ static ssize_t store_reset (struct devic
719 return strnlen(buf, count);
720 }
721
722 -static DEVICE_ATTR(reset, S_IWUGO, NULL, store_reset);
723 +static DEVICE_ATTR(reset, (S_IWUSR|S_IWGRP), NULL, store_reset);
724
725 static struct attribute *tlclk_sysfs_entries[] = {
726 &dev_attr_current_ref.attr,
727 diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
728 index 52f3eb4..7ecdb1e 100644
729 --- a/drivers/edac/Kconfig
730 +++ b/drivers/edac/Kconfig
731 @@ -71,7 +71,7 @@ config EDAC_E7XXX
732
733 config EDAC_E752X
734 tristate "Intel e752x (e7520, e7525, e7320)"
735 - depends on EDAC_MM_EDAC && PCI
736 + depends on EDAC_MM_EDAC && PCI && HOTPLUG
737 help
738 Support for error detection and correction on the Intel
739 E7520, E7525, E7320 server chipsets.
740 diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
741 index 7326036..0618cd5 100644
742 --- a/drivers/net/sky2.c
743 +++ b/drivers/net/sky2.c
744 @@ -579,8 +579,8 @@ static void sky2_mac_init(struct sky2_hw
745 reg = gma_read16(hw, port, GM_PHY_ADDR);
746 gma_write16(hw, port, GM_PHY_ADDR, reg | GM_PAR_MIB_CLR);
747
748 - for (i = 0; i < GM_MIB_CNT_SIZE; i++)
749 - gma_read16(hw, port, GM_MIB_CNT_BASE + 8 * i);
750 + for (i = GM_MIB_CNT_BASE; i <= GM_MIB_CNT_END; i += 4)
751 + gma_read16(hw, port, i);
752 gma_write16(hw, port, GM_PHY_ADDR, reg);
753
754 /* transmit control */
755 diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
756 index dce955c..c91e0a4 100644
757 --- a/drivers/net/sky2.h
758 +++ b/drivers/net/sky2.h
759 @@ -1380,6 +1380,7 @@ enum {
760 /* MIB Counters */
761 #define GM_MIB_CNT_BASE 0x0100 /* Base Address of MIB Counters */
762 #define GM_MIB_CNT_SIZE 44 /* Number of MIB Counters */
763 +#define GM_MIB_CNT_END 0x025C /* Last MIB counter */
764
765 /*
766 * MIB Counters base address definitions (low word) -
767 diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
768 index 167f8ec..8023bb7 100644
769 --- a/drivers/usb/serial/console.c
770 +++ b/drivers/usb/serial/console.c
771 @@ -54,7 +54,7 @@ static struct console usbcons;
772 * serial.c code, except that the specifier is "ttyUSB" instead
773 * of "ttyS".
774 */
775 -static int __init usb_console_setup(struct console *co, char *options)
776 +static int usb_console_setup(struct console *co, char *options)
777 {
778 struct usbcons_info *info = &usbcons_info;
779 int baud = 9600;
780 diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig
781 index 92be101..be9eec2 100644
782 --- a/drivers/usb/storage/Kconfig
783 +++ b/drivers/usb/storage/Kconfig
784 @@ -48,7 +48,8 @@ config USB_STORAGE_FREECOM
785
786 config USB_STORAGE_ISD200
787 bool "ISD-200 USB/ATA Bridge support"
788 - depends on USB_STORAGE && BLK_DEV_IDE
789 + depends on USB_STORAGE
790 + depends on BLK_DEV_IDE=y || BLK_DEV_IDE=USB_STORAGE
791 ---help---
792 Say Y here if you want to use USB Mass Store devices based
793 on the In-Systems Design ISD-200 USB/ATA bridge.
794 diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
795 index a2c2485..3f5e38c 100644
796 --- a/fs/cifs/cifsencrypt.c
797 +++ b/fs/cifs/cifsencrypt.c
798 @@ -56,9 +56,6 @@ int cifs_sign_smb(struct smb_hdr * cifs_
799 int rc = 0;
800 char smb_signature[20];
801
802 - /* BB remember to initialize sequence number elsewhere and initialize mac_signing key elsewhere BB */
803 - /* BB remember to add code to save expected sequence number in midQ entry BB */
804 -
805 if((cifs_pdu == NULL) || (server == NULL))
806 return -EINVAL;
807
808 @@ -85,20 +82,33 @@ int cifs_sign_smb(struct smb_hdr * cifs_
809 static int cifs_calc_signature2(const struct kvec * iov, int n_vec,
810 const char * key, char * signature)
811 {
812 - struct MD5Context context;
813 -
814 - if((iov == NULL) || (signature == NULL))
815 - return -EINVAL;
816 + struct MD5Context context;
817 + int i;
818
819 - MD5Init(&context);
820 - MD5Update(&context,key,CIFS_SESSION_KEY_SIZE+16);
821 + if((iov == NULL) || (signature == NULL))
822 + return -EINVAL;
823
824 -/* MD5Update(&context,cifs_pdu->Protocol,cifs_pdu->smb_buf_length); */ /* BB FIXME BB */
825 + MD5Init(&context);
826 + MD5Update(&context,key,CIFS_SESSION_KEY_SIZE+16);
827 + for(i=0;i<n_vec;i++) {
828 + if(iov[i].iov_base == NULL) {
829 + cERROR(1,("null iovec entry"));
830 + return -EIO;
831 + } else if(iov[i].iov_len == 0)
832 + break; /* bail out if we are sent nothing to sign */
833 + /* The first entry includes a length field (which does not get
834 + signed that occupies the first 4 bytes before the header */
835 + if(i==0) {
836 + if (iov[0].iov_len <= 8 ) /* cmd field at offset 9 */
837 + break; /* nothing to sign or corrupt header */
838 + MD5Update(&context,iov[0].iov_base+4, iov[0].iov_len-4);
839 + } else
840 + MD5Update(&context,iov[i].iov_base, iov[i].iov_len);
841 + }
842
843 - MD5Final(signature,&context);
844 + MD5Final(signature,&context);
845
846 - return -EOPNOTSUPP;
847 -/* return 0; */
848 + return 0;
849 }
850
851
852 diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c
853 index 1041dab..14f5f6e 100644
854 --- a/fs/ext3/resize.c
855 +++ b/fs/ext3/resize.c
856 @@ -974,6 +974,7 @@ int ext3_group_extend(struct super_block
857 if (o_blocks_count != le32_to_cpu(es->s_blocks_count)) {
858 ext3_warning(sb, __FUNCTION__,
859 "multiple resizers run on filesystem!");
860 + unlock_super(sb);
861 err = -EBUSY;
862 goto exit_put;
863 }
864 diff --git a/fs/fuse/file.c b/fs/fuse/file.c
865 index 6f05379..ce93cf9 100644
866 --- a/fs/fuse/file.c
867 +++ b/fs/fuse/file.c
868 @@ -397,8 +397,12 @@ static int fuse_readpages(struct file *f
869 return -EINTR;
870
871 err = read_cache_pages(mapping, pages, fuse_readpages_fill, &data);
872 - if (!err)
873 - fuse_send_readpages(data.req, file, inode);
874 + if (!err) {
875 + if (data.req->num_pages)
876 + fuse_send_readpages(data.req, file, inode);
877 + else
878 + fuse_put_request(fc, data.req);
879 + }
880 return err;
881 }
882
883 diff --git a/fs/partitions/check.c b/fs/partitions/check.c
884 index f924f45..2ef03aa 100644
885 --- a/fs/partitions/check.c
886 +++ b/fs/partitions/check.c
887 @@ -345,6 +345,7 @@ static char *make_block_name(struct gend
888 char *name;
889 static char *block_str = "block:";
890 int size;
891 + char *s;
892
893 size = strlen(block_str) + strlen(disk->disk_name) + 1;
894 name = kmalloc(size, GFP_KERNEL);
895 @@ -352,6 +353,10 @@ static char *make_block_name(struct gend
896 return NULL;
897 strcpy(name, block_str);
898 strcat(name, disk->disk_name);
899 + /* ewww... some of these buggers have / in name... */
900 + s = strchr(name, '/');
901 + if (s)
902 + *s = '!';
903 return name;
904 }
905
906 diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
907 index d7f6f2d..43808e2 100644
908 --- a/fs/xfs/linux-2.6/xfs_iops.c
909 +++ b/fs/xfs/linux-2.6/xfs_iops.c
910 @@ -673,8 +673,7 @@ linvfs_setattr(
911 if (ia_valid & ATTR_ATIME) {
912 vattr.va_mask |= XFS_AT_ATIME;
913 vattr.va_atime = attr->ia_atime;
914 - if (ia_valid & ATTR_ATIME_SET)
915 - inode->i_atime = attr->ia_atime;
916 + inode->i_atime = attr->ia_atime;
917 }
918 if (ia_valid & ATTR_MTIME) {
919 vattr.va_mask |= XFS_AT_MTIME;
920 diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h
921 index 7885b7d..1184293 100644
922 --- a/include/asm-m32r/smp.h
923 +++ b/include/asm-m32r/smp.h
924 @@ -67,7 +67,8 @@ extern volatile int cpu_2_physid[NR_CPUS
925 #define raw_smp_processor_id() (current_thread_info()->cpu)
926
927 extern cpumask_t cpu_callout_map;
928 -#define cpu_possible_map cpu_callout_map
929 +extern cpumask_t cpu_possible_map;
930 +extern cpumask_t cpu_present_map;
931
932 static __inline__ int hard_smp_processor_id(void)
933 {
934 diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h
935 index e8ae619..819cc28 100644
936 --- a/include/asm-m32r/uaccess.h
937 +++ b/include/asm-m32r/uaccess.h
938 @@ -5,17 +5,9 @@
939 * linux/include/asm-m32r/uaccess.h
940 *
941 * M32R version.
942 - * Copyright (C) 2004 Hirokazu Takata <takata at linux-m32r.org>
943 + * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org>
944 */
945
946 -#undef UACCESS_DEBUG
947 -
948 -#ifdef UACCESS_DEBUG
949 -#define UAPRINTK(args...) printk(args)
950 -#else
951 -#define UAPRINTK(args...)
952 -#endif /* UACCESS_DEBUG */
953 -
954 /*
955 * User space memory access functions
956 */
957 @@ -38,27 +30,29 @@
958 #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
959
960 #ifdef CONFIG_MMU
961 +
962 #define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
963 #define USER_DS MAKE_MM_SEG(PAGE_OFFSET)
964 -#else
965 -#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
966 -#define USER_DS MAKE_MM_SEG(0xFFFFFFFF)
967 -#endif /* CONFIG_MMU */
968 -
969 #define get_ds() (KERNEL_DS)
970 -#ifdef CONFIG_MMU
971 #define get_fs() (current_thread_info()->addr_limit)
972 #define set_fs(x) (current_thread_info()->addr_limit = (x))
973 -#else
974 +
975 +#else /* not CONFIG_MMU */
976 +
977 +#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
978 +#define USER_DS MAKE_MM_SEG(0xFFFFFFFF)
979 +#define get_ds() (KERNEL_DS)
980 +
981 static inline mm_segment_t get_fs(void)
982 {
983 - return USER_DS;
984 + return USER_DS;
985 }
986
987 static inline void set_fs(mm_segment_t s)
988 {
989 }
990 -#endif /* CONFIG_MMU */
991 +
992 +#endif /* not CONFIG_MMU */
993
994 #define segment_eq(a,b) ((a).seg == (b).seg)
995
996 @@ -83,9 +77,9 @@ static inline void set_fs(mm_segment_t s
997 " subx %0, %0\n" \
998 " cmpu %4, %1\n" \
999 " subx %0, %5\n" \
1000 - : "=&r"(flag), "=r"(sum) \
1001 - : "1"(addr), "r"((int)(size)), \
1002 - "r"(current_thread_info()->addr_limit.seg), "r"(0) \
1003 + : "=&r" (flag), "=r" (sum) \
1004 + : "1" (addr), "r" ((int)(size)), \
1005 + "r" (current_thread_info()->addr_limit.seg), "r" (0) \
1006 : "cbit" ); \
1007 flag; })
1008
1009 @@ -113,10 +107,10 @@ static inline void set_fs(mm_segment_t s
1010 #else
1011 static inline int access_ok(int type, const void *addr, unsigned long size)
1012 {
1013 - extern unsigned long memory_start, memory_end;
1014 - unsigned long val = (unsigned long)addr;
1015 + extern unsigned long memory_start, memory_end;
1016 + unsigned long val = (unsigned long)addr;
1017
1018 - return ((val >= memory_start) && ((val + size) < memory_end));
1019 + return ((val >= memory_start) && ((val + size) < memory_end));
1020 }
1021 #endif /* CONFIG_MMU */
1022
1023 @@ -155,39 +149,6 @@ extern int fixup_exception(struct pt_reg
1024 * accesses to the same area of user memory).
1025 */
1026
1027 -extern void __get_user_1(void);
1028 -extern void __get_user_2(void);
1029 -extern void __get_user_4(void);
1030 -
1031 -#ifndef MODULE
1032 -#define __get_user_x(size,ret,x,ptr) \
1033 - __asm__ __volatile__( \
1034 - " mv r0, %0\n" \
1035 - " mv r1, %1\n" \
1036 - " bl __get_user_" #size "\n" \
1037 - " mv %0, r0\n" \
1038 - " mv %1, r1\n" \
1039 - : "=r"(ret), "=r"(x) \
1040 - : "0"(ptr) \
1041 - : "r0", "r1", "r14" )
1042 -#else /* MODULE */
1043 -/*
1044 - * Use "jl" instead of "bl" for MODULE
1045 - */
1046 -#define __get_user_x(size,ret,x,ptr) \
1047 - __asm__ __volatile__( \
1048 - " mv r0, %0\n" \
1049 - " mv r1, %1\n" \
1050 - " seth lr, #high(__get_user_" #size ")\n" \
1051 - " or3 lr, lr, #low(__get_user_" #size ")\n" \
1052 - " jl lr\n" \
1053 - " mv %0, r0\n" \
1054 - " mv %1, r1\n" \
1055 - : "=r"(ret), "=r"(x) \
1056 - : "0"(ptr) \
1057 - : "r0", "r1", "r14" )
1058 -#endif
1059 -
1060 /* Careful: we have to cast the result to the type of the pointer for sign
1061 reasons */
1062 /**
1063 @@ -208,20 +169,7 @@ extern void __get_user_4(void);
1064 * On error, the variable @x is set to zero.
1065 */
1066 #define get_user(x,ptr) \
1067 -({ int __ret_gu; \
1068 - unsigned long __val_gu; \
1069 - __chk_user_ptr(ptr); \
1070 - switch(sizeof (*(ptr))) { \
1071 - case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; \
1072 - case 2: __get_user_x(2,__ret_gu,__val_gu,ptr); break; \
1073 - case 4: __get_user_x(4,__ret_gu,__val_gu,ptr); break; \
1074 - default: __get_user_x(X,__ret_gu,__val_gu,ptr); break; \
1075 - } \
1076 - (x) = (__typeof__(*(ptr)))__val_gu; \
1077 - __ret_gu; \
1078 -})
1079 -
1080 -extern void __put_user_bad(void);
1081 + __get_user_check((x),(ptr),sizeof(*(ptr)))
1082
1083 /**
1084 * put_user: - Write a simple value into user space.
1085 @@ -240,8 +188,7 @@ extern void __put_user_bad(void);
1086 * Returns zero on success, or -EFAULT on error.
1087 */
1088 #define put_user(x,ptr) \
1089 - __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
1090 -
1091 + __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
1092
1093 /**
1094 * __get_user: - Get a simple variable from user space, with less checking.
1095 @@ -264,8 +211,64 @@ extern void __put_user_bad(void);
1096 * On error, the variable @x is set to zero.
1097 */
1098 #define __get_user(x,ptr) \
1099 - __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
1100 + __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
1101
1102 +#define __get_user_nocheck(x,ptr,size) \
1103 +({ \
1104 + long __gu_err = 0; \
1105 + unsigned long __gu_val; \
1106 + might_sleep(); \
1107 + __get_user_size(__gu_val,(ptr),(size),__gu_err); \
1108 + (x) = (__typeof__(*(ptr)))__gu_val; \
1109 + __gu_err; \
1110 +})
1111 +
1112 +#define __get_user_check(x,ptr,size) \
1113 +({ \
1114 + long __gu_err = -EFAULT; \
1115 + unsigned long __gu_val = 0; \
1116 + const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
1117 + might_sleep(); \
1118 + if (access_ok(VERIFY_READ,__gu_addr,size)) \
1119 + __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \
1120 + (x) = (__typeof__(*(ptr)))__gu_val; \
1121 + __gu_err; \
1122 +})
1123 +
1124 +extern long __get_user_bad(void);
1125 +
1126 +#define __get_user_size(x,ptr,size,retval) \
1127 +do { \
1128 + retval = 0; \
1129 + __chk_user_ptr(ptr); \
1130 + switch (size) { \
1131 + case 1: __get_user_asm(x,ptr,retval,"ub"); break; \
1132 + case 2: __get_user_asm(x,ptr,retval,"uh"); break; \
1133 + case 4: __get_user_asm(x,ptr,retval,""); break; \
1134 + default: (x) = __get_user_bad(); \
1135 + } \
1136 +} while (0)
1137 +
1138 +#define __get_user_asm(x, addr, err, itype) \
1139 + __asm__ __volatile__( \
1140 + " .fillinsn\n" \
1141 + "1: ld"itype" %1,@%2\n" \
1142 + " .fillinsn\n" \
1143 + "2:\n" \
1144 + ".section .fixup,\"ax\"\n" \
1145 + " .balign 4\n" \
1146 + "3: ldi %0,%3\n" \
1147 + " seth r14,#high(2b)\n" \
1148 + " or3 r14,r14,#low(2b)\n" \
1149 + " jmp r14\n" \
1150 + ".previous\n" \
1151 + ".section __ex_table,\"a\"\n" \
1152 + " .balign 4\n" \
1153 + " .long 1b,3b\n" \
1154 + ".previous" \
1155 + : "=&r" (err), "=&r" (x) \
1156 + : "r" (addr), "i" (-EFAULT), "0" (err) \
1157 + : "r14", "memory")
1158
1159 /**
1160 * __put_user: - Write a simple value into user space, with less checking.
1161 @@ -287,11 +290,13 @@ extern void __put_user_bad(void);
1162 * Returns zero on success, or -EFAULT on error.
1163 */
1164 #define __put_user(x,ptr) \
1165 - __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
1166 + __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
1167 +
1168
1169 #define __put_user_nocheck(x,ptr,size) \
1170 ({ \
1171 long __pu_err; \
1172 + might_sleep(); \
1173 __put_user_size((x),(ptr),(size),__pu_err); \
1174 __pu_err; \
1175 })
1176 @@ -308,28 +313,28 @@ extern void __put_user_bad(void);
1177 })
1178
1179 #if defined(__LITTLE_ENDIAN__)
1180 -#define __put_user_u64(x, addr, err) \
1181 - __asm__ __volatile__( \
1182 - " .fillinsn\n" \
1183 - "1: st %L1,@%2\n" \
1184 - " .fillinsn\n" \
1185 - "2: st %H1,@(4,%2)\n" \
1186 - " .fillinsn\n" \
1187 - "3:\n" \
1188 - ".section .fixup,\"ax\"\n" \
1189 - " .balign 4\n" \
1190 - "4: ldi %0,%3\n" \
1191 - " seth r14,#high(3b)\n" \
1192 - " or3 r14,r14,#low(3b)\n" \
1193 - " jmp r14\n" \
1194 - ".previous\n" \
1195 - ".section __ex_table,\"a\"\n" \
1196 - " .balign 4\n" \
1197 - " .long 1b,4b\n" \
1198 - " .long 2b,4b\n" \
1199 - ".previous" \
1200 - : "=&r"(err) \
1201 - : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \
1202 +#define __put_user_u64(x, addr, err) \
1203 + __asm__ __volatile__( \
1204 + " .fillinsn\n" \
1205 + "1: st %L1,@%2\n" \
1206 + " .fillinsn\n" \
1207 + "2: st %H1,@(4,%2)\n" \
1208 + " .fillinsn\n" \
1209 + "3:\n" \
1210 + ".section .fixup,\"ax\"\n" \
1211 + " .balign 4\n" \
1212 + "4: ldi %0,%3\n" \
1213 + " seth r14,#high(3b)\n" \
1214 + " or3 r14,r14,#low(3b)\n" \
1215 + " jmp r14\n" \
1216 + ".previous\n" \
1217 + ".section __ex_table,\"a\"\n" \
1218 + " .balign 4\n" \
1219 + " .long 1b,4b\n" \
1220 + " .long 2b,4b\n" \
1221 + ".previous" \
1222 + : "=&r" (err) \
1223 + : "r" (x), "r" (addr), "i" (-EFAULT), "0" (err) \
1224 : "r14", "memory")
1225
1226 #elif defined(__BIG_ENDIAN__)
1227 @@ -353,13 +358,15 @@ extern void __put_user_bad(void);
1228 " .long 1b,4b\n" \
1229 " .long 2b,4b\n" \
1230 ".previous" \
1231 - : "=&r"(err) \
1232 - : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \
1233 + : "=&r" (err) \
1234 + : "r" (x), "r" (addr), "i" (-EFAULT), "0" (err) \
1235 : "r14", "memory")
1236 #else
1237 #error no endian defined
1238 #endif
1239
1240 +extern void __put_user_bad(void);
1241 +
1242 #define __put_user_size(x,ptr,size,retval) \
1243 do { \
1244 retval = 0; \
1245 @@ -398,52 +405,8 @@ struct __large_struct { unsigned long bu
1246 " .balign 4\n" \
1247 " .long 1b,3b\n" \
1248 ".previous" \
1249 - : "=&r"(err) \
1250 - : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \
1251 - : "r14", "memory")
1252 -
1253 -#define __get_user_nocheck(x,ptr,size) \
1254 -({ \
1255 - long __gu_err; \
1256 - unsigned long __gu_val; \
1257 - __get_user_size(__gu_val,(ptr),(size),__gu_err); \
1258 - (x) = (__typeof__(*(ptr)))__gu_val; \
1259 - __gu_err; \
1260 -})
1261 -
1262 -extern long __get_user_bad(void);
1263 -
1264 -#define __get_user_size(x,ptr,size,retval) \
1265 -do { \
1266 - retval = 0; \
1267 - __chk_user_ptr(ptr); \
1268 - switch (size) { \
1269 - case 1: __get_user_asm(x,ptr,retval,"ub"); break; \
1270 - case 2: __get_user_asm(x,ptr,retval,"uh"); break; \
1271 - case 4: __get_user_asm(x,ptr,retval,""); break; \
1272 - default: (x) = __get_user_bad(); \
1273 - } \
1274 -} while (0)
1275 -
1276 -#define __get_user_asm(x, addr, err, itype) \
1277 - __asm__ __volatile__( \
1278 - " .fillinsn\n" \
1279 - "1: ld"itype" %1,@%2\n" \
1280 - " .fillinsn\n" \
1281 - "2:\n" \
1282 - ".section .fixup,\"ax\"\n" \
1283 - " .balign 4\n" \
1284 - "3: ldi %0,%3\n" \
1285 - " seth r14,#high(2b)\n" \
1286 - " or3 r14,r14,#low(2b)\n" \
1287 - " jmp r14\n" \
1288 - ".previous\n" \
1289 - ".section __ex_table,\"a\"\n" \
1290 - " .balign 4\n" \
1291 - " .long 1b,3b\n" \
1292 - ".previous" \
1293 - : "=&r"(err), "=&r"(x) \
1294 - : "r"(addr), "i"(-EFAULT), "0"(err) \
1295 + : "=&r" (err) \
1296 + : "r" (x), "r" (addr), "i" (-EFAULT), "0" (err) \
1297 : "r14", "memory")
1298
1299 /*
1300 @@ -453,7 +416,6 @@ do { \
1301 * anything, so this is accurate.
1302 */
1303
1304 -
1305 /*
1306 * Copy To/From Userspace
1307 */
1308 @@ -511,8 +473,9 @@ do { \
1309 " .long 2b,9b\n" \
1310 " .long 3b,9b\n" \
1311 ".previous\n" \
1312 - : "=&r"(__dst), "=&r"(__src), "=&r"(size), "=&r"(__c) \
1313 - : "0"(to), "1"(from), "2"(size), "3"(size / 4) \
1314 + : "=&r" (__dst), "=&r" (__src), "=&r" (size), \
1315 + "=&r" (__c) \
1316 + : "0" (to), "1" (from), "2" (size), "3" (size / 4) \
1317 : "r14", "memory"); \
1318 } while (0)
1319
1320 @@ -573,8 +536,9 @@ do { \
1321 " .long 2b,7b\n" \
1322 " .long 3b,7b\n" \
1323 ".previous\n" \
1324 - : "=&r"(__dst), "=&r"(__src), "=&r"(size), "=&r"(__c) \
1325 - : "0"(to), "1"(from), "2"(size), "3"(size / 4) \
1326 + : "=&r" (__dst), "=&r" (__src), "=&r" (size), \
1327 + "=&r" (__c) \
1328 + : "0" (to), "1" (from), "2" (size), "3" (size / 4) \
1329 : "r14", "memory"); \
1330 } while (0)
1331
1332 @@ -676,7 +640,7 @@ unsigned long __generic_copy_from_user(v
1333 #define copy_from_user(to,from,n) \
1334 ({ \
1335 might_sleep(); \
1336 -__generic_copy_from_user((to),(from),(n)); \
1337 + __generic_copy_from_user((to),(from),(n)); \
1338 })
1339
1340 long __must_check strncpy_from_user(char *dst, const char __user *src,
1341 diff --git a/include/linux/mm.h b/include/linux/mm.h
1342 index 498ff87..279446e 100644
1343 --- a/include/linux/mm.h
1344 +++ b/include/linux/mm.h
1345 @@ -229,10 +229,9 @@ struct page {
1346 unsigned long private; /* Mapping-private opaque data:
1347 * usually used for buffer_heads
1348 * if PagePrivate set; used for
1349 - * swp_entry_t if PageSwapCache.
1350 - * When page is free, this
1351 + * swp_entry_t if PageSwapCache;
1352 * indicates order in the buddy
1353 - * system.
1354 + * system if PG_buddy is set.
1355 */
1356 struct address_space *mapping; /* If low bit clear, points to
1357 * inode address_space, or NULL.
1358 diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
1359 index d52999c..d7ce72e 100644
1360 --- a/include/linux/page-flags.h
1361 +++ b/include/linux/page-flags.h
1362 @@ -74,7 +74,9 @@
1363 #define PG_mappedtodisk 16 /* Has blocks allocated on-disk */
1364 #define PG_reclaim 17 /* To be reclaimed asap */
1365 #define PG_nosave_free 18 /* Free, should not be written */
1366 -#define PG_uncached 19 /* Page has been mapped as uncached */
1367 +#define PG_buddy 19 /* Page is free, on buddy lists */
1368 +
1369 +#define PG_uncached 20 /* Page has been mapped as uncached */
1370
1371 /*
1372 * Global page accounting. One instance per CPU. Only unsigned longs are
1373 @@ -319,6 +321,10 @@ extern void __mod_page_state_offset(unsi
1374 #define SetPageNosaveFree(page) set_bit(PG_nosave_free, &(page)->flags)
1375 #define ClearPageNosaveFree(page) clear_bit(PG_nosave_free, &(page)->flags)
1376
1377 +#define PageBuddy(page) test_bit(PG_buddy, &(page)->flags)
1378 +#define __SetPageBuddy(page) __set_bit(PG_buddy, &(page)->flags)
1379 +#define __ClearPageBuddy(page) __clear_bit(PG_buddy, &(page)->flags)
1380 +
1381 #define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags)
1382 #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags)
1383 #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags)
1384 diff --git a/include/net/ip.h b/include/net/ip.h
1385 index fab3d5b..ed84d04 100644
1386 --- a/include/net/ip.h
1387 +++ b/include/net/ip.h
1388 @@ -95,6 +95,7 @@ extern int ip_local_deliver(struct sk_b
1389 extern int ip_mr_input(struct sk_buff *skb);
1390 extern int ip_output(struct sk_buff *skb);
1391 extern int ip_mc_output(struct sk_buff *skb);
1392 +extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *));
1393 extern int ip_do_nat(struct sk_buff *skb);
1394 extern void ip_send_check(struct iphdr *ip);
1395 extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok);
1396 diff --git a/ipc/shm.c b/ipc/shm.c
1397 index 9162123..f409726 100644
1398 --- a/ipc/shm.c
1399 +++ b/ipc/shm.c
1400 @@ -161,6 +161,8 @@ static int shm_mmap(struct file * file,
1401 ret = shmem_mmap(file, vma);
1402 if (ret == 0) {
1403 vma->vm_ops = &shm_vm_ops;
1404 + if (!(vma->vm_flags & VM_WRITE))
1405 + vma->vm_flags &= ~VM_MAYWRITE;
1406 shm_inc(file->f_dentry->d_inode->i_ino);
1407 }
1408
1409 diff --git a/kernel/power/process.c b/kernel/power/process.c
1410 index 28de118..67b2cdd 100644
1411 --- a/kernel/power/process.c
1412 +++ b/kernel/power/process.c
1413 @@ -25,8 +25,7 @@ static inline int freezeable(struct task
1414 (p->flags & PF_NOFREEZE) ||
1415 (p->exit_state == EXIT_ZOMBIE) ||
1416 (p->exit_state == EXIT_DEAD) ||
1417 - (p->state == TASK_STOPPED) ||
1418 - (p->state == TASK_TRACED))
1419 + (p->state == TASK_STOPPED))
1420 return 0;
1421 return 1;
1422 }
1423 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
1424 index d95a72c..b5eaeb9 100644
1425 --- a/kernel/ptrace.c
1426 +++ b/kernel/ptrace.c
1427 @@ -57,10 +57,6 @@ void ptrace_untrace(task_t *child)
1428 signal_wake_up(child, 1);
1429 }
1430 }
1431 - if (child->signal->flags & SIGNAL_GROUP_EXIT) {
1432 - sigaddset(&child->pending.signal, SIGKILL);
1433 - signal_wake_up(child, 1);
1434 - }
1435 spin_unlock(&child->sighand->siglock);
1436 }
1437
1438 @@ -82,7 +78,8 @@ void __ptrace_unlink(task_t *child)
1439 SET_LINKS(child);
1440 }
1441
1442 - ptrace_untrace(child);
1443 + if (child->state == TASK_TRACED)
1444 + ptrace_untrace(child);
1445 }
1446
1447 /*
1448 diff --git a/kernel/signal.c b/kernel/signal.c
1449 index bc8f80b..acbccf7 100644
1450 --- a/kernel/signal.c
1451 +++ b/kernel/signal.c
1452 @@ -1688,6 +1688,7 @@ static void ptrace_stop(int exit_code, i
1453 /* Let the debugger run. */
1454 set_current_state(TASK_TRACED);
1455 spin_unlock_irq(&current->sighand->siglock);
1456 + try_to_freeze();
1457 read_lock(&tasklist_lock);
1458 if (likely(current->ptrace & PT_PTRACED) &&
1459 likely(current->parent != current->real_parent ||
1460 @@ -1941,9 +1942,9 @@ relock:
1461 /* Let the debugger run. */
1462 ptrace_stop(signr, signr, info);
1463
1464 - /* We're back. Did the debugger cancel the sig or group_exit? */
1465 + /* We're back. Did the debugger cancel the sig? */
1466 signr = current->exit_code;
1467 - if (signr == 0 || current->signal->flags & SIGNAL_GROUP_EXIT)
1468 + if (signr == 0)
1469 continue;
1470
1471 current->exit_code = 0;
1472 diff --git a/kernel/sys.c b/kernel/sys.c
1473 index f91218a..105e102 100644
1474 --- a/kernel/sys.c
1475 +++ b/kernel/sys.c
1476 @@ -1657,7 +1657,19 @@ asmlinkage long sys_setrlimit(unsigned i
1477 (cputime_eq(current->signal->it_prof_expires, cputime_zero) ||
1478 new_rlim.rlim_cur <= cputime_to_secs(
1479 current->signal->it_prof_expires))) {
1480 - cputime_t cputime = secs_to_cputime(new_rlim.rlim_cur);
1481 + unsigned long rlim_cur = new_rlim.rlim_cur;
1482 + cputime_t cputime;
1483 +
1484 + if (rlim_cur == 0) {
1485 + /*
1486 + * The caller is asking for an immediate RLIMIT_CPU
1487 + * expiry. But we use the zero value to mean "it was
1488 + * never set". So let's cheat and make it one second
1489 + * instead
1490 + */
1491 + rlim_cur = 1;
1492 + }
1493 + cputime = secs_to_cputime(rlim_cur);
1494 read_lock(&tasklist_lock);
1495 spin_lock_irq(&current->sighand->siglock);
1496 set_process_cpu_timer(current, CPUCLOCK_PROF,
1497 diff --git a/mm/page_alloc.c b/mm/page_alloc.c
1498 index 234bd48..61de222 100644
1499 --- a/mm/page_alloc.c
1500 +++ b/mm/page_alloc.c
1501 @@ -153,7 +153,8 @@ static void bad_page(struct page *page)
1502 1 << PG_reclaim |
1503 1 << PG_slab |
1504 1 << PG_swapcache |
1505 - 1 << PG_writeback );
1506 + 1 << PG_writeback |
1507 + 1 << PG_buddy );
1508 set_page_count(page, 0);
1509 reset_page_mapcount(page);
1510 page->mapping = NULL;
1511 @@ -224,12 +225,12 @@ static inline unsigned long page_order(s
1512
1513 static inline void set_page_order(struct page *page, int order) {
1514 set_page_private(page, order);
1515 - __SetPagePrivate(page);
1516 + __SetPageBuddy(page);
1517 }
1518
1519 static inline void rmv_page_order(struct page *page)
1520 {
1521 - __ClearPagePrivate(page);
1522 + __ClearPageBuddy(page);
1523 set_page_private(page, 0);
1524 }
1525
1526 @@ -268,11 +269,13 @@ __find_combined_index(unsigned long page
1527 * This function checks whether a page is free && is the buddy
1528 * we can do coalesce a page and its buddy if
1529 * (a) the buddy is not in a hole &&
1530 - * (b) the buddy is free &&
1531 - * (c) the buddy is on the buddy system &&
1532 - * (d) a page and its buddy have the same order.
1533 - * for recording page's order, we use page_private(page) and PG_private.
1534 + * (b) the buddy is in the buddy system &&
1535 + * (c) a page and its buddy have the same order.
1536 + *
1537 + * For recording whether a page is in the buddy system, we use PG_buddy.
1538 + * Setting, clearing, and testing PG_buddy is serialized by zone->lock.
1539 *
1540 + * For recording page's order, we use page_private(page).
1541 */
1542 static inline int page_is_buddy(struct page *page, int order)
1543 {
1544 @@ -281,10 +284,10 @@ static inline int page_is_buddy(struct p
1545 return 0;
1546 #endif
1547
1548 - if (PagePrivate(page) &&
1549 - (page_order(page) == order) &&
1550 - page_count(page) == 0)
1551 + if (PageBuddy(page) && page_order(page) == order) {
1552 + BUG_ON(page_count(page) != 0);
1553 return 1;
1554 + }
1555 return 0;
1556 }
1557
1558 @@ -301,7 +304,7 @@ static inline int page_is_buddy(struct p
1559 * as necessary, plus some accounting needed to play nicely with other
1560 * parts of the VM system.
1561 * At each level, we keep a list of pages, which are heads of continuous
1562 - * free pages of length of (1 << order) and marked with PG_Private.Page's
1563 + * free pages of length of (1 << order) and marked with PG_buddy. Page's
1564 * order is recorded in page_private(page) field.
1565 * So when we are allocating or freeing one, we can derive the state of the
1566 * other. That is, if we allocate a small block, and both were
1567 @@ -364,7 +367,8 @@ static inline int free_pages_check(struc
1568 1 << PG_slab |
1569 1 << PG_swapcache |
1570 1 << PG_writeback |
1571 - 1 << PG_reserved ))))
1572 + 1 << PG_reserved |
1573 + 1 << PG_buddy ))))
1574 bad_page(page);
1575 if (PageDirty(page))
1576 __ClearPageDirty(page);
1577 @@ -522,7 +526,8 @@ static int prep_new_page(struct page *pa
1578 1 << PG_slab |
1579 1 << PG_swapcache |
1580 1 << PG_writeback |
1581 - 1 << PG_reserved ))))
1582 + 1 << PG_reserved |
1583 + 1 << PG_buddy ))))
1584 bad_page(page);
1585
1586 /*
1587 diff --git a/net/atm/clip.c b/net/atm/clip.c
1588 index 73370de..1842a4e 100644
1589 --- a/net/atm/clip.c
1590 +++ b/net/atm/clip.c
1591 @@ -613,12 +613,19 @@ static int clip_create(int number)
1592
1593
1594 static int clip_device_event(struct notifier_block *this,unsigned long event,
1595 - void *dev)
1596 + void *arg)
1597 {
1598 + struct net_device *dev = arg;
1599 +
1600 + if (event == NETDEV_UNREGISTER) {
1601 + neigh_ifdown(&clip_tbl, dev);
1602 + return NOTIFY_DONE;
1603 + }
1604 +
1605 /* ignore non-CLIP devices */
1606 - if (((struct net_device *) dev)->type != ARPHRD_ATM ||
1607 - ((struct net_device *) dev)->hard_start_xmit != clip_start_xmit)
1608 + if (dev->type != ARPHRD_ATM || dev->hard_start_xmit != clip_start_xmit)
1609 return NOTIFY_DONE;
1610 +
1611 switch (event) {
1612 case NETDEV_UP:
1613 DPRINTK("clip_device_event NETDEV_UP\n");
1614 @@ -686,14 +693,12 @@ static struct notifier_block clip_inet_n
1615 static void atmarpd_close(struct atm_vcc *vcc)
1616 {
1617 DPRINTK("atmarpd_close\n");
1618 - atmarpd = NULL; /* assumed to be atomic */
1619 - barrier();
1620 - unregister_inetaddr_notifier(&clip_inet_notifier);
1621 - unregister_netdevice_notifier(&clip_dev_notifier);
1622 - if (skb_peek(&sk_atm(vcc)->sk_receive_queue))
1623 - printk(KERN_ERR "atmarpd_close: closing with requests "
1624 - "pending\n");
1625 +
1626 + rtnl_lock();
1627 + atmarpd = NULL;
1628 skb_queue_purge(&sk_atm(vcc)->sk_receive_queue);
1629 + rtnl_unlock();
1630 +
1631 DPRINTK("(done)\n");
1632 module_put(THIS_MODULE);
1633 }
1634 @@ -714,7 +719,12 @@ static struct atm_dev atmarpd_dev = {
1635
1636 static int atm_init_atmarp(struct atm_vcc *vcc)
1637 {
1638 - if (atmarpd) return -EADDRINUSE;
1639 + rtnl_lock();
1640 + if (atmarpd) {
1641 + rtnl_unlock();
1642 + return -EADDRINUSE;
1643 + }
1644 +
1645 if (start_timer) {
1646 start_timer = 0;
1647 init_timer(&idle_timer);
1648 @@ -731,10 +741,7 @@ static int atm_init_atmarp(struct atm_vc
1649 vcc->push = NULL;
1650 vcc->pop = NULL; /* crash */
1651 vcc->push_oam = NULL; /* crash */
1652 - if (register_netdevice_notifier(&clip_dev_notifier))
1653 - printk(KERN_ERR "register_netdevice_notifier failed\n");
1654 - if (register_inetaddr_notifier(&clip_inet_notifier))
1655 - printk(KERN_ERR "register_inetaddr_notifier failed\n");
1656 + rtnl_unlock();
1657 return 0;
1658 }
1659
1660 @@ -992,6 +999,8 @@ static int __init atm_clip_init(void)
1661
1662 clip_tbl_hook = &clip_tbl;
1663 register_atm_ioctl(&clip_ioctl_ops);
1664 + register_netdevice_notifier(&clip_dev_notifier);
1665 + register_inetaddr_notifier(&clip_inet_notifier);
1666
1667 #ifdef CONFIG_PROC_FS
1668 {
1669 @@ -1012,6 +1021,9 @@ static void __exit atm_clip_exit(void)
1670
1671 remove_proc_entry("arp", atm_proc_root);
1672
1673 + unregister_inetaddr_notifier(&clip_inet_notifier);
1674 + unregister_netdevice_notifier(&clip_dev_notifier);
1675 +
1676 deregister_atm_ioctl(&clip_ioctl_ops);
1677
1678 /* First, stop the idle timer, so it stops banging
1679 diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
1680 index e060aad..9e27373 100644
1681 --- a/net/bridge/br_netfilter.c
1682 +++ b/net/bridge/br_netfilter.c
1683 @@ -739,6 +739,15 @@ out:
1684 return NF_STOLEN;
1685 }
1686
1687 +static int br_nf_dev_queue_xmit(struct sk_buff *skb)
1688 +{
1689 + if (skb->protocol == htons(ETH_P_IP) &&
1690 + skb->len > skb->dev->mtu &&
1691 + !(skb_shinfo(skb)->ufo_size || skb_shinfo(skb)->tso_size))
1692 + return ip_fragment(skb, br_dev_queue_push_xmit);
1693 + else
1694 + return br_dev_queue_push_xmit(skb);
1695 +}
1696
1697 /* PF_BRIDGE/POST_ROUTING ********************************************/
1698 static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff **pskb,
1699 @@ -798,7 +807,7 @@ static unsigned int br_nf_post_routing(u
1700 realoutdev = nf_bridge->netoutdev;
1701 #endif
1702 NF_HOOK(pf, NF_IP_POST_ROUTING, skb, NULL, realoutdev,
1703 - br_dev_queue_push_xmit);
1704 + br_nf_dev_queue_xmit);
1705
1706 return NF_STOLEN;
1707
1708 @@ -843,7 +852,7 @@ static unsigned int ip_sabotage_out(unsi
1709 if ((out->hard_start_xmit == br_dev_xmit &&
1710 okfn != br_nf_forward_finish &&
1711 okfn != br_nf_local_out_finish &&
1712 - okfn != br_dev_queue_push_xmit)
1713 + okfn != br_nf_dev_queue_xmit)
1714 #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
1715 || ((out->priv_flags & IFF_802_1Q_VLAN) &&
1716 VLAN_DEV_INFO(out)->real_dev->hard_start_xmit == br_dev_xmit)
1717 diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
1718 index f75ff1d..8dcba38 100644
1719 --- a/net/ipv4/ip_output.c
1720 +++ b/net/ipv4/ip_output.c
1721 @@ -86,8 +86,6 @@
1722
1723 int sysctl_ip_default_ttl = IPDEFTTL;
1724
1725 -static int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*));
1726 -
1727 /* Generate a checksum for an outgoing IP datagram. */
1728 __inline__ void ip_send_check(struct iphdr *iph)
1729 {
1730 @@ -421,7 +419,7 @@ static void ip_copy_metadata(struct sk_b
1731 * single device frame, and queue such a frame for sending.
1732 */
1733
1734 -static int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
1735 +int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
1736 {
1737 struct iphdr *iph;
1738 int raw = 0;
1739 @@ -673,6 +671,8 @@ fail:
1740 return err;
1741 }
1742
1743 +EXPORT_SYMBOL(ip_fragment);
1744 +
1745 int
1746 ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb)
1747 {

  ViewVC Help
Powered by ViewVC 1.1.20