diff options
42 files changed, 279 insertions, 307 deletions
@@ -67,6 +67,8 @@ Koushik <raghavendra.koushik@neterion.com> | |||
67 | Leonid I Ananiev <leonid.i.ananiev@intel.com> | 67 | Leonid I Ananiev <leonid.i.ananiev@intel.com> |
68 | Linas Vepstas <linas@austin.ibm.com> | 68 | Linas Vepstas <linas@austin.ibm.com> |
69 | Matthieu CASTET <castet.matthieu@free.fr> | 69 | Matthieu CASTET <castet.matthieu@free.fr> |
70 | Michael Buesch <mb@bu3sch.de> | ||
71 | Michael Buesch <mbuesch@freenet.de> | ||
70 | Michel Dänzer <michel@tungstengraphics.com> | 72 | Michel Dänzer <michel@tungstengraphics.com> |
71 | Mitesh shah <mshah@teja.com> | 73 | Mitesh shah <mshah@teja.com> |
72 | Morten Welinder <terra@gnome.org> | 74 | Morten Welinder <terra@gnome.org> |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index d3aae1f9b4c1..702d1d8dd04a 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -851,6 +851,15 @@ accept_redirects - BOOLEAN | |||
851 | Functional default: enabled if local forwarding is disabled. | 851 | Functional default: enabled if local forwarding is disabled. |
852 | disabled if local forwarding is enabled. | 852 | disabled if local forwarding is enabled. |
853 | 853 | ||
854 | accept_source_route - INTEGER | ||
855 | Accept source routing (routing extension header). | ||
856 | |||
857 | > 0: Accept routing header. | ||
858 | = 0: Accept only routing header type 2. | ||
859 | < 0: Do not accept routing header. | ||
860 | |||
861 | Default: 0 | ||
862 | |||
854 | autoconf - BOOLEAN | 863 | autoconf - BOOLEAN |
855 | Autoconfigure addresses using Prefix Information in Router | 864 | Autoconfigure addresses using Prefix Information in Router |
856 | Advertisements. | 865 | Advertisements. |
diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt index 625a21db0c2a..85f51e5a749f 100644 --- a/Documentation/x86_64/boot-options.txt +++ b/Documentation/x86_64/boot-options.txt | |||
@@ -293,7 +293,3 @@ Debugging | |||
293 | stuck (default) | 293 | stuck (default) |
294 | 294 | ||
295 | Miscellaneous | 295 | Miscellaneous |
296 | |||
297 | noreplacement Don't replace instructions with more appropriate ones | ||
298 | for the CPU. This may be useful on asymmetric MP systems | ||
299 | where some CPUs have less capabilities than others. | ||
diff --git a/MAINTAINERS b/MAINTAINERS index ef84419ade3a..277877a34ef6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1318,7 +1318,7 @@ S: Maintained | |||
1318 | ETHERNET BRIDGE | 1318 | ETHERNET BRIDGE |
1319 | P: Stephen Hemminger | 1319 | P: Stephen Hemminger |
1320 | M: shemminger@linux-foundation.org | 1320 | M: shemminger@linux-foundation.org |
1321 | L: bridge@lists.osdl.org | 1321 | L: bridge@lists.linux-foundation.org |
1322 | W: http://bridge.sourceforge.net/ | 1322 | W: http://bridge.sourceforge.net/ |
1323 | S: Maintained | 1323 | S: Maintained |
1324 | 1324 | ||
@@ -1355,6 +1355,11 @@ M: kevin.curtis@farsite.co.uk | |||
1355 | W: http://www.farsite.co.uk/ | 1355 | W: http://www.farsite.co.uk/ |
1356 | S: Supported | 1356 | S: Supported |
1357 | 1357 | ||
1358 | FAULT INJECTION SUPPORT | ||
1359 | P: Akinobu Mita | ||
1360 | M: akinobu.mita@gmail.com | ||
1361 | S: Supported | ||
1362 | |||
1358 | FRAMEBUFFER LAYER | 1363 | FRAMEBUFFER LAYER |
1359 | P: Antonino Daplas | 1364 | P: Antonino Daplas |
1360 | M: adaplas@gmail.com | 1365 | M: adaplas@gmail.com |
@@ -1690,7 +1695,7 @@ S: Maintained | |||
1690 | 1695 | ||
1691 | IEEE 1394 SUBSYSTEM | 1696 | IEEE 1394 SUBSYSTEM |
1692 | P: Ben Collins | 1697 | P: Ben Collins |
1693 | M: bcollins@debian.org | 1698 | M: ben.collins@ubuntu.com |
1694 | P: Stefan Richter | 1699 | P: Stefan Richter |
1695 | M: stefanr@s5r6.in-berlin.de | 1700 | M: stefanr@s5r6.in-berlin.de |
1696 | L: linux1394-devel@lists.sourceforge.net | 1701 | L: linux1394-devel@lists.sourceforge.net |
@@ -1698,25 +1703,11 @@ W: http://www.linux1394.org/ | |||
1698 | T: git kernel.org:/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git | 1703 | T: git kernel.org:/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git |
1699 | S: Maintained | 1704 | S: Maintained |
1700 | 1705 | ||
1701 | IEEE 1394 IPV4 DRIVER (eth1394) | 1706 | IEEE 1394 RAW I/O DRIVER (raw1394) |
1702 | P: Stefan Richter | ||
1703 | M: stefanr@s5r6.in-berlin.de | ||
1704 | L: linux1394-devel@lists.sourceforge.net | ||
1705 | S: Odd Fixes | ||
1706 | |||
1707 | IEEE 1394 PCILYNX DRIVER | ||
1708 | P: Jody McIntyre | ||
1709 | M: scjody@modernduck.com | ||
1710 | P: Stefan Richter | ||
1711 | M: stefanr@s5r6.in-berlin.de | ||
1712 | L: linux1394-devel@lists.sourceforge.net | ||
1713 | S: Odd Fixes | ||
1714 | |||
1715 | IEEE 1394 RAW I/O DRIVER | ||
1716 | P: Ben Collins | ||
1717 | M: bcollins@debian.org | ||
1718 | P: Dan Dennedy | 1707 | P: Dan Dennedy |
1719 | M: dan@dennedy.org | 1708 | M: dan@dennedy.org |
1709 | P: Stefan Richter | ||
1710 | M: stefanr@s5r6.in-berlin.de | ||
1720 | L: linux1394-devel@lists.sourceforge.net | 1711 | L: linux1394-devel@lists.sourceforge.net |
1721 | S: Maintained | 1712 | S: Maintained |
1722 | 1713 | ||
@@ -1951,7 +1942,7 @@ P: Vivek Goyal | |||
1951 | M: vgoyal@in.ibm.com | 1942 | M: vgoyal@in.ibm.com |
1952 | P: Haren Myneni | 1943 | P: Haren Myneni |
1953 | M: hbabu@us.ibm.com | 1944 | M: hbabu@us.ibm.com |
1954 | L: fastboot@lists.osdl.org | 1945 | L: fastboot@lists.linux-foundation.org |
1955 | L: linux-kernel@vger.kernel.org | 1946 | L: linux-kernel@vger.kernel.org |
1956 | W: http://lse.sourceforge.net/kdump/ | 1947 | W: http://lse.sourceforge.net/kdump/ |
1957 | S: Maintained | 1948 | S: Maintained |
@@ -1978,7 +1969,7 @@ S: Maintained | |||
1978 | 1969 | ||
1979 | KERNEL JANITORS | 1970 | KERNEL JANITORS |
1980 | P: Several | 1971 | P: Several |
1981 | L: kernel-janitors@lists.osdl.org | 1972 | L: kernel-janitors@lists.linux-foundation.org |
1982 | W: http://www.kerneljanitors.org/ | 1973 | W: http://www.kerneljanitors.org/ |
1983 | S: Maintained | 1974 | S: Maintained |
1984 | 1975 | ||
@@ -2001,7 +1992,7 @@ P: Eric Biederman | |||
2001 | M: ebiederm@xmission.com | 1992 | M: ebiederm@xmission.com |
2002 | W: http://www.xmission.com/~ebiederm/files/kexec/ | 1993 | W: http://www.xmission.com/~ebiederm/files/kexec/ |
2003 | L: linux-kernel@vger.kernel.org | 1994 | L: linux-kernel@vger.kernel.org |
2004 | L: fastboot@lists.osdl.org | 1995 | L: fastboot@lists.linux-foundation.org |
2005 | S: Maintained | 1996 | S: Maintained |
2006 | 1997 | ||
2007 | KPROBES | 1998 | KPROBES |
@@ -2339,7 +2330,7 @@ S: Maintained | |||
2339 | NETEM NETWORK EMULATOR | 2330 | NETEM NETWORK EMULATOR |
2340 | P: Stephen Hemminger | 2331 | P: Stephen Hemminger |
2341 | M: shemminger@linux-foundation.org | 2332 | M: shemminger@linux-foundation.org |
2342 | L: netem@lists.osdl.org | 2333 | L: netem@lists.linux-foundation.org |
2343 | S: Maintained | 2334 | S: Maintained |
2344 | 2335 | ||
2345 | NETFILTER/IPTABLES/IPCHAINS | 2336 | NETFILTER/IPTABLES/IPCHAINS |
@@ -3068,7 +3059,7 @@ S: Supported | |||
3068 | SOFTWARE SUSPEND: | 3059 | SOFTWARE SUSPEND: |
3069 | P: Pavel Machek | 3060 | P: Pavel Machek |
3070 | M: pavel@suse.cz | 3061 | M: pavel@suse.cz |
3071 | L: linux-pm@lists.osdl.org | 3062 | L: linux-pm@lists.linux-foundation.org |
3072 | S: Maintained | 3063 | S: Maintained |
3073 | 3064 | ||
3074 | SONIC NETWORK DRIVER | 3065 | SONIC NETWORK DRIVER |
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c index 9eca21b49f6b..426f59b0106b 100644 --- a/arch/i386/kernel/alternative.c +++ b/arch/i386/kernel/alternative.c | |||
@@ -5,15 +5,9 @@ | |||
5 | #include <asm/alternative.h> | 5 | #include <asm/alternative.h> |
6 | #include <asm/sections.h> | 6 | #include <asm/sections.h> |
7 | 7 | ||
8 | static int no_replacement = 0; | ||
9 | static int smp_alt_once = 0; | 8 | static int smp_alt_once = 0; |
10 | static int debug_alternative = 0; | 9 | static int debug_alternative = 0; |
11 | 10 | ||
12 | static int __init noreplacement_setup(char *s) | ||
13 | { | ||
14 | no_replacement = 1; | ||
15 | return 1; | ||
16 | } | ||
17 | static int __init bootonly(char *str) | 11 | static int __init bootonly(char *str) |
18 | { | 12 | { |
19 | smp_alt_once = 1; | 13 | smp_alt_once = 1; |
@@ -25,7 +19,6 @@ static int __init debug_alt(char *str) | |||
25 | return 1; | 19 | return 1; |
26 | } | 20 | } |
27 | 21 | ||
28 | __setup("noreplacement", noreplacement_setup); | ||
29 | __setup("smp-alt-boot", bootonly); | 22 | __setup("smp-alt-boot", bootonly); |
30 | __setup("debug-alternative", debug_alt); | 23 | __setup("debug-alternative", debug_alt); |
31 | 24 | ||
@@ -252,9 +245,6 @@ void alternatives_smp_module_add(struct module *mod, char *name, | |||
252 | struct smp_alt_module *smp; | 245 | struct smp_alt_module *smp; |
253 | unsigned long flags; | 246 | unsigned long flags; |
254 | 247 | ||
255 | if (no_replacement) | ||
256 | return; | ||
257 | |||
258 | if (smp_alt_once) { | 248 | if (smp_alt_once) { |
259 | if (boot_cpu_has(X86_FEATURE_UP)) | 249 | if (boot_cpu_has(X86_FEATURE_UP)) |
260 | alternatives_smp_unlock(locks, locks_end, | 250 | alternatives_smp_unlock(locks, locks_end, |
@@ -289,7 +279,7 @@ void alternatives_smp_module_del(struct module *mod) | |||
289 | struct smp_alt_module *item; | 279 | struct smp_alt_module *item; |
290 | unsigned long flags; | 280 | unsigned long flags; |
291 | 281 | ||
292 | if (no_replacement || smp_alt_once) | 282 | if (smp_alt_once) |
293 | return; | 283 | return; |
294 | 284 | ||
295 | spin_lock_irqsave(&smp_alt, flags); | 285 | spin_lock_irqsave(&smp_alt, flags); |
@@ -320,7 +310,7 @@ void alternatives_smp_switch(int smp) | |||
320 | return; | 310 | return; |
321 | #endif | 311 | #endif |
322 | 312 | ||
323 | if (no_replacement || smp_alt_once) | 313 | if (smp_alt_once) |
324 | return; | 314 | return; |
325 | BUG_ON(!smp && (num_online_cpus() > 1)); | 315 | BUG_ON(!smp && (num_online_cpus() > 1)); |
326 | 316 | ||
@@ -386,13 +376,6 @@ extern struct paravirt_patch __start_parainstructions[], | |||
386 | void __init alternative_instructions(void) | 376 | void __init alternative_instructions(void) |
387 | { | 377 | { |
388 | unsigned long flags; | 378 | unsigned long flags; |
389 | if (no_replacement) { | ||
390 | printk(KERN_INFO "(SMP-)alternatives turned off\n"); | ||
391 | free_init_pages("SMP alternatives", | ||
392 | (unsigned long)__smp_alt_begin, | ||
393 | (unsigned long)__smp_alt_end); | ||
394 | return; | ||
395 | } | ||
396 | 379 | ||
397 | local_irq_save(flags); | 380 | local_irq_save(flags); |
398 | apply_alternatives(__alt_instructions, __alt_instructions_end); | 381 | apply_alternatives(__alt_instructions, __alt_instructions_end); |
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index 9f1e8c1afab7..84c3497efb60 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -126,7 +126,7 @@ int avail_to_resrv_perfctr_nmi_bit(unsigned int counter) | |||
126 | int cpu; | 126 | int cpu; |
127 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 127 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); |
128 | for_each_possible_cpu (cpu) { | 128 | for_each_possible_cpu (cpu) { |
129 | if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu))) | 129 | if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0])) |
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | return 1; | 132 | return 1; |
@@ -142,7 +142,7 @@ int avail_to_resrv_perfctr_nmi(unsigned int msr) | |||
142 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 142 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); |
143 | 143 | ||
144 | for_each_possible_cpu (cpu) { | 144 | for_each_possible_cpu (cpu) { |
145 | if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu))) | 145 | if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0])) |
146 | return 0; | 146 | return 0; |
147 | } | 147 | } |
148 | return 1; | 148 | return 1; |
@@ -157,7 +157,7 @@ static int __reserve_perfctr_nmi(int cpu, unsigned int msr) | |||
157 | counter = nmi_perfctr_msr_to_bit(msr); | 157 | counter = nmi_perfctr_msr_to_bit(msr); |
158 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 158 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); |
159 | 159 | ||
160 | if (!test_and_set_bit(counter, &per_cpu(perfctr_nmi_owner, cpu))) | 160 | if (!test_and_set_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0])) |
161 | return 1; | 161 | return 1; |
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
@@ -171,7 +171,7 @@ static void __release_perfctr_nmi(int cpu, unsigned int msr) | |||
171 | counter = nmi_perfctr_msr_to_bit(msr); | 171 | counter = nmi_perfctr_msr_to_bit(msr); |
172 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 172 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); |
173 | 173 | ||
174 | clear_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)); | 174 | clear_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]); |
175 | } | 175 | } |
176 | 176 | ||
177 | int reserve_perfctr_nmi(unsigned int msr) | 177 | int reserve_perfctr_nmi(unsigned int msr) |
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index 69a8bcfe72b2..4f94fa261aae 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #define vpe_id() smp_processor_id() | 35 | #define vpe_id() smp_processor_id() |
36 | #else | 36 | #else |
37 | #define WHAT 0 | 37 | #define WHAT 0 |
38 | #define vpe_id() smp_processor_id() | 38 | #define vpe_id() 0 |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #define __define_perf_accessors(r, n, np) \ | 41 | #define __define_perf_accessors(r, n, np) \ |
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 2bac8c60ad61..0bae862e9a55 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -519,7 +519,11 @@ static __init int init_k8_gatt(struct agp_kern_info *info) | |||
519 | gatt_size = (aper_size >> PAGE_SHIFT) * sizeof(u32); | 519 | gatt_size = (aper_size >> PAGE_SHIFT) * sizeof(u32); |
520 | gatt = (void *)__get_free_pages(GFP_KERNEL, get_order(gatt_size)); | 520 | gatt = (void *)__get_free_pages(GFP_KERNEL, get_order(gatt_size)); |
521 | if (!gatt) | 521 | if (!gatt) |
522 | panic("Cannot allocate GATT table"); | 522 | panic("Cannot allocate GATT table"); |
523 | if (change_page_attr_addr((unsigned long)gatt, gatt_size >> PAGE_SHIFT, PAGE_KERNEL_NOCACHE)) | ||
524 | panic("Could not set GART PTEs to uncacheable pages"); | ||
525 | global_flush_tlb(); | ||
526 | |||
523 | memset(gatt, 0, gatt_size); | 527 | memset(gatt, 0, gatt_size); |
524 | agp_gatt_table = gatt; | 528 | agp_gatt_table = gatt; |
525 | 529 | ||
diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c index 65c5eaa59905..081409aa3452 100644 --- a/arch/x86_64/mm/pageattr.c +++ b/arch/x86_64/mm/pageattr.c | |||
@@ -81,8 +81,8 @@ static void flush_kernel_map(void *arg) | |||
81 | void *adr = page_address(pg); | 81 | void *adr = page_address(pg); |
82 | if (cpu_has_clflush) | 82 | if (cpu_has_clflush) |
83 | cache_flush_page(adr); | 83 | cache_flush_page(adr); |
84 | __flush_tlb_one(adr); | ||
85 | } | 84 | } |
85 | __flush_tlb_all(); | ||
86 | } | 86 | } |
87 | 87 | ||
88 | static inline void flush_map(struct list_head *l) | 88 | static inline void flush_map(struct list_head *l) |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 9e3797167c81..f92ba2a869b4 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -532,6 +532,12 @@ static void cfq_add_rq_rb(struct request *rq) | |||
532 | 532 | ||
533 | if (!cfq_cfqq_on_rr(cfqq)) | 533 | if (!cfq_cfqq_on_rr(cfqq)) |
534 | cfq_add_cfqq_rr(cfqd, cfqq); | 534 | cfq_add_cfqq_rr(cfqd, cfqq); |
535 | |||
536 | /* | ||
537 | * check if this request is a better next-serve candidate | ||
538 | */ | ||
539 | cfqq->next_rq = cfq_choose_req(cfqd, cfqq->next_rq, rq); | ||
540 | BUG_ON(!cfqq->next_rq); | ||
535 | } | 541 | } |
536 | 542 | ||
537 | static inline void | 543 | static inline void |
@@ -1639,12 +1645,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
1639 | cfqq->meta_pending++; | 1645 | cfqq->meta_pending++; |
1640 | 1646 | ||
1641 | /* | 1647 | /* |
1642 | * check if this request is a better next-serve candidate)) { | ||
1643 | */ | ||
1644 | cfqq->next_rq = cfq_choose_req(cfqd, cfqq->next_rq, rq); | ||
1645 | BUG_ON(!cfqq->next_rq); | ||
1646 | |||
1647 | /* | ||
1648 | * we never wait for an async request and we don't allow preemption | 1648 | * we never wait for an async request and we don't allow preemption |
1649 | * of an async request. so just return early | 1649 | * of an async request. so just return early |
1650 | */ | 1650 | */ |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 0ae8b9310cbf..589b98b7b216 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -758,7 +758,8 @@ static void acpi_thermal_check(void *data) | |||
758 | del_timer(&(tz->timer)); | 758 | del_timer(&(tz->timer)); |
759 | } else { | 759 | } else { |
760 | if (timer_pending(&(tz->timer))) | 760 | if (timer_pending(&(tz->timer))) |
761 | mod_timer(&(tz->timer), (HZ * sleep_time) / 1000); | 761 | mod_timer(&(tz->timer), |
762 | jiffies + (HZ * sleep_time) / 1000); | ||
762 | else { | 763 | else { |
763 | tz->timer.data = (unsigned long)tz; | 764 | tz->timer.data = (unsigned long)tz; |
764 | tz->timer.function = acpi_thermal_run; | 765 | tz->timer.function = acpi_thermal_run; |
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index c852eed91e4b..1eeb8f2cde71 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c | |||
@@ -140,7 +140,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_DLY}; | |||
140 | #include <linux/blkdev.h> | 140 | #include <linux/blkdev.h> |
141 | #include <asm/uaccess.h> | 141 | #include <asm/uaccess.h> |
142 | 142 | ||
143 | static spinlock_t pcd_lock; | 143 | static DEFINE_SPINLOCK(pcd_lock); |
144 | 144 | ||
145 | module_param(verbose, bool, 0644); | 145 | module_param(verbose, bool, 0644); |
146 | module_param(major, int, 0); | 146 | module_param(major, int, 0); |
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index 7cdaa1951260..5826508f6731 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c | |||
@@ -154,7 +154,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_LUN, D_DLY}; | |||
154 | #include <linux/blkpg.h> | 154 | #include <linux/blkpg.h> |
155 | #include <asm/uaccess.h> | 155 | #include <asm/uaccess.h> |
156 | 156 | ||
157 | static spinlock_t pf_spin_lock; | 157 | static DEFINE_SPINLOCK(pf_spin_lock); |
158 | 158 | ||
159 | module_param(verbose, bool, 0644); | 159 | module_param(verbose, bool, 0644); |
160 | module_param(major, int, 0); | 160 | module_param(major, int, 0); |
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index a4fb70383188..f1b9dd7d47d6 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -777,7 +777,8 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command * | |||
777 | rq->cmd_flags |= REQ_QUIET; | 777 | rq->cmd_flags |= REQ_QUIET; |
778 | 778 | ||
779 | blk_execute_rq(rq->q, pd->bdev->bd_disk, rq, 0); | 779 | blk_execute_rq(rq->q, pd->bdev->bd_disk, rq, 0); |
780 | ret = rq->errors; | 780 | if (rq->errors) |
781 | ret = -EIO; | ||
781 | out: | 782 | out: |
782 | blk_put_request(rq); | 783 | blk_put_request(rq); |
783 | return ret; | 784 | return ret; |
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index a61fb6da5d03..80a01150b86c 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -1338,43 +1338,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c | |||
1338 | * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) | 1338 | * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) |
1339 | * Caller should use TIOCGICOUNT to see which one it was | 1339 | * Caller should use TIOCGICOUNT to see which one it was |
1340 | */ | 1340 | */ |
1341 | case TIOCMIWAIT: { | 1341 | case TIOCMIWAIT: |
1342 | DECLARE_WAITQUEUE(wait, current); | 1342 | spin_lock_irqsave(&info->slock, flags); |
1343 | int ret; | 1343 | cnow = info->icount; /* note the counters on entry */ |
1344 | spin_unlock_irqrestore(&info->slock, flags); | ||
1345 | |||
1346 | wait_event_interruptible(info->delta_msr_wait, ({ | ||
1347 | cprev = cnow; | ||
1344 | spin_lock_irqsave(&info->slock, flags); | 1348 | spin_lock_irqsave(&info->slock, flags); |
1345 | cprev = info->icount; /* note the counters on entry */ | 1349 | cnow = info->icount; /* atomic copy */ |
1346 | spin_unlock_irqrestore(&info->slock, flags); | 1350 | spin_unlock_irqrestore(&info->slock, flags); |
1347 | 1351 | ||
1348 | add_wait_queue(&info->delta_msr_wait, &wait); | 1352 | ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) || |
1349 | while (1) { | 1353 | ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) || |
1350 | spin_lock_irqsave(&info->slock, flags); | 1354 | ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) || |
1351 | cnow = info->icount; /* atomic copy */ | 1355 | ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)); |
1352 | spin_unlock_irqrestore(&info->slock, flags); | 1356 | })); |
1353 | 1357 | break; | |
1354 | set_current_state(TASK_INTERRUPTIBLE); | ||
1355 | if (((arg & TIOCM_RNG) && | ||
1356 | (cnow.rng != cprev.rng)) || | ||
1357 | ((arg & TIOCM_DSR) && | ||
1358 | (cnow.dsr != cprev.dsr)) || | ||
1359 | ((arg & TIOCM_CD) && | ||
1360 | (cnow.dcd != cprev.dcd)) || | ||
1361 | ((arg & TIOCM_CTS) && | ||
1362 | (cnow.cts != cprev.cts))) { | ||
1363 | ret = 0; | ||
1364 | break; | ||
1365 | } | ||
1366 | /* see if a signal did it */ | ||
1367 | if (signal_pending(current)) { | ||
1368 | ret = -ERESTARTSYS; | ||
1369 | break; | ||
1370 | } | ||
1371 | cprev = cnow; | ||
1372 | } | ||
1373 | current->state = TASK_RUNNING; | ||
1374 | remove_wait_queue(&info->delta_msr_wait, &wait); | ||
1375 | break; | ||
1376 | } | ||
1377 | /* NOTREACHED */ | ||
1378 | /* | 1358 | /* |
1379 | * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) | 1359 | * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) |
1380 | * Return: write counters to the user passed counter struct | 1360 | * Return: write counters to the user passed counter struct |
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c index 9af07e4999d5..f7603b6aeb87 100644 --- a/drivers/char/mxser_new.c +++ b/drivers/char/mxser_new.c | |||
@@ -1758,43 +1758,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, | |||
1758 | * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) | 1758 | * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) |
1759 | * Caller should use TIOCGICOUNT to see which one it was | 1759 | * Caller should use TIOCGICOUNT to see which one it was |
1760 | */ | 1760 | */ |
1761 | case TIOCMIWAIT: { | 1761 | case TIOCMIWAIT: |
1762 | DECLARE_WAITQUEUE(wait, current); | ||
1763 | int ret; | ||
1764 | spin_lock_irqsave(&info->slock, flags); | 1762 | spin_lock_irqsave(&info->slock, flags); |
1765 | cprev = info->icount; /* note the counters on entry */ | 1763 | cnow = info->icount; /* note the counters on entry */ |
1766 | spin_unlock_irqrestore(&info->slock, flags); | 1764 | spin_unlock_irqrestore(&info->slock, flags); |
1767 | 1765 | ||
1768 | add_wait_queue(&info->delta_msr_wait, &wait); | 1766 | wait_event_interruptible(info->delta_msr_wait, ({ |
1769 | while (1) { | 1767 | cprev = cnow; |
1770 | spin_lock_irqsave(&info->slock, flags); | 1768 | spin_lock_irqsave(&info->slock, flags); |
1771 | cnow = info->icount; /* atomic copy */ | 1769 | cnow = info->icount; /* atomic copy */ |
1772 | spin_unlock_irqrestore(&info->slock, flags); | 1770 | spin_unlock_irqrestore(&info->slock, flags); |
1773 | 1771 | ||
1774 | set_current_state(TASK_INTERRUPTIBLE); | 1772 | ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) || |
1775 | if (((arg & TIOCM_RNG) && | 1773 | ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) || |
1776 | (cnow.rng != cprev.rng)) || | 1774 | ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) || |
1777 | ((arg & TIOCM_DSR) && | 1775 | ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)); |
1778 | (cnow.dsr != cprev.dsr)) || | 1776 | })); |
1779 | ((arg & TIOCM_CD) && | ||
1780 | (cnow.dcd != cprev.dcd)) || | ||
1781 | ((arg & TIOCM_CTS) && | ||
1782 | (cnow.cts != cprev.cts))) { | ||
1783 | ret = 0; | ||
1784 | break; | ||
1785 | } | ||
1786 | /* see if a signal did it */ | ||
1787 | if (signal_pending(current)) { | ||
1788 | ret = -ERESTARTSYS; | ||
1789 | break; | ||
1790 | } | ||
1791 | cprev = cnow; | ||
1792 | } | ||
1793 | current->state = TASK_RUNNING; | ||
1794 | remove_wait_queue(&info->delta_msr_wait, &wait); | ||
1795 | break; | 1777 | break; |
1796 | } | ||
1797 | /* NOTREACHED */ | ||
1798 | /* | 1778 | /* |
1799 | * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) | 1779 | * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) |
1800 | * Return: write counters to the user passed counter struct | 1780 | * Return: write counters to the user passed counter struct |
@@ -2230,7 +2210,14 @@ end_intr: | |||
2230 | port->mon_data.rxcnt += cnt; | 2210 | port->mon_data.rxcnt += cnt; |
2231 | port->mon_data.up_rxcnt += cnt; | 2211 | port->mon_data.up_rxcnt += cnt; |
2232 | 2212 | ||
2213 | /* | ||
2214 | * We are called from an interrupt context with &port->slock | ||
2215 | * being held. Drop it temporarily in order to prevent | ||
2216 | * recursive locking. | ||
2217 | */ | ||
2218 | spin_unlock(&port->slock); | ||
2233 | tty_flip_buffer_push(tty); | 2219 | tty_flip_buffer_push(tty); |
2220 | spin_lock(&port->slock); | ||
2234 | } | 2221 | } |
2235 | 2222 | ||
2236 | static void mxser_transmit_chars(struct mxser_port *port) | 2223 | static void mxser_transmit_chars(struct mxser_port *port) |
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 01206ebb1cf2..30a76404f0af 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c | |||
@@ -121,9 +121,9 @@ superio_exit(void) | |||
121 | * ISA constants | 121 | * ISA constants |
122 | */ | 122 | */ |
123 | 123 | ||
124 | #define REGION_ALIGNMENT ~7 | 124 | #define IOREGION_ALIGNMENT ~7 |
125 | #define REGION_OFFSET 5 | 125 | #define IOREGION_OFFSET 5 |
126 | #define REGION_LENGTH 2 | 126 | #define IOREGION_LENGTH 2 |
127 | #define ADDR_REG_OFFSET 5 | 127 | #define ADDR_REG_OFFSET 5 |
128 | #define DATA_REG_OFFSET 6 | 128 | #define DATA_REG_OFFSET 6 |
129 | 129 | ||
@@ -1194,7 +1194,7 @@ static int w83627ehf_detect(struct i2c_adapter *adapter) | |||
1194 | u8 fan4pin, fan5pin; | 1194 | u8 fan4pin, fan5pin; |
1195 | int i, err = 0; | 1195 | int i, err = 0; |
1196 | 1196 | ||
1197 | if (!request_region(address + REGION_OFFSET, REGION_LENGTH, | 1197 | if (!request_region(address + IOREGION_OFFSET, IOREGION_LENGTH, |
1198 | w83627ehf_driver.driver.name)) { | 1198 | w83627ehf_driver.driver.name)) { |
1199 | err = -EBUSY; | 1199 | err = -EBUSY; |
1200 | goto exit; | 1200 | goto exit; |
@@ -1322,7 +1322,7 @@ exit_remove: | |||
1322 | exit_free: | 1322 | exit_free: |
1323 | kfree(data); | 1323 | kfree(data); |
1324 | exit_release: | 1324 | exit_release: |
1325 | release_region(address + REGION_OFFSET, REGION_LENGTH); | 1325 | release_region(address + IOREGION_OFFSET, IOREGION_LENGTH); |
1326 | exit: | 1326 | exit: |
1327 | return err; | 1327 | return err; |
1328 | } | 1328 | } |
@@ -1337,7 +1337,7 @@ static int w83627ehf_detach_client(struct i2c_client *client) | |||
1337 | 1337 | ||
1338 | if ((err = i2c_detach_client(client))) | 1338 | if ((err = i2c_detach_client(client))) |
1339 | return err; | 1339 | return err; |
1340 | release_region(client->addr + REGION_OFFSET, REGION_LENGTH); | 1340 | release_region(client->addr + IOREGION_OFFSET, IOREGION_LENGTH); |
1341 | kfree(data); | 1341 | kfree(data); |
1342 | 1342 | ||
1343 | return 0; | 1343 | return 0; |
@@ -1380,7 +1380,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr) | |||
1380 | superio_select(W83627EHF_LD_HWM); | 1380 | superio_select(W83627EHF_LD_HWM); |
1381 | val = (superio_inb(SIO_REG_ADDR) << 8) | 1381 | val = (superio_inb(SIO_REG_ADDR) << 8) |
1382 | | superio_inb(SIO_REG_ADDR + 1); | 1382 | | superio_inb(SIO_REG_ADDR + 1); |
1383 | *addr = val & REGION_ALIGNMENT; | 1383 | *addr = val & IOREGION_ALIGNMENT; |
1384 | if (*addr == 0) { | 1384 | if (*addr == 0) { |
1385 | superio_exit(); | 1385 | superio_exit(); |
1386 | return -ENODEV; | 1386 | return -ENODEV; |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 0b7aded8dcfd..e85f5ec48f96 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -54,8 +54,8 @@ | |||
54 | 54 | ||
55 | #define DRV_MODULE_NAME "bnx2" | 55 | #define DRV_MODULE_NAME "bnx2" |
56 | #define PFX DRV_MODULE_NAME ": " | 56 | #define PFX DRV_MODULE_NAME ": " |
57 | #define DRV_MODULE_VERSION "1.5.7" | 57 | #define DRV_MODULE_VERSION "1.5.8" |
58 | #define DRV_MODULE_RELDATE "March 29, 2007" | 58 | #define DRV_MODULE_RELDATE "April 24, 2007" |
59 | 59 | ||
60 | #define RUN_AT(x) (jiffies + (x)) | 60 | #define RUN_AT(x) (jiffies + (x)) |
61 | 61 | ||
@@ -3421,6 +3421,9 @@ bnx2_init_chip(struct bnx2 *bp) | |||
3421 | val = REG_RD(bp, BNX2_MQ_CONFIG); | 3421 | val = REG_RD(bp, BNX2_MQ_CONFIG); |
3422 | val &= ~BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE; | 3422 | val &= ~BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE; |
3423 | val |= BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE_256; | 3423 | val |= BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE_256; |
3424 | if (CHIP_ID(bp) == CHIP_ID_5709_A0 || CHIP_ID(bp) == CHIP_ID_5709_A1) | ||
3425 | val |= BNX2_MQ_CONFIG_HALT_DIS; | ||
3426 | |||
3424 | REG_WR(bp, BNX2_MQ_CONFIG, val); | 3427 | REG_WR(bp, BNX2_MQ_CONFIG, val); |
3425 | 3428 | ||
3426 | val = 0x10000 + (MAX_CID_CNT * MB_KERNEL_CTX_SIZE); | 3429 | val = 0x10000 + (MAX_CID_CNT * MB_KERNEL_CTX_SIZE); |
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index ccbdf81c6599..878eee58f12a 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -6518,6 +6518,7 @@ struct bnx2 { | |||
6518 | #define CHIP_ID_5708_B0 0x57081000 | 6518 | #define CHIP_ID_5708_B0 0x57081000 |
6519 | #define CHIP_ID_5708_B1 0x57081010 | 6519 | #define CHIP_ID_5708_B1 0x57081010 |
6520 | #define CHIP_ID_5709_A0 0x57090000 | 6520 | #define CHIP_ID_5709_A0 0x57090000 |
6521 | #define CHIP_ID_5709_A1 0x57090010 | ||
6521 | 6522 | ||
6522 | #define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf) | 6523 | #define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf) |
6523 | 6524 | ||
diff --git a/drivers/net/depca.c b/drivers/net/depca.c index 5113eef755b9..f3807aaf10aa 100644 --- a/drivers/net/depca.c +++ b/drivers/net/depca.c | |||
@@ -1491,8 +1491,9 @@ static void __init depca_platform_probe (void) | |||
1491 | depca_io_ports[i].device = pldev; | 1491 | depca_io_ports[i].device = pldev; |
1492 | 1492 | ||
1493 | if (platform_device_add(pldev)) { | 1493 | if (platform_device_add(pldev)) { |
1494 | platform_device_put(pldev); | ||
1495 | depca_io_ports[i].device = NULL; | 1494 | depca_io_ports[i].device = NULL; |
1495 | pldev->dev.platform_data = NULL; | ||
1496 | platform_device_put(pldev); | ||
1496 | continue; | 1497 | continue; |
1497 | } | 1498 | } |
1498 | 1499 | ||
diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c index 59214e74b9cf..30baf6ecfc63 100644 --- a/drivers/net/hamradio/baycom_ser_fdx.c +++ b/drivers/net/hamradio/baycom_ser_fdx.c | |||
@@ -75,12 +75,14 @@ | |||
75 | #include <linux/ioport.h> | 75 | #include <linux/ioport.h> |
76 | #include <linux/string.h> | 76 | #include <linux/string.h> |
77 | #include <linux/init.h> | 77 | #include <linux/init.h> |
78 | #include <asm/uaccess.h> | ||
79 | #include <asm/io.h> | ||
80 | #include <linux/hdlcdrv.h> | 78 | #include <linux/hdlcdrv.h> |
81 | #include <linux/baycom.h> | 79 | #include <linux/baycom.h> |
82 | #include <linux/jiffies.h> | 80 | #include <linux/jiffies.h> |
83 | 81 | ||
82 | #include <asm/uaccess.h> | ||
83 | #include <asm/io.h> | ||
84 | #include <asm/irq.h> | ||
85 | |||
84 | /* --------------------------------------------------------------------- */ | 86 | /* --------------------------------------------------------------------- */ |
85 | 87 | ||
86 | #define BAYCOM_DEBUG | 88 | #define BAYCOM_DEBUG |
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index b3750f284279..b2a3b19d773a 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c | |||
@@ -1755,6 +1755,24 @@ static int sis900_rx(struct net_device *net_dev) | |||
1755 | } else { | 1755 | } else { |
1756 | struct sk_buff * skb; | 1756 | struct sk_buff * skb; |
1757 | 1757 | ||
1758 | pci_unmap_single(sis_priv->pci_dev, | ||
1759 | sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE, | ||
1760 | PCI_DMA_FROMDEVICE); | ||
1761 | |||
1762 | /* refill the Rx buffer, what if there is not enought | ||
1763 | * memory for new socket buffer ?? */ | ||
1764 | if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { | ||
1765 | /* | ||
1766 | * Not enough memory to refill the buffer | ||
1767 | * so we need to recycle the old one so | ||
1768 | * as to avoid creating a memory hole | ||
1769 | * in the rx ring | ||
1770 | */ | ||
1771 | skb = sis_priv->rx_skbuff[entry]; | ||
1772 | sis_priv->stats.rx_dropped++; | ||
1773 | goto refill_rx_ring; | ||
1774 | } | ||
1775 | |||
1758 | /* This situation should never happen, but due to | 1776 | /* This situation should never happen, but due to |
1759 | some unknow bugs, it is possible that | 1777 | some unknow bugs, it is possible that |
1760 | we are working on NULL sk_buff :-( */ | 1778 | we are working on NULL sk_buff :-( */ |
@@ -1768,9 +1786,6 @@ static int sis900_rx(struct net_device *net_dev) | |||
1768 | break; | 1786 | break; |
1769 | } | 1787 | } |
1770 | 1788 | ||
1771 | pci_unmap_single(sis_priv->pci_dev, | ||
1772 | sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE, | ||
1773 | PCI_DMA_FROMDEVICE); | ||
1774 | /* give the socket buffer to upper layers */ | 1789 | /* give the socket buffer to upper layers */ |
1775 | skb = sis_priv->rx_skbuff[entry]; | 1790 | skb = sis_priv->rx_skbuff[entry]; |
1776 | skb_put(skb, rx_size); | 1791 | skb_put(skb, rx_size); |
@@ -1783,33 +1798,14 @@ static int sis900_rx(struct net_device *net_dev) | |||
1783 | net_dev->last_rx = jiffies; | 1798 | net_dev->last_rx = jiffies; |
1784 | sis_priv->stats.rx_bytes += rx_size; | 1799 | sis_priv->stats.rx_bytes += rx_size; |
1785 | sis_priv->stats.rx_packets++; | 1800 | sis_priv->stats.rx_packets++; |
1786 | 1801 | sis_priv->dirty_rx++; | |
1787 | /* refill the Rx buffer, what if there is not enought | 1802 | refill_rx_ring: |
1788 | * memory for new socket buffer ?? */ | ||
1789 | if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { | ||
1790 | /* not enough memory for skbuff, this makes a | ||
1791 | * "hole" on the buffer ring, it is not clear | ||
1792 | * how the hardware will react to this kind | ||
1793 | * of degenerated buffer */ | ||
1794 | if (netif_msg_rx_status(sis_priv)) | ||
1795 | printk(KERN_INFO "%s: Memory squeeze," | ||
1796 | "deferring packet.\n", | ||
1797 | net_dev->name); | ||
1798 | sis_priv->rx_skbuff[entry] = NULL; | ||
1799 | /* reset buffer descriptor state */ | ||
1800 | sis_priv->rx_ring[entry].cmdsts = 0; | ||
1801 | sis_priv->rx_ring[entry].bufptr = 0; | ||
1802 | sis_priv->stats.rx_dropped++; | ||
1803 | sis_priv->cur_rx++; | ||
1804 | break; | ||
1805 | } | ||
1806 | skb->dev = net_dev; | 1803 | skb->dev = net_dev; |
1807 | sis_priv->rx_skbuff[entry] = skb; | 1804 | sis_priv->rx_skbuff[entry] = skb; |
1808 | sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE; | 1805 | sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE; |
1809 | sis_priv->rx_ring[entry].bufptr = | 1806 | sis_priv->rx_ring[entry].bufptr = |
1810 | pci_map_single(sis_priv->pci_dev, skb->data, | 1807 | pci_map_single(sis_priv->pci_dev, skb->data, |
1811 | RX_BUF_SIZE, PCI_DMA_FROMDEVICE); | 1808 | RX_BUF_SIZE, PCI_DMA_FROMDEVICE); |
1812 | sis_priv->dirty_rx++; | ||
1813 | } | 1809 | } |
1814 | sis_priv->cur_rx++; | 1810 | sis_priv->cur_rx++; |
1815 | entry = sis_priv->cur_rx % NUM_RX_DESC; | 1811 | entry = sis_priv->cur_rx % NUM_RX_DESC; |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index a4a96826d9e0..2fe1d690eb13 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -682,34 +682,7 @@ static void pci_read_irq(struct pci_dev *dev) | |||
682 | dev->irq = irq; | 682 | dev->irq = irq; |
683 | } | 683 | } |
684 | 684 | ||
685 | static void change_legacy_io_resource(struct pci_dev * dev, unsigned index, | 685 | #define LEGACY_IO_RESOURCE (IORESOURCE_IO | IORESOURCE_PCI_FIXED) |
686 | unsigned start, unsigned end) | ||
687 | { | ||
688 | unsigned base = start & PCI_BASE_ADDRESS_IO_MASK; | ||
689 | unsigned len = (end | ~PCI_BASE_ADDRESS_IO_MASK) - base + 1; | ||
690 | |||
691 | /* | ||
692 | * Some X versions get confused when the BARs reported through | ||
693 | * /sys or /proc differ from those seen in config space, thus | ||
694 | * try to update the config space values, too. | ||
695 | */ | ||
696 | if (!(pci_resource_flags(dev, index) & IORESOURCE_IO)) | ||
697 | printk(KERN_WARNING "%s: cannot adjust BAR%u (not I/O)\n", | ||
698 | pci_name(dev), index); | ||
699 | else if (pci_resource_len(dev, index) != len) | ||
700 | printk(KERN_WARNING "%s: cannot adjust BAR%u (size %04X)\n", | ||
701 | pci_name(dev), index, (unsigned)pci_resource_len(dev, index)); | ||
702 | else { | ||
703 | printk(KERN_INFO "%s: trying to change BAR%u from %04X to %04X\n", | ||
704 | pci_name(dev), index, | ||
705 | (unsigned)pci_resource_start(dev, index), base); | ||
706 | pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + index * 4, base); | ||
707 | } | ||
708 | pci_resource_start(dev, index) = start; | ||
709 | pci_resource_end(dev, index) = end; | ||
710 | pci_resource_flags(dev, index) = | ||
711 | IORESOURCE_IO | IORESOURCE_PCI_FIXED | PCI_BASE_ADDRESS_SPACE_IO; | ||
712 | } | ||
713 | 686 | ||
714 | /** | 687 | /** |
715 | * pci_setup_device - fill in class and map information of a device | 688 | * pci_setup_device - fill in class and map information of a device |
@@ -762,12 +735,20 @@ static int pci_setup_device(struct pci_dev * dev) | |||
762 | u8 progif; | 735 | u8 progif; |
763 | pci_read_config_byte(dev, PCI_CLASS_PROG, &progif); | 736 | pci_read_config_byte(dev, PCI_CLASS_PROG, &progif); |
764 | if ((progif & 1) == 0) { | 737 | if ((progif & 1) == 0) { |
765 | change_legacy_io_resource(dev, 0, 0x1F0, 0x1F7); | 738 | dev->resource[0].start = 0x1F0; |
766 | change_legacy_io_resource(dev, 1, 0x3F6, 0x3F6); | 739 | dev->resource[0].end = 0x1F7; |
740 | dev->resource[0].flags = LEGACY_IO_RESOURCE; | ||
741 | dev->resource[1].start = 0x3F6; | ||
742 | dev->resource[1].end = 0x3F6; | ||
743 | dev->resource[1].flags = LEGACY_IO_RESOURCE; | ||
767 | } | 744 | } |
768 | if ((progif & 4) == 0) { | 745 | if ((progif & 4) == 0) { |
769 | change_legacy_io_resource(dev, 2, 0x170, 0x177); | 746 | dev->resource[2].start = 0x170; |
770 | change_legacy_io_resource(dev, 3, 0x376, 0x376); | 747 | dev->resource[2].end = 0x177; |
748 | dev->resource[2].flags = LEGACY_IO_RESOURCE; | ||
749 | dev->resource[3].start = 0x376; | ||
750 | dev->resource[3].end = 0x376; | ||
751 | dev->resource[3].flags = LEGACY_IO_RESOURCE; | ||
771 | } | 752 | } |
772 | } | 753 | } |
773 | break; | 754 | break; |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index c129a0e8e807..90621c3312bc 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -1310,7 +1310,8 @@ static unsigned int check_modem_status(struct uart_8250_port *up) | |||
1310 | { | 1310 | { |
1311 | unsigned int status = serial_in(up, UART_MSR); | 1311 | unsigned int status = serial_in(up, UART_MSR); |
1312 | 1312 | ||
1313 | if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI) { | 1313 | if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI && |
1314 | up->port.info != NULL) { | ||
1314 | if (status & UART_MSR_TERI) | 1315 | if (status & UART_MSR_TERI) |
1315 | up->port.icount.rng++; | 1316 | up->port.icount.rng++; |
1316 | if (status & UART_MSR_DDSR) | 1317 | if (status & UART_MSR_DDSR) |
@@ -1333,8 +1334,9 @@ static inline void | |||
1333 | serial8250_handle_port(struct uart_8250_port *up) | 1334 | serial8250_handle_port(struct uart_8250_port *up) |
1334 | { | 1335 | { |
1335 | unsigned int status; | 1336 | unsigned int status; |
1337 | unsigned long flags; | ||
1336 | 1338 | ||
1337 | spin_lock(&up->port.lock); | 1339 | spin_lock_irqsave(&up->port.lock, flags); |
1338 | 1340 | ||
1339 | status = serial_inp(up, UART_LSR); | 1341 | status = serial_inp(up, UART_LSR); |
1340 | 1342 | ||
@@ -1346,7 +1348,7 @@ serial8250_handle_port(struct uart_8250_port *up) | |||
1346 | if (status & UART_LSR_THRE) | 1348 | if (status & UART_LSR_THRE) |
1347 | transmit_chars(up); | 1349 | transmit_chars(up); |
1348 | 1350 | ||
1349 | spin_unlock(&up->port.lock); | 1351 | spin_unlock_irqrestore(&up->port.lock, flags); |
1350 | } | 1352 | } |
1351 | 1353 | ||
1352 | /* | 1354 | /* |
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c index 41431d0d5512..246c5572667b 100644 --- a/drivers/serial/icom.c +++ b/drivers/serial/icom.c | |||
@@ -164,7 +164,7 @@ static void free_port_memory(struct icom_port *icom_port) | |||
164 | } | 164 | } |
165 | } | 165 | } |
166 | 166 | ||
167 | static int __init get_port_memory(struct icom_port *icom_port) | 167 | static int __devinit get_port_memory(struct icom_port *icom_port) |
168 | { | 168 | { |
169 | int index; | 169 | int index; |
170 | unsigned long stgAddr; | 170 | unsigned long stgAddr; |
@@ -1380,7 +1380,7 @@ static void icom_port_active(struct icom_port *icom_port, struct icom_adapter *i | |||
1380 | 0x8024 + 2 - 2 * (icom_port->port - 2); | 1380 | 0x8024 + 2 - 2 * (icom_port->port - 2); |
1381 | } | 1381 | } |
1382 | } | 1382 | } |
1383 | static int __init icom_load_ports(struct icom_adapter *icom_adapter) | 1383 | static int __devinit icom_load_ports(struct icom_adapter *icom_adapter) |
1384 | { | 1384 | { |
1385 | struct icom_port *icom_port; | 1385 | struct icom_port *icom_port; |
1386 | int port_num; | 1386 | int port_num; |
@@ -1473,7 +1473,7 @@ static void icom_remove_adapter(struct icom_adapter *icom_adapter) | |||
1473 | } | 1473 | } |
1474 | } | 1474 | } |
1475 | 1475 | ||
1476 | free_irq(icom_adapter->irq_number, (void *) icom_adapter); | 1476 | free_irq(icom_adapter->pci_dev->irq, (void *) icom_adapter); |
1477 | iounmap(icom_adapter->base_addr); | 1477 | iounmap(icom_adapter->base_addr); |
1478 | icom_free_adapter(icom_adapter); | 1478 | icom_free_adapter(icom_adapter); |
1479 | pci_release_regions(icom_adapter->pci_dev); | 1479 | pci_release_regions(icom_adapter->pci_dev); |
@@ -1539,7 +1539,6 @@ static int __devinit icom_probe(struct pci_dev *dev, | |||
1539 | } | 1539 | } |
1540 | 1540 | ||
1541 | icom_adapter->base_addr_pci = pci_resource_start(dev, 0); | 1541 | icom_adapter->base_addr_pci = pci_resource_start(dev, 0); |
1542 | icom_adapter->irq_number = dev->irq; | ||
1543 | icom_adapter->pci_dev = dev; | 1542 | icom_adapter->pci_dev = dev; |
1544 | icom_adapter->version = ent->driver_data; | 1543 | icom_adapter->version = ent->driver_data; |
1545 | icom_adapter->subsystem_id = ent->subdevice; | 1544 | icom_adapter->subsystem_id = ent->subdevice; |
@@ -1570,7 +1569,7 @@ static int __devinit icom_probe(struct pci_dev *dev, | |||
1570 | icom_port = &icom_adapter->port_info[index]; | 1569 | icom_port = &icom_adapter->port_info[index]; |
1571 | 1570 | ||
1572 | if (icom_port->status == ICOM_PORT_ACTIVE) { | 1571 | if (icom_port->status == ICOM_PORT_ACTIVE) { |
1573 | icom_port->uart_port.irq = icom_port->adapter->irq_number; | 1572 | icom_port->uart_port.irq = icom_port->adapter->pci_dev->irq; |
1574 | icom_port->uart_port.type = PORT_ICOM; | 1573 | icom_port->uart_port.type = PORT_ICOM; |
1575 | icom_port->uart_port.iotype = UPIO_MEM; | 1574 | icom_port->uart_port.iotype = UPIO_MEM; |
1576 | icom_port->uart_port.membase = | 1575 | icom_port->uart_port.membase = |
diff --git a/drivers/serial/icom.h b/drivers/serial/icom.h index 798f1ef23712..e8578d8cd35e 100644 --- a/drivers/serial/icom.h +++ b/drivers/serial/icom.h | |||
@@ -258,7 +258,6 @@ struct icom_port { | |||
258 | struct icom_adapter { | 258 | struct icom_adapter { |
259 | void __iomem * base_addr; | 259 | void __iomem * base_addr; |
260 | unsigned long base_addr_pci; | 260 | unsigned long base_addr_pci; |
261 | unsigned char irq_number; | ||
262 | struct pci_dev *pci_dev; | 261 | struct pci_dev *pci_dev; |
263 | struct icom_port port_info[4]; | 262 | struct icom_port port_info[4]; |
264 | int index; | 263 | int index; |
diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c index d48c024cff59..6d12961cf9f9 100644 --- a/drivers/usb/net/pegasus.c +++ b/drivers/usb/net/pegasus.c | |||
@@ -316,6 +316,7 @@ static int update_eth_regs_async(pegasus_t * pegasus) | |||
316 | return ret; | 316 | return ret; |
317 | } | 317 | } |
318 | 318 | ||
319 | /* Returns 0 on success, error on failure */ | ||
319 | static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * regd) | 320 | static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * regd) |
320 | { | 321 | { |
321 | int i; | 322 | int i; |
@@ -847,10 +848,16 @@ static void intr_callback(struct urb *urb) | |||
847 | * d[0].NO_CARRIER kicks in only with failed TX. | 848 | * d[0].NO_CARRIER kicks in only with failed TX. |
848 | * ... so monitoring with MII may be safest. | 849 | * ... so monitoring with MII may be safest. |
849 | */ | 850 | */ |
850 | if (d[0] & NO_CARRIER) | 851 | if (pegasus->features & TRUST_LINK_STATUS) { |
851 | netif_carrier_off(net); | 852 | if (d[5] & LINK_STATUS) |
852 | else | 853 | netif_carrier_on(net); |
853 | netif_carrier_on(net); | 854 | else |
855 | netif_carrier_off(net); | ||
856 | } else { | ||
857 | /* Never set carrier _on_ based on ! NO_CARRIER */ | ||
858 | if (d[0] & NO_CARRIER) | ||
859 | netif_carrier_off(net); | ||
860 | } | ||
854 | 861 | ||
855 | /* bytes 3-4 == rx_lostpkt, reg 2E/2F */ | 862 | /* bytes 3-4 == rx_lostpkt, reg 2E/2F */ |
856 | pegasus->stats.rx_missed_errors += ((d[3] & 0x7f) << 8) | d[4]; | 863 | pegasus->stats.rx_missed_errors += ((d[3] & 0x7f) << 8) | d[4]; |
@@ -950,7 +957,7 @@ static void set_carrier(struct net_device *net) | |||
950 | pegasus_t *pegasus = netdev_priv(net); | 957 | pegasus_t *pegasus = netdev_priv(net); |
951 | u16 tmp; | 958 | u16 tmp; |
952 | 959 | ||
953 | if (!read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp)) | 960 | if (read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp)) |
954 | return; | 961 | return; |
955 | 962 | ||
956 | if (tmp & BMSR_LSTATUS) | 963 | if (tmp & BMSR_LSTATUS) |
diff --git a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h index c7467823cd1c..c7aadb413e8c 100644 --- a/drivers/usb/net/pegasus.h +++ b/drivers/usb/net/pegasus.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #define PEGASUS_II 0x80000000 | 12 | #define PEGASUS_II 0x80000000 |
13 | #define HAS_HOME_PNA 0x40000000 | 13 | #define HAS_HOME_PNA 0x40000000 |
14 | #define TRUST_LINK_STATUS 0x20000000 | ||
14 | 15 | ||
15 | #define PEGASUS_MTU 1536 | 16 | #define PEGASUS_MTU 1536 |
16 | #define RX_SKBS 4 | 17 | #define RX_SKBS 4 |
@@ -203,7 +204,7 @@ PEGASUS_DEV( "AEI USB Fast Ethernet Adapter", VENDOR_AEILAB, 0x1701, | |||
203 | PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100, | 204 | PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100, |
204 | DEFAULT_GPIO_RESET | PEGASUS_II ) | 205 | DEFAULT_GPIO_RESET | PEGASUS_II ) |
205 | PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, | 206 | PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, |
206 | DEFAULT_GPIO_RESET | PEGASUS_II ) | 207 | DEFAULT_GPIO_RESET | PEGASUS_II | TRUST_LINK_STATUS ) |
207 | PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986, | 208 | PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986, |
208 | DEFAULT_GPIO_RESET ) | 209 | DEFAULT_GPIO_RESET ) |
209 | PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987, | 210 | PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987, |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index e4f0dd00ae85..8372ace4a0d9 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -139,7 +139,7 @@ config FB_TILEBLITTING | |||
139 | This is particularly important to one driver, matroxfb. If | 139 | This is particularly important to one driver, matroxfb. If |
140 | unsure, say N. | 140 | unsure, say N. |
141 | 141 | ||
142 | comment "Frambuffer hardware drivers" | 142 | comment "Frame buffer hardware drivers" |
143 | depends on FB | 143 | depends on FB |
144 | 144 | ||
145 | config FB_CIRRUS | 145 | config FB_CIRRUS |
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 124a085d1f2e..b01b0a457932 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -415,7 +415,7 @@ static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir) | |||
415 | file_inode = file->d_inode; | 415 | file_inode = file->d_inode; |
416 | sb = file_inode->i_sb; | 416 | sb = file_inode->i_sb; |
417 | v9ses = v9fs_inode2v9ses(file_inode); | 417 | v9ses = v9fs_inode2v9ses(file_inode); |
418 | v9fid = v9fs_fid_lookup(file); | 418 | v9fid = v9fs_fid_clone(file); |
419 | if(IS_ERR(v9fid)) | 419 | if(IS_ERR(v9fid)) |
420 | return PTR_ERR(v9fid); | 420 | return PTR_ERR(v9fid); |
421 | 421 | ||
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index f01389fd162e..c8178b7b9212 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -54,82 +54,48 @@ | |||
54 | static struct reiserfs_xattr_handler *find_xattr_handler_prefix(const char | 54 | static struct reiserfs_xattr_handler *find_xattr_handler_prefix(const char |
55 | *prefix); | 55 | *prefix); |
56 | 56 | ||
57 | static struct dentry *create_xa_root(struct super_block *sb) | 57 | /* Returns the dentry referring to the root of the extended attribute |
58 | * directory tree. If it has already been retrieved, it is used. If it | ||
59 | * hasn't been created and the flags indicate creation is allowed, we | ||
60 | * attempt to create it. On error, we return a pointer-encoded error. | ||
61 | */ | ||
62 | static struct dentry *get_xa_root(struct super_block *sb, int flags) | ||
58 | { | 63 | { |
59 | struct dentry *privroot = dget(REISERFS_SB(sb)->priv_root); | 64 | struct dentry *privroot = dget(REISERFS_SB(sb)->priv_root); |
60 | struct dentry *xaroot; | 65 | struct dentry *xaroot; |
61 | 66 | ||
62 | /* This needs to be created at mount-time */ | 67 | /* This needs to be created at mount-time */ |
63 | if (!privroot) | 68 | if (!privroot) |
64 | return ERR_PTR(-EOPNOTSUPP); | 69 | return ERR_PTR(-ENODATA); |
65 | 70 | ||
66 | xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME)); | 71 | mutex_lock(&privroot->d_inode->i_mutex); |
67 | if (IS_ERR(xaroot)) { | 72 | if (REISERFS_SB(sb)->xattr_root) { |
73 | xaroot = dget(REISERFS_SB(sb)->xattr_root); | ||
68 | goto out; | 74 | goto out; |
69 | } else if (!xaroot->d_inode) { | ||
70 | int err; | ||
71 | mutex_lock(&privroot->d_inode->i_mutex); | ||
72 | err = | ||
73 | privroot->d_inode->i_op->mkdir(privroot->d_inode, xaroot, | ||
74 | 0700); | ||
75 | mutex_unlock(&privroot->d_inode->i_mutex); | ||
76 | |||
77 | if (err) { | ||
78 | dput(xaroot); | ||
79 | dput(privroot); | ||
80 | return ERR_PTR(err); | ||
81 | } | ||
82 | REISERFS_SB(sb)->xattr_root = dget(xaroot); | ||
83 | } | 75 | } |
84 | 76 | ||
85 | out: | ||
86 | dput(privroot); | ||
87 | return xaroot; | ||
88 | } | ||
89 | |||
90 | /* This will return a dentry, or error, refering to the xa root directory. | ||
91 | * If the xa root doesn't exist yet, the dentry will be returned without | ||
92 | * an associated inode. This dentry can be used with ->mkdir to create | ||
93 | * the xa directory. */ | ||
94 | static struct dentry *__get_xa_root(struct super_block *s) | ||
95 | { | ||
96 | struct dentry *privroot = dget(REISERFS_SB(s)->priv_root); | ||
97 | struct dentry *xaroot = NULL; | ||
98 | |||
99 | if (IS_ERR(privroot) || !privroot) | ||
100 | return privroot; | ||
101 | |||
102 | xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME)); | 77 | xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME)); |
103 | if (IS_ERR(xaroot)) { | 78 | if (IS_ERR(xaroot)) { |
104 | goto out; | 79 | goto out; |
105 | } else if (!xaroot->d_inode) { | 80 | } else if (!xaroot->d_inode) { |
106 | dput(xaroot); | 81 | int err = -ENODATA; |
107 | xaroot = NULL; | 82 | if (flags == 0 || flags & XATTR_CREATE) |
108 | goto out; | 83 | err = privroot->d_inode->i_op->mkdir(privroot->d_inode, |
84 | xaroot, 0700); | ||
85 | if (err) { | ||
86 | dput(xaroot); | ||
87 | xaroot = ERR_PTR(err); | ||
88 | goto out; | ||
89 | } | ||
109 | } | 90 | } |
110 | 91 | REISERFS_SB(sb)->xattr_root = dget(xaroot); | |
111 | REISERFS_SB(s)->xattr_root = dget(xaroot); | ||
112 | 92 | ||
113 | out: | 93 | out: |
94 | mutex_unlock(&privroot->d_inode->i_mutex); | ||
114 | dput(privroot); | 95 | dput(privroot); |
115 | return xaroot; | 96 | return xaroot; |
116 | } | 97 | } |
117 | 98 | ||
118 | /* Returns the dentry (or NULL) referring to the root of the extended | ||
119 | * attribute directory tree. If it has already been retrieved, it is used. | ||
120 | * Otherwise, we attempt to retrieve it from disk. It may also return | ||
121 | * a pointer-encoded error. | ||
122 | */ | ||
123 | static inline struct dentry *get_xa_root(struct super_block *s) | ||
124 | { | ||
125 | struct dentry *dentry = dget(REISERFS_SB(s)->xattr_root); | ||
126 | |||
127 | if (!dentry) | ||
128 | dentry = __get_xa_root(s); | ||
129 | |||
130 | return dentry; | ||
131 | } | ||
132 | |||
133 | /* Opens the directory corresponding to the inode's extended attribute store. | 99 | /* Opens the directory corresponding to the inode's extended attribute store. |
134 | * If flags allow, the tree to the directory may be created. If creation is | 100 | * If flags allow, the tree to the directory may be created. If creation is |
135 | * prohibited, -ENODATA is returned. */ | 101 | * prohibited, -ENODATA is returned. */ |
@@ -138,21 +104,11 @@ static struct dentry *open_xa_dir(const struct inode *inode, int flags) | |||
138 | struct dentry *xaroot, *xadir; | 104 | struct dentry *xaroot, *xadir; |
139 | char namebuf[17]; | 105 | char namebuf[17]; |
140 | 106 | ||
141 | xaroot = get_xa_root(inode->i_sb); | 107 | xaroot = get_xa_root(inode->i_sb, flags); |
142 | if (IS_ERR(xaroot)) { | 108 | if (IS_ERR(xaroot)) |
143 | return xaroot; | 109 | return xaroot; |
144 | } else if (!xaroot) { | ||
145 | if (flags == 0 || flags & XATTR_CREATE) { | ||
146 | xaroot = create_xa_root(inode->i_sb); | ||
147 | if (IS_ERR(xaroot)) | ||
148 | return xaroot; | ||
149 | } | ||
150 | if (!xaroot) | ||
151 | return ERR_PTR(-ENODATA); | ||
152 | } | ||
153 | 110 | ||
154 | /* ok, we have xaroot open */ | 111 | /* ok, we have xaroot open */ |
155 | |||
156 | snprintf(namebuf, sizeof(namebuf), "%X.%X", | 112 | snprintf(namebuf, sizeof(namebuf), "%X.%X", |
157 | le32_to_cpu(INODE_PKEY(inode)->k_objectid), | 113 | le32_to_cpu(INODE_PKEY(inode)->k_objectid), |
158 | inode->i_generation); | 114 | inode->i_generation); |
@@ -821,7 +777,7 @@ int reiserfs_delete_xattrs(struct inode *inode) | |||
821 | 777 | ||
822 | /* Leftovers besides . and .. -- that's not good. */ | 778 | /* Leftovers besides . and .. -- that's not good. */ |
823 | if (dir->d_inode->i_nlink <= 2) { | 779 | if (dir->d_inode->i_nlink <= 2) { |
824 | root = get_xa_root(inode->i_sb); | 780 | root = get_xa_root(inode->i_sb, XATTR_REPLACE); |
825 | reiserfs_write_lock_xattrs(inode->i_sb); | 781 | reiserfs_write_lock_xattrs(inode->i_sb); |
826 | err = vfs_rmdir(root->d_inode, dir); | 782 | err = vfs_rmdir(root->d_inode, dir); |
827 | reiserfs_write_unlock_xattrs(inode->i_sb); | 783 | reiserfs_write_unlock_xattrs(inode->i_sb); |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index f8241130f5ea..713eb5eaa81f 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -177,6 +177,7 @@ struct ipv6_devconf { | |||
177 | #endif | 177 | #endif |
178 | #endif | 178 | #endif |
179 | __s32 proxy_ndp; | 179 | __s32 proxy_ndp; |
180 | __s32 accept_source_route; | ||
180 | void *sysctl; | 181 | void *sysctl; |
181 | }; | 182 | }; |
182 | 183 | ||
@@ -205,6 +206,8 @@ enum { | |||
205 | DEVCONF_RTR_PROBE_INTERVAL, | 206 | DEVCONF_RTR_PROBE_INTERVAL, |
206 | DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN, | 207 | DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN, |
207 | DEVCONF_PROXY_NDP, | 208 | DEVCONF_PROXY_NDP, |
209 | __DEVCONF_OPTIMISTIC_DAD, | ||
210 | DEVCONF_ACCEPT_SOURCE_ROUTE, | ||
208 | DEVCONF_MAX | 211 | DEVCONF_MAX |
209 | }; | 212 | }; |
210 | 213 | ||
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 2c5fb38d9392..9a8970bf99a6 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -580,6 +580,7 @@ enum { | |||
580 | NET_IPV6_RTR_PROBE_INTERVAL=21, | 580 | NET_IPV6_RTR_PROBE_INTERVAL=21, |
581 | NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22, | 581 | NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22, |
582 | NET_IPV6_PROXY_NDP=23, | 582 | NET_IPV6_PROXY_NDP=23, |
583 | NET_IPV6_ACCEPT_SOURCE_ROUTE=25, | ||
583 | __NET_IPV6_MAX | 584 | __NET_IPV6_MAX |
584 | }; | 585 | }; |
585 | 586 | ||
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index 3fced4798255..a46104a28f66 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
@@ -31,7 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | 33 | ||
34 | #define TASKSTATS_VERSION 3 | 34 | #define TASKSTATS_VERSION 4 |
35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN | 35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN |
36 | * in linux/sched.h */ | 36 | * in linux/sched.h */ |
37 | 37 | ||
@@ -66,7 +66,7 @@ struct taskstats { | |||
66 | /* Delay waiting for cpu, while runnable | 66 | /* Delay waiting for cpu, while runnable |
67 | * count, delay_total NOT updated atomically | 67 | * count, delay_total NOT updated atomically |
68 | */ | 68 | */ |
69 | __u64 cpu_count; | 69 | __u64 cpu_count __attribute__((aligned(8))); |
70 | __u64 cpu_delay_total; | 70 | __u64 cpu_delay_total; |
71 | 71 | ||
72 | /* Following four fields atomically updated using task->delays->lock */ | 72 | /* Following four fields atomically updated using task->delays->lock */ |
@@ -101,14 +101,17 @@ struct taskstats { | |||
101 | 101 | ||
102 | /* Basic Accounting Fields start */ | 102 | /* Basic Accounting Fields start */ |
103 | char ac_comm[TS_COMM_LEN]; /* Command name */ | 103 | char ac_comm[TS_COMM_LEN]; /* Command name */ |
104 | __u8 ac_sched; /* Scheduling discipline */ | 104 | __u8 ac_sched __attribute__((aligned(8))); |
105 | /* Scheduling discipline */ | ||
105 | __u8 ac_pad[3]; | 106 | __u8 ac_pad[3]; |
106 | __u32 ac_uid; /* User ID */ | 107 | __u32 ac_uid __attribute__((aligned(8))); |
108 | /* User ID */ | ||
107 | __u32 ac_gid; /* Group ID */ | 109 | __u32 ac_gid; /* Group ID */ |
108 | __u32 ac_pid; /* Process ID */ | 110 | __u32 ac_pid; /* Process ID */ |
109 | __u32 ac_ppid; /* Parent process ID */ | 111 | __u32 ac_ppid; /* Parent process ID */ |
110 | __u32 ac_btime; /* Begin time [sec since 1970] */ | 112 | __u32 ac_btime; /* Begin time [sec since 1970] */ |
111 | __u64 ac_etime; /* Elapsed time [usec] */ | 113 | __u64 ac_etime __attribute__((aligned(8))); |
114 | /* Elapsed time [usec] */ | ||
112 | __u64 ac_utime; /* User CPU time [usec] */ | 115 | __u64 ac_utime; /* User CPU time [usec] */ |
113 | __u64 ac_stime; /* SYstem CPU time [usec] */ | 116 | __u64 ac_stime; /* SYstem CPU time [usec] */ |
114 | __u64 ac_minflt; /* Minor Page Fault Count */ | 117 | __u64 ac_minflt; /* Minor Page Fault Count */ |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 1b255df4fcd0..c904748f2290 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -1676,7 +1676,7 @@ static int proc_dointvec_taint(ctl_table *table, int write, struct file *filp, | |||
1676 | { | 1676 | { |
1677 | int op; | 1677 | int op; |
1678 | 1678 | ||
1679 | if (!capable(CAP_SYS_ADMIN)) | 1679 | if (write && !capable(CAP_SYS_ADMIN)) |
1680 | return -EPERM; | 1680 | return -EPERM; |
1681 | 1681 | ||
1682 | op = OP_OR; | 1682 | op = OP_OR; |
diff --git a/mm/migrate.c b/mm/migrate.c index 7a66ca25dc8a..a91ca00abebe 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -297,7 +297,7 @@ static int migrate_page_move_mapping(struct address_space *mapping, | |||
297 | void **pslot; | 297 | void **pslot; |
298 | 298 | ||
299 | if (!mapping) { | 299 | if (!mapping) { |
300 | /* Anonymous page */ | 300 | /* Anonymous page without mapping */ |
301 | if (page_count(page) != 1) | 301 | if (page_count(page) != 1) |
302 | return -EAGAIN; | 302 | return -EAGAIN; |
303 | return 0; | 303 | return 0; |
@@ -333,6 +333,19 @@ static int migrate_page_move_mapping(struct address_space *mapping, | |||
333 | */ | 333 | */ |
334 | __put_page(page); | 334 | __put_page(page); |
335 | 335 | ||
336 | /* | ||
337 | * If moved to a different zone then also account | ||
338 | * the page for that zone. Other VM counters will be | ||
339 | * taken care of when we establish references to the | ||
340 | * new page and drop references to the old page. | ||
341 | * | ||
342 | * Note that anonymous pages are accounted for | ||
343 | * via NR_FILE_PAGES and NR_ANON_PAGES if they | ||
344 | * are mapped to swap space. | ||
345 | */ | ||
346 | __dec_zone_page_state(page, NR_FILE_PAGES); | ||
347 | __inc_zone_page_state(newpage, NR_FILE_PAGES); | ||
348 | |||
336 | write_unlock_irq(&mapping->tree_lock); | 349 | write_unlock_irq(&mapping->tree_lock); |
337 | 350 | ||
338 | return 0; | 351 | return 0; |
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 2f3916986abf..3791edfffeeb 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -176,6 +176,8 @@ static inline int constrained_alloc(struct zonelist *zonelist, gfp_t gfp_mask) | |||
176 | struct zone **z; | 176 | struct zone **z; |
177 | nodemask_t nodes; | 177 | nodemask_t nodes; |
178 | int node; | 178 | int node; |
179 | |||
180 | nodes_clear(nodes); | ||
179 | /* node has memory ? */ | 181 | /* node has memory ? */ |
180 | for_each_online_node(node) | 182 | for_each_online_node(node) |
181 | if (NODE_DATA(node)->node_present_pages) | 183 | if (NODE_DATA(node)->node_present_pages) |
@@ -333,7 +335,7 @@ static int oom_kill_task(struct task_struct *p) | |||
333 | */ | 335 | */ |
334 | do_each_thread(g, q) { | 336 | do_each_thread(g, q) { |
335 | if (q->mm == mm && q->tgid != p->tgid) | 337 | if (q->mm == mm && q->tgid != p->tgid) |
336 | force_sig(SIGKILL, p); | 338 | force_sig(SIGKILL, q); |
337 | } while_each_thread(g, q); | 339 | } while_each_thread(g, q); |
338 | 340 | ||
339 | return 0; | 341 | return 0; |
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index fc920f63452b..cac06c43f004 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -776,6 +776,8 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb ) | |||
776 | .nl_u = { .ip4_u = { .daddr = frn->fl_addr, | 776 | .nl_u = { .ip4_u = { .daddr = frn->fl_addr, |
777 | .tos = frn->fl_tos, | 777 | .tos = frn->fl_tos, |
778 | .scope = frn->fl_scope } } }; | 778 | .scope = frn->fl_scope } } }; |
779 | |||
780 | frn->err = -ENOENT; | ||
779 | if (tb) { | 781 | if (tb) { |
780 | local_bh_disable(); | 782 | local_bh_disable(); |
781 | 783 | ||
@@ -787,6 +789,7 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb ) | |||
787 | frn->nh_sel = res.nh_sel; | 789 | frn->nh_sel = res.nh_sel; |
788 | frn->type = res.type; | 790 | frn->type = res.type; |
789 | frn->scope = res.scope; | 791 | frn->scope = res.scope; |
792 | fib_res_put(&res); | ||
790 | } | 793 | } |
791 | local_bh_enable(); | 794 | local_bh_enable(); |
792 | } | 795 | } |
@@ -801,6 +804,9 @@ static void nl_fib_input(struct sock *sk, int len) | |||
801 | struct fib_table *tb; | 804 | struct fib_table *tb; |
802 | 805 | ||
803 | skb = skb_dequeue(&sk->sk_receive_queue); | 806 | skb = skb_dequeue(&sk->sk_receive_queue); |
807 | if (skb == NULL) | ||
808 | return; | ||
809 | |||
804 | nlh = (struct nlmsghdr *)skb->data; | 810 | nlh = (struct nlmsghdr *)skb->data; |
805 | if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len || | 811 | if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len || |
806 | nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn))) { | 812 | nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn))) { |
@@ -813,7 +819,7 @@ static void nl_fib_input(struct sock *sk, int len) | |||
813 | 819 | ||
814 | nl_fib_lookup(frn, tb); | 820 | nl_fib_lookup(frn, tb); |
815 | 821 | ||
816 | pid = nlh->nlmsg_pid; /*pid of sending process */ | 822 | pid = NETLINK_CB(skb).pid; /* pid of sending process */ |
817 | NETLINK_CB(skb).pid = 0; /* from kernel */ | 823 | NETLINK_CB(skb).pid = 0; /* from kernel */ |
818 | NETLINK_CB(skb).dst_group = 0; /* unicast */ | 824 | NETLINK_CB(skb).dst_group = 0; /* unicast */ |
819 | netlink_unicast(sk, skb, pid, MSG_DONTWAIT); | 825 | netlink_unicast(sk, skb, pid, MSG_DONTWAIT); |
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 5c8caf4a1244..34ae3f13483a 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
@@ -77,18 +77,19 @@ void tcp_init_congestion_control(struct sock *sk) | |||
77 | struct inet_connection_sock *icsk = inet_csk(sk); | 77 | struct inet_connection_sock *icsk = inet_csk(sk); |
78 | struct tcp_congestion_ops *ca; | 78 | struct tcp_congestion_ops *ca; |
79 | 79 | ||
80 | if (icsk->icsk_ca_ops != &tcp_init_congestion_ops) | 80 | /* if no choice made yet assign the current value set as default */ |
81 | return; | 81 | if (icsk->icsk_ca_ops == &tcp_init_congestion_ops) { |
82 | rcu_read_lock(); | ||
83 | list_for_each_entry_rcu(ca, &tcp_cong_list, list) { | ||
84 | if (try_module_get(ca->owner)) { | ||
85 | icsk->icsk_ca_ops = ca; | ||
86 | break; | ||
87 | } | ||
82 | 88 | ||
83 | rcu_read_lock(); | 89 | /* fallback to next available */ |
84 | list_for_each_entry_rcu(ca, &tcp_cong_list, list) { | ||
85 | if (try_module_get(ca->owner)) { | ||
86 | icsk->icsk_ca_ops = ca; | ||
87 | break; | ||
88 | } | 90 | } |
89 | 91 | rcu_read_unlock(); | |
90 | } | 92 | } |
91 | rcu_read_unlock(); | ||
92 | 93 | ||
93 | if (icsk->icsk_ca_ops->init) | 94 | if (icsk->icsk_ca_ops->init) |
94 | icsk->icsk_ca_ops->init(sk); | 95 | icsk->icsk_ca_ops->init(sk); |
@@ -236,6 +237,7 @@ int tcp_set_congestion_control(struct sock *sk, const char *name) | |||
236 | 237 | ||
237 | rcu_read_lock(); | 238 | rcu_read_lock(); |
238 | ca = tcp_ca_find(name); | 239 | ca = tcp_ca_find(name); |
240 | |||
239 | /* no change asking for existing value */ | 241 | /* no change asking for existing value */ |
240 | if (ca == icsk->icsk_ca_ops) | 242 | if (ca == icsk->icsk_ca_ops) |
241 | goto out; | 243 | goto out; |
@@ -261,7 +263,8 @@ int tcp_set_congestion_control(struct sock *sk, const char *name) | |||
261 | else { | 263 | else { |
262 | tcp_cleanup_congestion_control(sk); | 264 | tcp_cleanup_congestion_control(sk); |
263 | icsk->icsk_ca_ops = ca; | 265 | icsk->icsk_ca_ops = ca; |
264 | if (icsk->icsk_ca_ops->init) | 266 | |
267 | if (sk->sk_state != TCP_CLOSE && icsk->icsk_ca_ops->init) | ||
265 | icsk->icsk_ca_ops->init(sk); | 268 | icsk->icsk_ca_ops->init(sk); |
266 | } | 269 | } |
267 | out: | 270 | out: |
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index f68dfd8a0f5c..d419e15d9803 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c | |||
@@ -52,7 +52,7 @@ static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb) | |||
52 | 52 | ||
53 | ph = (struct ip_beet_phdr *)skb->h.raw; | 53 | ph = (struct ip_beet_phdr *)skb->h.raw; |
54 | ph->padlen = 4 - (optlen & 4); | 54 | ph->padlen = 4 - (optlen & 4); |
55 | ph->hdrlen = (optlen + ph->padlen + sizeof(*ph)) / 8; | 55 | ph->hdrlen = optlen / 8; |
56 | ph->nexthdr = top_iph->protocol; | 56 | ph->nexthdr = top_iph->protocol; |
57 | if (ph->padlen) | 57 | if (ph->padlen) |
58 | memset(ph + 1, IPOPT_NOP, ph->padlen); | 58 | memset(ph + 1, IPOPT_NOP, ph->padlen); |
@@ -85,7 +85,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) | |||
85 | ph = (struct ip_beet_phdr *)(skb->h.ipiph + 1); | 85 | ph = (struct ip_beet_phdr *)(skb->h.ipiph + 1); |
86 | 86 | ||
87 | phlen = sizeof(*ph) + ph->padlen; | 87 | phlen = sizeof(*ph) + ph->padlen; |
88 | optlen = ph->hdrlen * 8 - phlen; | 88 | optlen = ph->hdrlen * 8 + (IPV4_BEET_PHMAXLEN - phlen); |
89 | if (optlen < 0 || optlen & 3 || optlen > 250) | 89 | if (optlen < 0 || optlen & 3 || optlen > 250) |
90 | goto out; | 90 | goto out; |
91 | 91 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 7552663aa125..452a82ce4796 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -172,6 +172,7 @@ struct ipv6_devconf ipv6_devconf __read_mostly = { | |||
172 | #endif | 172 | #endif |
173 | #endif | 173 | #endif |
174 | .proxy_ndp = 0, | 174 | .proxy_ndp = 0, |
175 | .accept_source_route = 0, /* we do not accept RH0 by default. */ | ||
175 | }; | 176 | }; |
176 | 177 | ||
177 | static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = { | 178 | static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = { |
@@ -203,6 +204,7 @@ static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = { | |||
203 | #endif | 204 | #endif |
204 | #endif | 205 | #endif |
205 | .proxy_ndp = 0, | 206 | .proxy_ndp = 0, |
207 | .accept_source_route = 0, /* we do not accept RH0 by default. */ | ||
206 | }; | 208 | }; |
207 | 209 | ||
208 | /* IPv6 Wildcard Address and Loopback Address defined by RFC2553 */ | 210 | /* IPv6 Wildcard Address and Loopback Address defined by RFC2553 */ |
@@ -3356,6 +3358,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf, | |||
3356 | #endif | 3358 | #endif |
3357 | #endif | 3359 | #endif |
3358 | array[DEVCONF_PROXY_NDP] = cnf->proxy_ndp; | 3360 | array[DEVCONF_PROXY_NDP] = cnf->proxy_ndp; |
3361 | array[DEVCONF_ACCEPT_SOURCE_ROUTE] = cnf->accept_source_route; | ||
3359 | } | 3362 | } |
3360 | 3363 | ||
3361 | static inline size_t inet6_if_nlmsg_size(void) | 3364 | static inline size_t inet6_if_nlmsg_size(void) |
@@ -3884,6 +3887,14 @@ static struct addrconf_sysctl_table | |||
3884 | .proc_handler = &proc_dointvec, | 3887 | .proc_handler = &proc_dointvec, |
3885 | }, | 3888 | }, |
3886 | { | 3889 | { |
3890 | .ctl_name = NET_IPV6_ACCEPT_SOURCE_ROUTE, | ||
3891 | .procname = "accept_source_route", | ||
3892 | .data = &ipv6_devconf.accept_source_route, | ||
3893 | .maxlen = sizeof(int), | ||
3894 | .mode = 0644, | ||
3895 | .proc_handler = &proc_dointvec, | ||
3896 | }, | ||
3897 | { | ||
3887 | .ctl_name = 0, /* sentinel */ | 3898 | .ctl_name = 0, /* sentinel */ |
3888 | } | 3899 | } |
3889 | }, | 3900 | }, |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 28e0c6568272..fb39604c3d09 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -362,10 +362,27 @@ static int ipv6_rthdr_rcv(struct sk_buff **skbp) | |||
362 | struct inet6_skb_parm *opt = IP6CB(skb); | 362 | struct inet6_skb_parm *opt = IP6CB(skb); |
363 | struct in6_addr *addr = NULL; | 363 | struct in6_addr *addr = NULL; |
364 | struct in6_addr daddr; | 364 | struct in6_addr daddr; |
365 | struct inet6_dev *idev; | ||
365 | int n, i; | 366 | int n, i; |
366 | |||
367 | struct ipv6_rt_hdr *hdr; | 367 | struct ipv6_rt_hdr *hdr; |
368 | struct rt0_hdr *rthdr; | 368 | struct rt0_hdr *rthdr; |
369 | int accept_source_route = ipv6_devconf.accept_source_route; | ||
370 | |||
371 | if (accept_source_route < 0 || | ||
372 | ((idev = in6_dev_get(skb->dev)) == NULL)) { | ||
373 | kfree_skb(skb); | ||
374 | return -1; | ||
375 | } | ||
376 | if (idev->cnf.accept_source_route < 0) { | ||
377 | in6_dev_put(idev); | ||
378 | kfree_skb(skb); | ||
379 | return -1; | ||
380 | } | ||
381 | |||
382 | if (accept_source_route > idev->cnf.accept_source_route) | ||
383 | accept_source_route = idev->cnf.accept_source_route; | ||
384 | |||
385 | in6_dev_put(idev); | ||
369 | 386 | ||
370 | if (!pskb_may_pull(skb, (skb->h.raw-skb->data)+8) || | 387 | if (!pskb_may_pull(skb, (skb->h.raw-skb->data)+8) || |
371 | !pskb_may_pull(skb, (skb->h.raw-skb->data)+((skb->h.raw[1]+1)<<3))) { | 388 | !pskb_may_pull(skb, (skb->h.raw-skb->data)+((skb->h.raw[1]+1)<<3))) { |
@@ -377,6 +394,22 @@ static int ipv6_rthdr_rcv(struct sk_buff **skbp) | |||
377 | 394 | ||
378 | hdr = (struct ipv6_rt_hdr *) skb->h.raw; | 395 | hdr = (struct ipv6_rt_hdr *) skb->h.raw; |
379 | 396 | ||
397 | switch (hdr->type) { | ||
398 | #ifdef CONFIG_IPV6_MIP6 | ||
399 | break; | ||
400 | #endif | ||
401 | case IPV6_SRCRT_TYPE_0: | ||
402 | if (accept_source_route > 0) | ||
403 | break; | ||
404 | kfree_skb(skb); | ||
405 | return -1; | ||
406 | default: | ||
407 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), | ||
408 | IPSTATS_MIB_INHDRERRORS); | ||
409 | icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, (&hdr->type) - skb->nh.raw); | ||
410 | return -1; | ||
411 | } | ||
412 | |||
380 | if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr) || | 413 | if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr) || |
381 | skb->pkt_type != PACKET_HOST) { | 414 | skb->pkt_type != PACKET_HOST) { |
382 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), | 415 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), |
@@ -434,11 +467,6 @@ looped_back: | |||
434 | } | 467 | } |
435 | break; | 468 | break; |
436 | #endif | 469 | #endif |
437 | default: | ||
438 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), | ||
439 | IPSTATS_MIB_INHDRERRORS); | ||
440 | icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, (&hdr->type) - skb->nh.raw); | ||
441 | return -1; | ||
442 | } | 470 | } |
443 | 471 | ||
444 | /* | 472 | /* |