diff options
80 files changed, 262 insertions, 381 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index cad0882754a6..695551a1519d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -3733,7 +3733,7 @@ S: Maintained | |||
3733 | TLAN NETWORK DRIVER | 3733 | TLAN NETWORK DRIVER |
3734 | P: Samuel Chessman | 3734 | P: Samuel Chessman |
3735 | M: chessman@tux.org | 3735 | M: chessman@tux.org |
3736 | L: tlan-devel@lists.sourceforge.net | 3736 | L: tlan-devel@lists.sourceforge.net (subscribers-only) |
3737 | W: http://sourceforge.net/projects/tlan/ | 3737 | W: http://sourceforge.net/projects/tlan/ |
3738 | S: Maintained | 3738 | S: Maintained |
3739 | 3739 | ||
@@ -200,11 +200,9 @@ SRCARCH := $(ARCH) | |||
200 | # Additional ARCH settings for x86 | 200 | # Additional ARCH settings for x86 |
201 | ifeq ($(ARCH),i386) | 201 | ifeq ($(ARCH),i386) |
202 | SRCARCH := x86 | 202 | SRCARCH := x86 |
203 | K64BIT := n | ||
204 | endif | 203 | endif |
205 | ifeq ($(ARCH),x86_64) | 204 | ifeq ($(ARCH),x86_64) |
206 | SRCARCH := x86 | 205 | SRCARCH := x86 |
207 | K64BIT := y | ||
208 | endif | 206 | endif |
209 | 207 | ||
210 | KCONFIG_CONFIG ?= .config | 208 | KCONFIG_CONFIG ?= .config |
@@ -341,7 +339,7 @@ KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) | |||
341 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 339 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
342 | 340 | ||
343 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION | 341 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION |
344 | export ARCH SRCARCH K64BIT CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC | 342 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC |
345 | export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE | 343 | export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE |
346 | export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | 344 | export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS |
347 | 345 | ||
@@ -1334,12 +1332,7 @@ else | |||
1334 | ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS) | 1332 | ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS) |
1335 | endif | 1333 | endif |
1336 | 1334 | ||
1337 | # Take care of arch/x86 | 1335 | ALLSOURCE_ARCHS := $(SRCARCH) |
1338 | ifeq ($(ARCH), $(SRCARCH)) | ||
1339 | ALLSOURCE_ARCHS := $(ARCH) | ||
1340 | else | ||
1341 | ALLSOURCE_ARCHS := $(ARCH) $(SRCARCH) | ||
1342 | endif | ||
1343 | 1336 | ||
1344 | define find-sources | 1337 | define find-sources |
1345 | ( for arch in $(ALLSOURCE_ARCHS) ; do \ | 1338 | ( for arch in $(ALLSOURCE_ARCHS) ; do \ |
@@ -194,8 +194,6 @@ CONFIGURING the kernel: | |||
194 | "make *config" checks for a file named "all{yes/mod/no/random}.config" | 194 | "make *config" checks for a file named "all{yes/mod/no/random}.config" |
195 | for symbol values that are to be forced. If this file is not found, | 195 | for symbol values that are to be forced. If this file is not found, |
196 | it checks for a file named "all.config" to contain forced values. | 196 | it checks for a file named "all.config" to contain forced values. |
197 | Finally it checks the environment variable K64BIT and if found, sets | ||
198 | the config symbol "64BIT" to the value of the K64BIT variable. | ||
199 | 197 | ||
200 | NOTES on "make config": | 198 | NOTES on "make config": |
201 | - having unnecessary drivers will make the kernel bigger, and can | 199 | - having unnecessary drivers will make the kernel bigger, and can |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 1eb59971af5d..368864dfe6eb 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -3,8 +3,8 @@ mainmenu "Linux Kernel Configuration for x86" | |||
3 | 3 | ||
4 | # Select 32 or 64 bit | 4 | # Select 32 or 64 bit |
5 | config 64BIT | 5 | config 64BIT |
6 | bool "64-bit kernel" | 6 | bool "64-bit kernel" if ARCH = "x86" |
7 | default n | 7 | default ARCH = "x86_64" |
8 | help | 8 | help |
9 | Say yes to build a 64-bit kernel - formerly known as x86_64 | 9 | Say yes to build a 64-bit kernel - formerly known as x86_64 |
10 | Say no to build a 32-bit kernel - formerly known as i386 | 10 | Say no to build a 32-bit kernel - formerly known as i386 |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 289247d974c6..0ca27c7b0e8d 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -637,6 +637,38 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table) | |||
637 | } | 637 | } |
638 | 638 | ||
639 | hpet_address = hpet_tbl->address.address; | 639 | hpet_address = hpet_tbl->address.address; |
640 | |||
641 | /* | ||
642 | * Some broken BIOSes advertise HPET at 0x0. We really do not | ||
643 | * want to allocate a resource there. | ||
644 | */ | ||
645 | if (!hpet_address) { | ||
646 | printk(KERN_WARNING PREFIX | ||
647 | "HPET id: %#x base: %#lx is invalid\n", | ||
648 | hpet_tbl->id, hpet_address); | ||
649 | return 0; | ||
650 | } | ||
651 | #ifdef CONFIG_X86_64 | ||
652 | /* | ||
653 | * Some even more broken BIOSes advertise HPET at | ||
654 | * 0xfed0000000000000 instead of 0xfed00000. Fix it up and add | ||
655 | * some noise: | ||
656 | */ | ||
657 | if (hpet_address == 0xfed0000000000000UL) { | ||
658 | if (!hpet_force_user) { | ||
659 | printk(KERN_WARNING PREFIX "HPET id: %#x " | ||
660 | "base: 0xfed0000000000000 is bogus\n " | ||
661 | "try hpet=force on the kernel command line to " | ||
662 | "fix it up to 0xfed00000.\n", hpet_tbl->id); | ||
663 | hpet_address = 0; | ||
664 | return 0; | ||
665 | } | ||
666 | printk(KERN_WARNING PREFIX | ||
667 | "HPET id: %#x base: 0xfed0000000000000 fixed up " | ||
668 | "to 0xfed00000.\n", hpet_tbl->id); | ||
669 | hpet_address >>= 32; | ||
670 | } | ||
671 | #endif | ||
640 | printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", | 672 | printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", |
641 | hpet_tbl->id, hpet_address); | 673 | hpet_tbl->id, hpet_address); |
642 | 674 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index 447b351f1f2a..4b21d29fb5aa 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
@@ -810,7 +810,7 @@ static __cpuinit int mce_create_device(unsigned int cpu) | |||
810 | int err; | 810 | int err; |
811 | int i; | 811 | int i; |
812 | 812 | ||
813 | if (!mce_available(&cpu_data(cpu))) | 813 | if (!mce_available(&boot_cpu_data)) |
814 | return -EIO; | 814 | return -EIO; |
815 | 815 | ||
816 | memset(&per_cpu(device_mce, cpu).kobj, 0, sizeof(struct kobject)); | 816 | memset(&per_cpu(device_mce, cpu).kobj, 0, sizeof(struct kobject)); |
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index 066f8c6af4df..3900e46d66db 100644 --- a/arch/x86/kernel/cpu/proc.c +++ b/arch/x86/kernel/cpu/proc.c | |||
@@ -89,8 +89,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
89 | int fpu_exception; | 89 | int fpu_exception; |
90 | 90 | ||
91 | #ifdef CONFIG_SMP | 91 | #ifdef CONFIG_SMP |
92 | if (!cpu_online(n)) | ||
93 | return 0; | ||
94 | n = c->cpu_index; | 92 | n = c->cpu_index; |
95 | #endif | 93 | #endif |
96 | seq_printf(m, "processor\t: %d\n" | 94 | seq_printf(m, "processor\t: %d\n" |
@@ -177,14 +175,14 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
177 | static void *c_start(struct seq_file *m, loff_t *pos) | 175 | static void *c_start(struct seq_file *m, loff_t *pos) |
178 | { | 176 | { |
179 | if (*pos == 0) /* just in case, cpu 0 is not the first */ | 177 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
180 | *pos = first_cpu(cpu_possible_map); | 178 | *pos = first_cpu(cpu_online_map); |
181 | if ((*pos) < NR_CPUS && cpu_possible(*pos)) | 179 | if ((*pos) < NR_CPUS && cpu_online(*pos)) |
182 | return &cpu_data(*pos); | 180 | return &cpu_data(*pos); |
183 | return NULL; | 181 | return NULL; |
184 | } | 182 | } |
185 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 183 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
186 | { | 184 | { |
187 | *pos = next_cpu(*pos, cpu_possible_map); | 185 | *pos = next_cpu(*pos, cpu_online_map); |
188 | return c_start(m, pos); | 186 | return c_start(m, pos); |
189 | } | 187 | } |
190 | static void c_stop(struct seq_file *m, void *v) | 188 | static void c_stop(struct seq_file *m, void *v) |
diff --git a/arch/x86/kernel/reboot_fixups_32.c b/arch/x86/kernel/reboot_fixups_32.c index 1a07bbea7be3..f452726c0fe2 100644 --- a/arch/x86/kernel/reboot_fixups_32.c +++ b/arch/x86/kernel/reboot_fixups_32.c | |||
@@ -39,6 +39,7 @@ struct device_fixup { | |||
39 | static struct device_fixup fixups_table[] = { | 39 | static struct device_fixup fixups_table[] = { |
40 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset }, | 40 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset }, |
41 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset }, | 41 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset }, |
42 | { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE, cs5530a_warm_reset }, | ||
42 | }; | 43 | }; |
43 | 44 | ||
44 | /* | 45 | /* |
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index 238633d3d09a..30d94d1d5f5f 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -892,7 +892,6 @@ void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) | |||
892 | 892 | ||
893 | #ifdef CONFIG_SMP | 893 | #ifdef CONFIG_SMP |
894 | c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; | 894 | c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; |
895 | c->cpu_index = 0; | ||
896 | #endif | 895 | #endif |
897 | } | 896 | } |
898 | 897 | ||
@@ -1078,8 +1077,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1078 | 1077 | ||
1079 | 1078 | ||
1080 | #ifdef CONFIG_SMP | 1079 | #ifdef CONFIG_SMP |
1081 | if (!cpu_online(c->cpu_index)) | ||
1082 | return 0; | ||
1083 | cpu = c->cpu_index; | 1080 | cpu = c->cpu_index; |
1084 | #endif | 1081 | #endif |
1085 | 1082 | ||
@@ -1171,15 +1168,15 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1171 | static void *c_start(struct seq_file *m, loff_t *pos) | 1168 | static void *c_start(struct seq_file *m, loff_t *pos) |
1172 | { | 1169 | { |
1173 | if (*pos == 0) /* just in case, cpu 0 is not the first */ | 1170 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
1174 | *pos = first_cpu(cpu_possible_map); | 1171 | *pos = first_cpu(cpu_online_map); |
1175 | if ((*pos) < NR_CPUS && cpu_possible(*pos)) | 1172 | if ((*pos) < NR_CPUS && cpu_online(*pos)) |
1176 | return &cpu_data(*pos); | 1173 | return &cpu_data(*pos); |
1177 | return NULL; | 1174 | return NULL; |
1178 | } | 1175 | } |
1179 | 1176 | ||
1180 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 1177 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
1181 | { | 1178 | { |
1182 | *pos = next_cpu(*pos, cpu_possible_map); | 1179 | *pos = next_cpu(*pos, cpu_online_map); |
1183 | return c_start(m, pos); | 1180 | return c_start(m, pos); |
1184 | } | 1181 | } |
1185 | 1182 | ||
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c index c821edc32216..368b1942b39a 100644 --- a/arch/x86/kernel/time_64.c +++ b/arch/x86/kernel/time_64.c | |||
@@ -82,18 +82,15 @@ static int set_rtc_mmss(unsigned long nowtime) | |||
82 | int retval = 0; | 82 | int retval = 0; |
83 | int real_seconds, real_minutes, cmos_minutes; | 83 | int real_seconds, real_minutes, cmos_minutes; |
84 | unsigned char control, freq_select; | 84 | unsigned char control, freq_select; |
85 | unsigned long flags; | ||
85 | 86 | ||
86 | /* | 87 | /* |
87 | * IRQs are disabled when we're called from the timer interrupt, | 88 | * set_rtc_mmss is called when irqs are enabled, so disable irqs here |
88 | * no need for spin_lock_irqsave() | ||
89 | */ | 89 | */ |
90 | 90 | spin_lock_irqsave(&rtc_lock, flags); | |
91 | spin_lock(&rtc_lock); | ||
92 | |||
93 | /* | 91 | /* |
94 | * Tell the clock it's being set and stop it. | 92 | * Tell the clock it's being set and stop it. |
95 | */ | 93 | */ |
96 | |||
97 | control = CMOS_READ(RTC_CONTROL); | 94 | control = CMOS_READ(RTC_CONTROL); |
98 | CMOS_WRITE(control | RTC_SET, RTC_CONTROL); | 95 | CMOS_WRITE(control | RTC_SET, RTC_CONTROL); |
99 | 96 | ||
@@ -138,7 +135,7 @@ static int set_rtc_mmss(unsigned long nowtime) | |||
138 | CMOS_WRITE(control, RTC_CONTROL); | 135 | CMOS_WRITE(control, RTC_CONTROL); |
139 | CMOS_WRITE(freq_select, RTC_FREQ_SELECT); | 136 | CMOS_WRITE(freq_select, RTC_FREQ_SELECT); |
140 | 137 | ||
141 | spin_unlock(&rtc_lock); | 138 | spin_unlock_irqrestore(&rtc_lock, flags); |
142 | 139 | ||
143 | return retval; | 140 | return retval; |
144 | } | 141 | } |
@@ -164,21 +161,27 @@ unsigned long read_persistent_clock(void) | |||
164 | unsigned century = 0; | 161 | unsigned century = 0; |
165 | 162 | ||
166 | spin_lock_irqsave(&rtc_lock, flags); | 163 | spin_lock_irqsave(&rtc_lock, flags); |
164 | /* | ||
165 | * if UIP is clear, then we have >= 244 microseconds before RTC | ||
166 | * registers will be updated. Spec sheet says that this is the | ||
167 | * reliable way to read RTC - registers invalid (off bus) during update | ||
168 | */ | ||
169 | while ((CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)) | ||
170 | cpu_relax(); | ||
167 | 171 | ||
168 | do { | 172 | |
169 | sec = CMOS_READ(RTC_SECONDS); | 173 | /* now read all RTC registers while stable with interrupts disabled */ |
170 | min = CMOS_READ(RTC_MINUTES); | 174 | sec = CMOS_READ(RTC_SECONDS); |
171 | hour = CMOS_READ(RTC_HOURS); | 175 | min = CMOS_READ(RTC_MINUTES); |
172 | day = CMOS_READ(RTC_DAY_OF_MONTH); | 176 | hour = CMOS_READ(RTC_HOURS); |
173 | mon = CMOS_READ(RTC_MONTH); | 177 | day = CMOS_READ(RTC_DAY_OF_MONTH); |
174 | year = CMOS_READ(RTC_YEAR); | 178 | mon = CMOS_READ(RTC_MONTH); |
179 | year = CMOS_READ(RTC_YEAR); | ||
175 | #ifdef CONFIG_ACPI | 180 | #ifdef CONFIG_ACPI |
176 | if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && | 181 | if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && |
177 | acpi_gbl_FADT.century) | 182 | acpi_gbl_FADT.century) |
178 | century = CMOS_READ(acpi_gbl_FADT.century); | 183 | century = CMOS_READ(acpi_gbl_FADT.century); |
179 | #endif | 184 | #endif |
180 | } while (sec != CMOS_READ(RTC_SECONDS)); | ||
181 | |||
182 | spin_unlock_irqrestore(&rtc_lock, flags); | 185 | spin_unlock_irqrestore(&rtc_lock, flags); |
183 | 186 | ||
184 | /* | 187 | /* |
diff --git a/arch/x86/mach-voyager/voyager_cat.c b/arch/x86/mach-voyager/voyager_cat.c index 26a2d4c54b68..2132ca652df1 100644 --- a/arch/x86/mach-voyager/voyager_cat.c +++ b/arch/x86/mach-voyager/voyager_cat.c | |||
@@ -568,7 +568,7 @@ static voyager_module_t *voyager_initial_module; | |||
568 | * boot cpu *after* all memory initialisation has been done (so we can | 568 | * boot cpu *after* all memory initialisation has been done (so we can |
569 | * use kmalloc) but before smp initialisation, so we can probe the SMP | 569 | * use kmalloc) but before smp initialisation, so we can probe the SMP |
570 | * configuration and pick up necessary information. */ | 570 | * configuration and pick up necessary information. */ |
571 | void | 571 | void __init |
572 | voyager_cat_init(void) | 572 | voyager_cat_init(void) |
573 | { | 573 | { |
574 | voyager_module_t **modpp = &voyager_initial_module; | 574 | voyager_module_t **modpp = &voyager_initial_module; |
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c index 69371434b0cf..88124dd35406 100644 --- a/arch/x86/mach-voyager/voyager_smp.c +++ b/arch/x86/mach-voyager/voyager_smp.c | |||
@@ -1900,7 +1900,7 @@ voyager_smp_prepare_cpus(unsigned int max_cpus) | |||
1900 | smp_boot_cpus(); | 1900 | smp_boot_cpus(); |
1901 | } | 1901 | } |
1902 | 1902 | ||
1903 | static void __devinit voyager_smp_prepare_boot_cpu(void) | 1903 | static void __cpuinit voyager_smp_prepare_boot_cpu(void) |
1904 | { | 1904 | { |
1905 | init_gdt(smp_processor_id()); | 1905 | init_gdt(smp_processor_id()); |
1906 | switch_to_new_gdt(); | 1906 | switch_to_new_gdt(); |
@@ -1911,7 +1911,7 @@ static void __devinit voyager_smp_prepare_boot_cpu(void) | |||
1911 | cpu_set(smp_processor_id(), cpu_present_map); | 1911 | cpu_set(smp_processor_id(), cpu_present_map); |
1912 | } | 1912 | } |
1913 | 1913 | ||
1914 | static int __devinit | 1914 | static int __cpuinit |
1915 | voyager_cpu_up(unsigned int cpu) | 1915 | voyager_cpu_up(unsigned int cpu) |
1916 | { | 1916 | { |
1917 | /* This only works at boot for x86. See "rewrite" above. */ | 1917 | /* This only works at boot for x86. See "rewrite" above. */ |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 2d88f7c6d6ac..7e35078673a4 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -77,6 +77,9 @@ count_resource(struct acpi_resource *acpi_res, void *data) | |||
77 | struct acpi_resource_address64 addr; | 77 | struct acpi_resource_address64 addr; |
78 | acpi_status status; | 78 | acpi_status status; |
79 | 79 | ||
80 | if (info->res_num >= PCI_BUS_NUM_RESOURCES) | ||
81 | return AE_OK; | ||
82 | |||
80 | status = resource_to_addr(acpi_res, &addr); | 83 | status = resource_to_addr(acpi_res, &addr); |
81 | if (ACPI_SUCCESS(status)) | 84 | if (ACPI_SUCCESS(status)) |
82 | info->res_num++; | 85 | info->res_num++; |
@@ -93,6 +96,9 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
93 | unsigned long flags; | 96 | unsigned long flags; |
94 | struct resource *root; | 97 | struct resource *root; |
95 | 98 | ||
99 | if (info->res_num >= PCI_BUS_NUM_RESOURCES) | ||
100 | return AE_OK; | ||
101 | |||
96 | status = resource_to_addr(acpi_res, &addr); | 102 | status = resource_to_addr(acpi_res, &addr); |
97 | if (!ACPI_SUCCESS(status)) | 103 | if (!ACPI_SUCCESS(status)) |
98 | return AE_OK; | 104 | return AE_OK; |
diff --git a/arch/x86/vdso/vgetcpu.c b/arch/x86/vdso/vgetcpu.c index 91f6e85d0fc2..3b1ae1abfba9 100644 --- a/arch/x86/vdso/vgetcpu.c +++ b/arch/x86/vdso/vgetcpu.c | |||
@@ -13,32 +13,17 @@ | |||
13 | #include <asm/vgtod.h> | 13 | #include <asm/vgtod.h> |
14 | #include "vextern.h" | 14 | #include "vextern.h" |
15 | 15 | ||
16 | long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache) | 16 | long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused) |
17 | { | 17 | { |
18 | unsigned int dummy, p; | 18 | unsigned int dummy, p; |
19 | unsigned long j = 0; | ||
20 | 19 | ||
21 | /* Fast cache - only recompute value once per jiffies and avoid | 20 | if (*vdso_vgetcpu_mode == VGETCPU_RDTSCP) { |
22 | relatively costly rdtscp/cpuid otherwise. | ||
23 | This works because the scheduler usually keeps the process | ||
24 | on the same CPU and this syscall doesn't guarantee its | ||
25 | results anyways. | ||
26 | We do this here because otherwise user space would do it on | ||
27 | its own in a likely inferior way (no access to jiffies). | ||
28 | If you don't like it pass NULL. */ | ||
29 | if (tcache && tcache->blob[0] == (j = *vdso_jiffies)) { | ||
30 | p = tcache->blob[1]; | ||
31 | } else if (*vdso_vgetcpu_mode == VGETCPU_RDTSCP) { | ||
32 | /* Load per CPU data from RDTSCP */ | 21 | /* Load per CPU data from RDTSCP */ |
33 | rdtscp(dummy, dummy, p); | 22 | rdtscp(dummy, dummy, p); |
34 | } else { | 23 | } else { |
35 | /* Load per CPU data from GDT */ | 24 | /* Load per CPU data from GDT */ |
36 | asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG)); | 25 | asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG)); |
37 | } | 26 | } |
38 | if (tcache) { | ||
39 | tcache->blob[0] = j; | ||
40 | tcache->blob[1] = p; | ||
41 | } | ||
42 | if (cpu) | 27 | if (cpu) |
43 | *cpu = p & 0xfff; | 28 | *cpu = p & 0xfff; |
44 | if (node) | 29 | if (node) |
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index d33aba6864c2..3b64a99772ea 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -394,6 +394,11 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) | |||
394 | he_dev->atm_dev->dev_data = he_dev; | 394 | he_dev->atm_dev->dev_data = he_dev; |
395 | atm_dev->dev_data = he_dev; | 395 | atm_dev->dev_data = he_dev; |
396 | he_dev->number = atm_dev->number; | 396 | he_dev->number = atm_dev->number; |
397 | #ifdef USE_TASKLET | ||
398 | tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev); | ||
399 | #endif | ||
400 | spin_lock_init(&he_dev->global_lock); | ||
401 | |||
397 | if (he_start(atm_dev)) { | 402 | if (he_start(atm_dev)) { |
398 | he_stop(he_dev); | 403 | he_stop(he_dev); |
399 | err = -ENODEV; | 404 | err = -ENODEV; |
@@ -1173,11 +1178,6 @@ he_start(struct atm_dev *dev) | |||
1173 | if ((err = he_init_irq(he_dev)) != 0) | 1178 | if ((err = he_init_irq(he_dev)) != 0) |
1174 | return err; | 1179 | return err; |
1175 | 1180 | ||
1176 | #ifdef USE_TASKLET | ||
1177 | tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev); | ||
1178 | #endif | ||
1179 | spin_lock_init(&he_dev->global_lock); | ||
1180 | |||
1181 | /* 4.11 enable pci bus controller state machines */ | 1181 | /* 4.11 enable pci bus controller state machines */ |
1182 | host_cntl |= (OUTFF_ENB | CMDFF_ENB | | 1182 | host_cntl |= (OUTFF_ENB | CMDFF_ENB | |
1183 | QUICK_RD_RETRY | QUICK_WR_RETRY | PERR_INT_ENB); | 1183 | QUICK_RD_RETRY | QUICK_WR_RETRY | PERR_INT_ENB); |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index f6fedcc32de1..68872142530b 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2281,14 +2281,12 @@ static void gem_reset_task(struct work_struct *work) | |||
2281 | 2281 | ||
2282 | mutex_lock(&gp->pm_mutex); | 2282 | mutex_lock(&gp->pm_mutex); |
2283 | 2283 | ||
2284 | napi_disable(&gp->napi); | 2284 | if (gp->opened) |
2285 | napi_disable(&gp->napi); | ||
2285 | 2286 | ||
2286 | spin_lock_irq(&gp->lock); | 2287 | spin_lock_irq(&gp->lock); |
2287 | spin_lock(&gp->tx_lock); | 2288 | spin_lock(&gp->tx_lock); |
2288 | 2289 | ||
2289 | if (gp->running == 0) | ||
2290 | goto not_running; | ||
2291 | |||
2292 | if (gp->running) { | 2290 | if (gp->running) { |
2293 | netif_stop_queue(gp->dev); | 2291 | netif_stop_queue(gp->dev); |
2294 | 2292 | ||
@@ -2298,13 +2296,14 @@ static void gem_reset_task(struct work_struct *work) | |||
2298 | gem_set_link_modes(gp); | 2296 | gem_set_link_modes(gp); |
2299 | netif_wake_queue(gp->dev); | 2297 | netif_wake_queue(gp->dev); |
2300 | } | 2298 | } |
2301 | not_running: | 2299 | |
2302 | gp->reset_task_pending = 0; | 2300 | gp->reset_task_pending = 0; |
2303 | 2301 | ||
2304 | spin_unlock(&gp->tx_lock); | 2302 | spin_unlock(&gp->tx_lock); |
2305 | spin_unlock_irq(&gp->lock); | 2303 | spin_unlock_irq(&gp->lock); |
2306 | 2304 | ||
2307 | napi_enable(&gp->napi); | 2305 | if (gp->opened) |
2306 | napi_enable(&gp->napi); | ||
2308 | 2307 | ||
2309 | mutex_unlock(&gp->pm_mutex); | 2308 | mutex_unlock(&gp->pm_mutex); |
2310 | } | 2309 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 277a020b35e9..50775f9234cc 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1032,7 +1032,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | static int rt2500usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, | 1034 | static int rt2500usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, |
1035 | int maxpacket, struct sk_buff *skb) | 1035 | struct sk_buff *skb) |
1036 | { | 1036 | { |
1037 | int length; | 1037 | int length; |
1038 | 1038 | ||
@@ -1041,7 +1041,7 @@ static int rt2500usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, | |||
1041 | * but it must _not_ be a multiple of the USB packet size. | 1041 | * but it must _not_ be a multiple of the USB packet size. |
1042 | */ | 1042 | */ |
1043 | length = roundup(skb->len, 2); | 1043 | length = roundup(skb->len, 2); |
1044 | length += (2 * !(length % maxpacket)); | 1044 | length += (2 * !(length % rt2x00dev->usb_maxpacket)); |
1045 | 1045 | ||
1046 | return length; | 1046 | return length; |
1047 | } | 1047 | } |
@@ -1643,7 +1643,6 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, | |||
1643 | struct data_entry *beacon; | 1643 | struct data_entry *beacon; |
1644 | struct data_entry *guardian; | 1644 | struct data_entry *guardian; |
1645 | int pipe = usb_sndbulkpipe(usb_dev, 1); | 1645 | int pipe = usb_sndbulkpipe(usb_dev, 1); |
1646 | int max_packet = usb_maxpacket(usb_dev, pipe, 1); | ||
1647 | int length; | 1646 | int length; |
1648 | 1647 | ||
1649 | /* | 1648 | /* |
@@ -1672,7 +1671,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, | |||
1672 | ring->desc_size), | 1671 | ring->desc_size), |
1673 | skb->len - ring->desc_size, control); | 1672 | skb->len - ring->desc_size, control); |
1674 | 1673 | ||
1675 | length = rt2500usb_get_tx_data_len(rt2x00dev, max_packet, skb); | 1674 | length = rt2500usb_get_tx_data_len(rt2x00dev, skb); |
1676 | 1675 | ||
1677 | usb_fill_bulk_urb(beacon->priv, usb_dev, pipe, | 1676 | usb_fill_bulk_urb(beacon->priv, usb_dev, pipe, |
1678 | skb->data, length, rt2500usb_beacondone, beacon); | 1677 | skb->data, length, rt2500usb_beacondone, beacon); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index d1ad5251a77a..c8f16f161c28 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -418,7 +418,7 @@ struct rt2x00lib_ops { | |||
418 | int (*write_tx_data) (struct rt2x00_dev *rt2x00dev, | 418 | int (*write_tx_data) (struct rt2x00_dev *rt2x00dev, |
419 | struct data_ring *ring, struct sk_buff *skb, | 419 | struct data_ring *ring, struct sk_buff *skb, |
420 | struct ieee80211_tx_control *control); | 420 | struct ieee80211_tx_control *control); |
421 | int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, int maxpacket, | 421 | int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, |
422 | struct sk_buff *skb); | 422 | struct sk_buff *skb); |
423 | void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, | 423 | void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, |
424 | unsigned int queue); | 424 | unsigned int queue); |
@@ -599,6 +599,11 @@ struct rt2x00_dev { | |||
599 | u32 *rf; | 599 | u32 *rf; |
600 | 600 | ||
601 | /* | 601 | /* |
602 | * USB Max frame size (for rt2500usb & rt73usb). | ||
603 | */ | ||
604 | u16 usb_maxpacket; | ||
605 | |||
606 | /* | ||
602 | * Current TX power value. | 607 | * Current TX power value. |
603 | */ | 608 | */ |
604 | u16 tx_power; | 609 | u16 tx_power; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 73cc726c4046..1f5675dd329f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -159,7 +159,6 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, | |||
159 | interface_to_usbdev(rt2x00dev_usb(rt2x00dev)); | 159 | interface_to_usbdev(rt2x00dev_usb(rt2x00dev)); |
160 | struct data_entry *entry = rt2x00_get_data_entry(ring); | 160 | struct data_entry *entry = rt2x00_get_data_entry(ring); |
161 | int pipe = usb_sndbulkpipe(usb_dev, 1); | 161 | int pipe = usb_sndbulkpipe(usb_dev, 1); |
162 | int max_packet = usb_maxpacket(usb_dev, pipe, 1); | ||
163 | u32 length; | 162 | u32 length; |
164 | 163 | ||
165 | if (rt2x00_ring_full(ring)) { | 164 | if (rt2x00_ring_full(ring)) { |
@@ -194,8 +193,7 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, | |||
194 | * length of the data to usb_fill_bulk_urb. Pass the skb | 193 | * length of the data to usb_fill_bulk_urb. Pass the skb |
195 | * to the driver to determine what the length should be. | 194 | * to the driver to determine what the length should be. |
196 | */ | 195 | */ |
197 | length = rt2x00dev->ops->lib->get_tx_data_len(rt2x00dev, | 196 | length = rt2x00dev->ops->lib->get_tx_data_len(rt2x00dev, skb); |
198 | max_packet, skb); | ||
199 | 197 | ||
200 | /* | 198 | /* |
201 | * Initialize URB and send the frame to the device. | 199 | * Initialize URB and send the frame to the device. |
@@ -490,6 +488,11 @@ int rt2x00usb_probe(struct usb_interface *usb_intf, | |||
490 | rt2x00dev->ops = ops; | 488 | rt2x00dev->ops = ops; |
491 | rt2x00dev->hw = hw; | 489 | rt2x00dev->hw = hw; |
492 | 490 | ||
491 | rt2x00dev->usb_maxpacket = | ||
492 | usb_maxpacket(usb_dev, usb_sndbulkpipe(usb_dev, 1), 1); | ||
493 | if (!rt2x00dev->usb_maxpacket) | ||
494 | rt2x00dev->usb_maxpacket = 1; | ||
495 | |||
493 | retval = rt2x00usb_alloc_reg(rt2x00dev); | 496 | retval = rt2x00usb_alloc_reg(rt2x00dev); |
494 | if (retval) | 497 | if (retval) |
495 | goto exit_free_device; | 498 | goto exit_free_device; |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index dc640bf6b5eb..c0671c2e6e73 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1251,7 +1251,7 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | static int rt73usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, | 1253 | static int rt73usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, |
1254 | int maxpacket, struct sk_buff *skb) | 1254 | struct sk_buff *skb) |
1255 | { | 1255 | { |
1256 | int length; | 1256 | int length; |
1257 | 1257 | ||
@@ -1260,7 +1260,7 @@ static int rt73usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, | |||
1260 | * but it must _not_ be a multiple of the USB packet size. | 1260 | * but it must _not_ be a multiple of the USB packet size. |
1261 | */ | 1261 | */ |
1262 | length = roundup(skb->len, 4); | 1262 | length = roundup(skb->len, 4); |
1263 | length += (4 * !(length % maxpacket)); | 1263 | length += (4 * !(length % rt2x00dev->usb_maxpacket)); |
1264 | 1264 | ||
1265 | return length; | 1265 | return length; |
1266 | } | 1266 | } |
diff --git a/include/asm-x86/mach-default/mach_reboot.h b/include/asm-x86/mach-default/mach_reboot.h index e23fd9fbebb3..6adee6a97dec 100644 --- a/include/asm-x86/mach-default/mach_reboot.h +++ b/include/asm-x86/mach-default/mach_reboot.h | |||
@@ -49,7 +49,7 @@ static inline void mach_reboot(void) | |||
49 | udelay(50); | 49 | udelay(50); |
50 | kb_wait(); | 50 | kb_wait(); |
51 | udelay(50); | 51 | udelay(50); |
52 | outb(cmd | 0x04, 0x60); /* set "System flag" */ | 52 | outb(cmd | 0x14, 0x60); /* set "System flag" and "Keyboard Disabled" */ |
53 | udelay(50); | 53 | udelay(50); |
54 | kb_wait(); | 54 | kb_wait(); |
55 | udelay(50); | 55 | udelay(50); |
diff --git a/include/asm-x86/mach-es7000/mach_mpparse.h b/include/asm-x86/mach-es7000/mach_mpparse.h index 8aa10547b4b1..52ee75cd0fe1 100644 --- a/include/asm-x86/mach-es7000/mach_mpparse.h +++ b/include/asm-x86/mach-es7000/mach_mpparse.h | |||
@@ -29,9 +29,9 @@ extern int mps_oem_check(struct mp_config_table *mpc, char *oem, | |||
29 | static inline int es7000_check_dsdt(void) | 29 | static inline int es7000_check_dsdt(void) |
30 | { | 30 | { |
31 | struct acpi_table_header header; | 31 | struct acpi_table_header header; |
32 | memcpy(&header, 0, sizeof(struct acpi_table_header)); | 32 | |
33 | acpi_get_table_header(ACPI_SIG_DSDT, 0, &header); | 33 | if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) && |
34 | if (!strncmp(header.oem_id, "UNISYS", 6)) | 34 | !strncmp(header.oem_id, "UNISYS", 6)) |
35 | return 1; | 35 | return 1; |
36 | return 0; | 36 | return 0; |
37 | } | 37 | } |
diff --git a/include/asm-x86/mach-voyager/setup_arch.h b/include/asm-x86/mach-voyager/setup_arch.h index 1710ae10eb67..71729ca05cd7 100644 --- a/include/asm-x86/mach-voyager/setup_arch.h +++ b/include/asm-x86/mach-voyager/setup_arch.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #include <asm/voyager.h> | 1 | #include <asm/voyager.h> |
2 | #include <asm/setup_32.h> | 2 | #include <asm/setup.h> |
3 | #define VOYAGER_BIOS_INFO ((struct voyager_bios_info *) \ | 3 | #define VOYAGER_BIOS_INFO ((struct voyager_bios_info *) \ |
4 | (&boot_params.apm_bios_info)) | 4 | (&boot_params.apm_bios_info)) |
5 | 5 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 91140fe8c119..bddd50bd6878 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -356,7 +356,6 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | |||
356 | return __alloc_skb(size, priority, 1, -1); | 356 | return __alloc_skb(size, priority, 1, -1); |
357 | } | 357 | } |
358 | 358 | ||
359 | extern void kfree_skbmem(struct sk_buff *skb); | ||
360 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); | 359 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); |
361 | extern struct sk_buff *skb_clone(struct sk_buff *skb, | 360 | extern struct sk_buff *skb_clone(struct sk_buff *skb, |
362 | gfp_t priority); | 361 | gfp_t priority); |
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h index 2c6c2c2783d8..c2a46c45c8f7 100644 --- a/include/linux/sunrpc/xprtsock.h +++ b/include/linux/sunrpc/xprtsock.h | |||
@@ -9,12 +9,6 @@ | |||
9 | 9 | ||
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | 11 | ||
12 | /* | ||
13 | * Socket transport setup operations | ||
14 | */ | ||
15 | struct rpc_xprt *xs_setup_udp(struct xprt_create *args); | ||
16 | struct rpc_xprt *xs_setup_tcp(struct xprt_create *args); | ||
17 | |||
18 | int init_socket_xprt(void); | 12 | int init_socket_xprt(void); |
19 | void cleanup_socket_xprt(void); | 13 | void cleanup_socket_xprt(void); |
20 | 14 | ||
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 164d13211165..d8ae48439f12 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -115,8 +115,16 @@ extern u32 ieee80211_debug_level; | |||
115 | do { if (ieee80211_debug_level & (level)) \ | 115 | do { if (ieee80211_debug_level & (level)) \ |
116 | printk(KERN_DEBUG "ieee80211: %c %s " fmt, \ | 116 | printk(KERN_DEBUG "ieee80211: %c %s " fmt, \ |
117 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) | 117 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) |
118 | static inline bool ieee80211_ratelimit_debug(u32 level) | ||
119 | { | ||
120 | return (ieee80211_debug_level & level) && net_ratelimit(); | ||
121 | } | ||
118 | #else | 122 | #else |
119 | #define IEEE80211_DEBUG(level, fmt, args...) do {} while (0) | 123 | #define IEEE80211_DEBUG(level, fmt, args...) do {} while (0) |
124 | static inline bool ieee80211_ratelimit_debug(u32 level) | ||
125 | { | ||
126 | return false; | ||
127 | } | ||
120 | #endif /* CONFIG_IEEE80211_DEBUG */ | 128 | #endif /* CONFIG_IEEE80211_DEBUG */ |
121 | 129 | ||
122 | /* escape_essid() is intended to be used in debug (and possibly error) | 130 | /* escape_essid() is intended to be used in debug (and possibly error) |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 469216d93663..37f6cb112127 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -186,9 +186,8 @@ static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo) | |||
186 | if (size > PAGE_SIZE) | 186 | if (size > PAGE_SIZE) |
187 | vfree(hashinfo->ehash_locks); | 187 | vfree(hashinfo->ehash_locks); |
188 | else | 188 | else |
189 | #else | ||
190 | kfree(hashinfo->ehash_locks); | ||
191 | #endif | 189 | #endif |
190 | kfree(hashinfo->ehash_locks); | ||
192 | hashinfo->ehash_locks = NULL; | 191 | hashinfo->ehash_locks = NULL; |
193 | } | 192 | } |
194 | } | 193 | } |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 67ea2c0c0ab7..8a7d59be8a0d 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -328,40 +328,6 @@ extern int ip_vs_get_debug_level(void); | |||
328 | #define FTPDATA __constant_htons(20) | 328 | #define FTPDATA __constant_htons(20) |
329 | 329 | ||
330 | /* | 330 | /* |
331 | * IPVS sysctl variables under the /proc/sys/net/ipv4/vs/ | ||
332 | */ | ||
333 | #define NET_IPV4_VS 21 | ||
334 | |||
335 | enum { | ||
336 | NET_IPV4_VS_DEBUG_LEVEL=1, | ||
337 | NET_IPV4_VS_AMEMTHRESH=2, | ||
338 | NET_IPV4_VS_AMDROPRATE=3, | ||
339 | NET_IPV4_VS_DROP_ENTRY=4, | ||
340 | NET_IPV4_VS_DROP_PACKET=5, | ||
341 | NET_IPV4_VS_SECURE_TCP=6, | ||
342 | NET_IPV4_VS_TO_ES=7, | ||
343 | NET_IPV4_VS_TO_SS=8, | ||
344 | NET_IPV4_VS_TO_SR=9, | ||
345 | NET_IPV4_VS_TO_FW=10, | ||
346 | NET_IPV4_VS_TO_TW=11, | ||
347 | NET_IPV4_VS_TO_CL=12, | ||
348 | NET_IPV4_VS_TO_CW=13, | ||
349 | NET_IPV4_VS_TO_LA=14, | ||
350 | NET_IPV4_VS_TO_LI=15, | ||
351 | NET_IPV4_VS_TO_SA=16, | ||
352 | NET_IPV4_VS_TO_UDP=17, | ||
353 | NET_IPV4_VS_TO_ICMP=18, | ||
354 | NET_IPV4_VS_LBLC_EXPIRE=19, | ||
355 | NET_IPV4_VS_LBLCR_EXPIRE=20, | ||
356 | NET_IPV4_VS_CACHE_BYPASS=22, | ||
357 | NET_IPV4_VS_EXPIRE_NODEST_CONN=23, | ||
358 | NET_IPV4_VS_SYNC_THRESHOLD=24, | ||
359 | NET_IPV4_VS_NAT_ICMP_SEND=25, | ||
360 | NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE=26, | ||
361 | NET_IPV4_VS_LAST | ||
362 | }; | ||
363 | |||
364 | /* | ||
365 | * TCP State Values | 331 | * TCP State Values |
366 | */ | 332 | */ |
367 | enum { | 333 | enum { |
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index f30b537d6952..05f22a6afbcd 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -441,11 +441,14 @@ enum { | |||
441 | SCTP_AUTH_HMAC_ID_RESERVED_0, | 441 | SCTP_AUTH_HMAC_ID_RESERVED_0, |
442 | SCTP_AUTH_HMAC_ID_SHA1, | 442 | SCTP_AUTH_HMAC_ID_SHA1, |
443 | SCTP_AUTH_HMAC_ID_RESERVED_2, | 443 | SCTP_AUTH_HMAC_ID_RESERVED_2, |
444 | SCTP_AUTH_HMAC_ID_SHA256 | 444 | #if defined (CONFIG_CRYPTO_SHA256) || defined (CONFIG_CRYPTO_SHA256_MODULE) |
445 | SCTP_AUTH_HMAC_ID_SHA256, | ||
446 | #endif | ||
447 | __SCTP_AUTH_HMAC_MAX | ||
445 | }; | 448 | }; |
446 | 449 | ||
447 | #define SCTP_AUTH_HMAC_ID_MAX SCTP_AUTH_HMAC_ID_SHA256 | 450 | #define SCTP_AUTH_HMAC_ID_MAX __SCTP_AUTH_HMAC_MAX - 1 |
448 | #define SCTP_AUTH_NUM_HMACS (SCTP_AUTH_HMAC_ID_SHA256 + 1) | 451 | #define SCTP_AUTH_NUM_HMACS __SCTP_AUTH_HMAC_MAX |
449 | #define SCTP_SHA1_SIG_SIZE 20 | 452 | #define SCTP_SHA1_SIG_SIZE 20 |
450 | #define SCTP_SHA256_SIG_SIZE 32 | 453 | #define SCTP_SHA256_SIG_SIZE 32 |
451 | 454 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index 567e468d7492..67e35c7e230c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1236,6 +1236,9 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1236 | { | 1236 | { |
1237 | struct sk_buff *skb; | 1237 | struct sk_buff *skb; |
1238 | 1238 | ||
1239 | /* The TCP header must be at least 32-bit aligned. */ | ||
1240 | size = ALIGN(size, 4); | ||
1241 | |||
1239 | skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp); | 1242 | skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp); |
1240 | if (skb) { | 1243 | if (skb) { |
1241 | skb->truesize += mem; | 1244 | skb->truesize += mem; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index d695cea7730d..cb5b033e0e59 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1288,6 +1288,9 @@ static inline void tcp_insert_write_queue_before(struct sk_buff *new, | |||
1288 | struct sock *sk) | 1288 | struct sock *sk) |
1289 | { | 1289 | { |
1290 | __skb_insert(new, skb->prev, skb, &sk->sk_write_queue); | 1290 | __skb_insert(new, skb->prev, skb, &sk->sk_write_queue); |
1291 | |||
1292 | if (sk->sk_send_head == skb) | ||
1293 | sk->sk_send_head = new; | ||
1291 | } | 1294 | } |
1292 | 1295 | ||
1293 | static inline void tcp_unlink_write_queue(struct sk_buff *skb, struct sock *sk) | 1296 | static inline void tcp_unlink_write_queue(struct sk_buff *skb, struct sock *sk) |
diff --git a/kernel/sys.c b/kernel/sys.c index 304b5410d746..d1fe71eb4546 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1750,7 +1750,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
1750 | } | 1750 | } |
1751 | 1751 | ||
1752 | asmlinkage long sys_getcpu(unsigned __user *cpup, unsigned __user *nodep, | 1752 | asmlinkage long sys_getcpu(unsigned __user *cpup, unsigned __user *nodep, |
1753 | struct getcpu_cache __user *cache) | 1753 | struct getcpu_cache __user *unused) |
1754 | { | 1754 | { |
1755 | int err = 0; | 1755 | int err = 0; |
1756 | int cpu = raw_smp_processor_id(); | 1756 | int cpu = raw_smp_processor_id(); |
@@ -1758,24 +1758,6 @@ asmlinkage long sys_getcpu(unsigned __user *cpup, unsigned __user *nodep, | |||
1758 | err |= put_user(cpu, cpup); | 1758 | err |= put_user(cpu, cpup); |
1759 | if (nodep) | 1759 | if (nodep) |
1760 | err |= put_user(cpu_to_node(cpu), nodep); | 1760 | err |= put_user(cpu_to_node(cpu), nodep); |
1761 | if (cache) { | ||
1762 | /* | ||
1763 | * The cache is not needed for this implementation, | ||
1764 | * but make sure user programs pass something | ||
1765 | * valid. vsyscall implementations can instead make | ||
1766 | * good use of the cache. Only use t0 and t1 because | ||
1767 | * these are available in both 32bit and 64bit ABI (no | ||
1768 | * need for a compat_getcpu). 32bit has enough | ||
1769 | * padding | ||
1770 | */ | ||
1771 | unsigned long t0, t1; | ||
1772 | get_user(t0, &cache->blob[0]); | ||
1773 | get_user(t1, &cache->blob[1]); | ||
1774 | t0++; | ||
1775 | t1++; | ||
1776 | put_user(t0, &cache->blob[0]); | ||
1777 | put_user(t1, &cache->blob[1]); | ||
1778 | } | ||
1779 | return err ? -EFAULT : 0; | 1761 | return err ? -EFAULT : 0; |
1780 | } | 1762 | } |
1781 | 1763 | ||
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index 4abc6d2306f4..fdfca0dd9905 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c | |||
@@ -237,36 +237,6 @@ static struct trans_ctl_table trans_net_ipv4_conf_table[] = { | |||
237 | {} | 237 | {} |
238 | }; | 238 | }; |
239 | 239 | ||
240 | |||
241 | static struct trans_ctl_table trans_net_ipv4_vs_table[] = { | ||
242 | { NET_IPV4_VS_AMEMTHRESH, "amemthresh" }, | ||
243 | { NET_IPV4_VS_DEBUG_LEVEL, "debug_level" }, | ||
244 | { NET_IPV4_VS_AMDROPRATE, "am_droprate" }, | ||
245 | { NET_IPV4_VS_DROP_ENTRY, "drop_entry" }, | ||
246 | { NET_IPV4_VS_DROP_PACKET, "drop_packet" }, | ||
247 | { NET_IPV4_VS_SECURE_TCP, "secure_tcp" }, | ||
248 | { NET_IPV4_VS_TO_ES, "timeout_established" }, | ||
249 | { NET_IPV4_VS_TO_SS, "timeout_synsent" }, | ||
250 | { NET_IPV4_VS_TO_SR, "timeout_synrecv" }, | ||
251 | { NET_IPV4_VS_TO_FW, "timeout_finwait" }, | ||
252 | { NET_IPV4_VS_TO_TW, "timeout_timewait" }, | ||
253 | { NET_IPV4_VS_TO_CL, "timeout_close" }, | ||
254 | { NET_IPV4_VS_TO_CW, "timeout_closewait" }, | ||
255 | { NET_IPV4_VS_TO_LA, "timeout_lastack" }, | ||
256 | { NET_IPV4_VS_TO_LI, "timeout_listen" }, | ||
257 | { NET_IPV4_VS_TO_SA, "timeout_synack" }, | ||
258 | { NET_IPV4_VS_TO_UDP, "timeout_udp" }, | ||
259 | { NET_IPV4_VS_TO_ICMP, "timeout_icmp" }, | ||
260 | { NET_IPV4_VS_CACHE_BYPASS, "cache_bypass" }, | ||
261 | { NET_IPV4_VS_EXPIRE_NODEST_CONN, "expire_nodest_conn" }, | ||
262 | { NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE, "expire_quiescent_template" }, | ||
263 | { NET_IPV4_VS_SYNC_THRESHOLD, "sync_threshold" }, | ||
264 | { NET_IPV4_VS_NAT_ICMP_SEND, "nat_icmp_send" }, | ||
265 | { NET_IPV4_VS_LBLC_EXPIRE, "lblc_expiration" }, | ||
266 | { NET_IPV4_VS_LBLCR_EXPIRE, "lblcr_expiration" }, | ||
267 | {} | ||
268 | }; | ||
269 | |||
270 | static struct trans_ctl_table trans_net_neigh_vars_table[] = { | 240 | static struct trans_ctl_table trans_net_neigh_vars_table[] = { |
271 | { NET_NEIGH_MCAST_SOLICIT, "mcast_solicit" }, | 241 | { NET_NEIGH_MCAST_SOLICIT, "mcast_solicit" }, |
272 | { NET_NEIGH_UCAST_SOLICIT, "ucast_solicit" }, | 242 | { NET_NEIGH_UCAST_SOLICIT, "ucast_solicit" }, |
@@ -341,7 +311,6 @@ static struct trans_ctl_table trans_net_ipv4_table[] = { | |||
341 | { NET_IPV4_ROUTE, "route", trans_net_ipv4_route_table }, | 311 | { NET_IPV4_ROUTE, "route", trans_net_ipv4_route_table }, |
342 | /* NET_IPV4_FIB_HASH unused */ | 312 | /* NET_IPV4_FIB_HASH unused */ |
343 | { NET_IPV4_NETFILTER, "netfilter", trans_net_ipv4_netfilter_table }, | 313 | { NET_IPV4_NETFILTER, "netfilter", trans_net_ipv4_netfilter_table }, |
344 | { NET_IPV4_VS, "vs", trans_net_ipv4_vs_table }, | ||
345 | 314 | ||
346 | { NET_IPV4_TCP_TIMESTAMPS, "tcp_timestamps" }, | 315 | { NET_IPV4_TCP_TIMESTAMPS, "tcp_timestamps" }, |
347 | { NET_IPV4_TCP_WINDOW_SCALING, "tcp_window_scaling" }, | 316 | { NET_IPV4_TCP_WINDOW_SCALING, "tcp_window_scaling" }, |
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index de6a2d6b3ebb..14a2ecf2b318 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -205,7 +205,7 @@ static void sync_cmos_clock(unsigned long dummy) | |||
205 | return; | 205 | return; |
206 | 206 | ||
207 | getnstimeofday(&now); | 207 | getnstimeofday(&now); |
208 | if (abs(xtime.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec / 2) | 208 | if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec / 2) |
209 | fail = update_persistent_clock(now); | 209 | fail = update_persistent_clock(now); |
210 | 210 | ||
211 | next.tv_nsec = (NSEC_PER_SEC / 2) - now.tv_nsec; | 211 | next.tv_nsec = (NSEC_PER_SEC / 2) - now.tv_nsec; |
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 7a36878241da..4f99bb86af5c 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -462,7 +462,8 @@ int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
462 | * OTHER THINGS LIKE FDDI/TokenRing/802.3 SNAPs... | 462 | * OTHER THINGS LIKE FDDI/TokenRing/802.3 SNAPs... |
463 | */ | 463 | */ |
464 | 464 | ||
465 | if (veth->h_vlan_proto != htons(ETH_P_8021Q)) { | 465 | if (veth->h_vlan_proto != htons(ETH_P_8021Q) || |
466 | VLAN_DEV_INFO(dev)->flags & VLAN_FLAG_REORDER_HDR) { | ||
466 | int orig_headroom = skb_headroom(skb); | 467 | int orig_headroom = skb_headroom(skb); |
467 | unsigned short veth_TCI; | 468 | unsigned short veth_TCI; |
468 | 469 | ||
diff --git a/net/bridge/br.c b/net/bridge/br.c index 93867bb6cc97..a90182873120 100644 --- a/net/bridge/br.c +++ b/net/bridge/br.c | |||
@@ -39,7 +39,7 @@ static int __init br_init(void) | |||
39 | 39 | ||
40 | err = br_fdb_init(); | 40 | err = br_fdb_init(); |
41 | if (err) | 41 | if (err) |
42 | goto err_out1; | 42 | goto err_out; |
43 | 43 | ||
44 | err = br_netfilter_init(); | 44 | err = br_netfilter_init(); |
45 | if (err) | 45 | if (err) |
@@ -65,6 +65,8 @@ err_out3: | |||
65 | err_out2: | 65 | err_out2: |
66 | br_netfilter_fini(); | 66 | br_netfilter_fini(); |
67 | err_out1: | 67 | err_out1: |
68 | br_fdb_fini(); | ||
69 | err_out: | ||
68 | llc_sap_put(br_stp_sap); | 70 | llc_sap_put(br_stp_sap); |
69 | return err; | 71 | return err; |
70 | } | 72 | } |
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 3cedd4eeeed6..0ee79a726d91 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c | |||
@@ -122,6 +122,7 @@ static inline int is_link_local(const unsigned char *dest) | |||
122 | struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) | 122 | struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) |
123 | { | 123 | { |
124 | const unsigned char *dest = eth_hdr(skb)->h_dest; | 124 | const unsigned char *dest = eth_hdr(skb)->h_dest; |
125 | int (*rhook)(struct sk_buff *skb); | ||
125 | 126 | ||
126 | if (!is_valid_ether_addr(eth_hdr(skb)->h_source)) | 127 | if (!is_valid_ether_addr(eth_hdr(skb)->h_source)) |
127 | goto drop; | 128 | goto drop; |
@@ -147,9 +148,9 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) | |||
147 | 148 | ||
148 | switch (p->state) { | 149 | switch (p->state) { |
149 | case BR_STATE_FORWARDING: | 150 | case BR_STATE_FORWARDING: |
150 | 151 | rhook = rcu_dereference(br_should_route_hook); | |
151 | if (br_should_route_hook) { | 152 | if (rhook != NULL) { |
152 | if (br_should_route_hook(skb)) | 153 | if (rhook(skb)) |
153 | return skb; | 154 | return skb; |
154 | dest = eth_hdr(skb)->h_dest; | 155 | dest = eth_hdr(skb)->h_dest; |
155 | } | 156 | } |
diff --git a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c index 392d877040d3..6436d30a550e 100644 --- a/net/bridge/netfilter/ebt_among.c +++ b/net/bridge/netfilter/ebt_among.c | |||
@@ -187,7 +187,7 @@ static int ebt_among_check(const char *tablename, unsigned int hookmask, | |||
187 | 187 | ||
188 | if (datalen != EBT_ALIGN(expected_length)) { | 188 | if (datalen != EBT_ALIGN(expected_length)) { |
189 | printk(KERN_WARNING | 189 | printk(KERN_WARNING |
190 | "ebtables: among: wrong size: %d" | 190 | "ebtables: among: wrong size: %d " |
191 | "against expected %d, rounded to %Zd\n", | 191 | "against expected %d, rounded to %Zd\n", |
192 | datalen, expected_length, | 192 | datalen, expected_length, |
193 | EBT_ALIGN(expected_length)); | 193 | EBT_ALIGN(expected_length)); |
diff --git a/net/bridge/netfilter/ebtable_broute.c b/net/bridge/netfilter/ebtable_broute.c index e44519ebf1d2..be6f18681053 100644 --- a/net/bridge/netfilter/ebtable_broute.c +++ b/net/bridge/netfilter/ebtable_broute.c | |||
@@ -70,13 +70,13 @@ static int __init ebtable_broute_init(void) | |||
70 | if (ret < 0) | 70 | if (ret < 0) |
71 | return ret; | 71 | return ret; |
72 | /* see br_input.c */ | 72 | /* see br_input.c */ |
73 | br_should_route_hook = ebt_broute; | 73 | rcu_assign_pointer(br_should_route_hook, ebt_broute); |
74 | return ret; | 74 | return ret; |
75 | } | 75 | } |
76 | 76 | ||
77 | static void __exit ebtable_broute_fini(void) | 77 | static void __exit ebtable_broute_fini(void) |
78 | { | 78 | { |
79 | br_should_route_hook = NULL; | 79 | rcu_assign_pointer(br_should_route_hook, NULL); |
80 | synchronize_net(); | 80 | synchronize_net(); |
81 | ebt_unregister_table(&broute_table); | 81 | ebt_unregister_table(&broute_table); |
82 | } | 82 | } |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index de33f36947e9..285ec3ed9b37 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -2463,8 +2463,6 @@ static int pktgen_output_ipsec(struct sk_buff *skb, struct pktgen_dev *pkt_dev) | |||
2463 | 2463 | ||
2464 | x->curlft.bytes +=skb->len; | 2464 | x->curlft.bytes +=skb->len; |
2465 | x->curlft.packets++; | 2465 | x->curlft.packets++; |
2466 | spin_unlock(&x->lock); | ||
2467 | |||
2468 | error: | 2466 | error: |
2469 | spin_unlock(&x->lock); | 2467 | spin_unlock(&x->lock); |
2470 | return err; | 2468 | return err; |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 32d5826b7177..5b4ce9b4dd20 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -275,12 +275,11 @@ static void skb_release_data(struct sk_buff *skb) | |||
275 | /* | 275 | /* |
276 | * Free an skbuff by memory without cleaning the state. | 276 | * Free an skbuff by memory without cleaning the state. |
277 | */ | 277 | */ |
278 | void kfree_skbmem(struct sk_buff *skb) | 278 | static void kfree_skbmem(struct sk_buff *skb) |
279 | { | 279 | { |
280 | struct sk_buff *other; | 280 | struct sk_buff *other; |
281 | atomic_t *fclone_ref; | 281 | atomic_t *fclone_ref; |
282 | 282 | ||
283 | skb_release_data(skb); | ||
284 | switch (skb->fclone) { | 283 | switch (skb->fclone) { |
285 | case SKB_FCLONE_UNAVAILABLE: | 284 | case SKB_FCLONE_UNAVAILABLE: |
286 | kmem_cache_free(skbuff_head_cache, skb); | 285 | kmem_cache_free(skbuff_head_cache, skb); |
@@ -307,16 +306,8 @@ void kfree_skbmem(struct sk_buff *skb) | |||
307 | } | 306 | } |
308 | } | 307 | } |
309 | 308 | ||
310 | /** | 309 | /* Free everything but the sk_buff shell. */ |
311 | * __kfree_skb - private function | 310 | static void skb_release_all(struct sk_buff *skb) |
312 | * @skb: buffer | ||
313 | * | ||
314 | * Free an sk_buff. Release anything attached to the buffer. | ||
315 | * Clean the state. This is an internal helper function. Users should | ||
316 | * always call kfree_skb | ||
317 | */ | ||
318 | |||
319 | void __kfree_skb(struct sk_buff *skb) | ||
320 | { | 311 | { |
321 | dst_release(skb->dst); | 312 | dst_release(skb->dst); |
322 | #ifdef CONFIG_XFRM | 313 | #ifdef CONFIG_XFRM |
@@ -340,7 +331,21 @@ void __kfree_skb(struct sk_buff *skb) | |||
340 | skb->tc_verd = 0; | 331 | skb->tc_verd = 0; |
341 | #endif | 332 | #endif |
342 | #endif | 333 | #endif |
334 | skb_release_data(skb); | ||
335 | } | ||
336 | |||
337 | /** | ||
338 | * __kfree_skb - private function | ||
339 | * @skb: buffer | ||
340 | * | ||
341 | * Free an sk_buff. Release anything attached to the buffer. | ||
342 | * Clean the state. This is an internal helper function. Users should | ||
343 | * always call kfree_skb | ||
344 | */ | ||
343 | 345 | ||
346 | void __kfree_skb(struct sk_buff *skb) | ||
347 | { | ||
348 | skb_release_all(skb); | ||
344 | kfree_skbmem(skb); | 349 | kfree_skbmem(skb); |
345 | } | 350 | } |
346 | 351 | ||
@@ -441,7 +446,7 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb) | |||
441 | */ | 446 | */ |
442 | struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src) | 447 | struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src) |
443 | { | 448 | { |
444 | skb_release_data(dst); | 449 | skb_release_all(dst); |
445 | return __skb_clone(dst, src); | 450 | return __skb_clone(dst, src); |
446 | } | 451 | } |
447 | EXPORT_SYMBOL_GPL(skb_morph); | 452 | EXPORT_SYMBOL_GPL(skb_morph); |
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c index 40ad428a27f5..d26b88dbbb45 100644 --- a/net/dccp/ccids/lib/loss_interval.c +++ b/net/dccp/ccids/lib/loss_interval.c | |||
@@ -166,7 +166,7 @@ static u32 dccp_li_calc_first_li(struct sock *sk, | |||
166 | } | 166 | } |
167 | 167 | ||
168 | if (unlikely(interval == 0)) { | 168 | if (unlikely(interval == 0)) { |
169 | DCCP_WARN("%s(%p), Could not find a win_count interval > 0." | 169 | DCCP_WARN("%s(%p), Could not find a win_count interval > 0. " |
170 | "Defaulting to 1\n", dccp_role(sk), sk); | 170 | "Defaulting to 1\n", dccp_role(sk), sk); |
171 | interval = 1; | 171 | interval = 1; |
172 | } | 172 | } |
diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c index c6d760d9fbbe..208bf35b5546 100644 --- a/net/ieee80211/ieee80211_crypt_ccmp.c +++ b/net/ieee80211/ieee80211_crypt_ccmp.c | |||
@@ -338,7 +338,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
338 | pos += 8; | 338 | pos += 8; |
339 | 339 | ||
340 | if (ccmp_replay_check(pn, key->rx_pn)) { | 340 | if (ccmp_replay_check(pn, key->rx_pn)) { |
341 | if (net_ratelimit()) { | 341 | if (ieee80211_ratelimit_debug(IEEE80211_DL_DROP)) { |
342 | IEEE80211_DEBUG_DROP("CCMP: replay detected: STA=%s " | 342 | IEEE80211_DEBUG_DROP("CCMP: replay detected: STA=%s " |
343 | "previous PN %02x%02x%02x%02x%02x%02x " | 343 | "previous PN %02x%02x%02x%02x%02x%02x " |
344 | "received PN %02x%02x%02x%02x%02x%02x\n", | 344 | "received PN %02x%02x%02x%02x%02x%02x\n", |
diff --git a/net/ieee80211/ieee80211_crypt_tkip.c b/net/ieee80211/ieee80211_crypt_tkip.c index 58b22619ab15..8e146949fc6f 100644 --- a/net/ieee80211/ieee80211_crypt_tkip.c +++ b/net/ieee80211/ieee80211_crypt_tkip.c | |||
@@ -464,7 +464,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
464 | pos += 8; | 464 | pos += 8; |
465 | 465 | ||
466 | if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) { | 466 | if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) { |
467 | if (net_ratelimit()) { | 467 | if (ieee80211_ratelimit_debug(IEEE80211_DL_DROP)) { |
468 | IEEE80211_DEBUG_DROP("TKIP: replay detected: STA=%s" | 468 | IEEE80211_DEBUG_DROP("TKIP: replay detected: STA=%s" |
469 | " previous TSC %08x%04x received TSC " | 469 | " previous TSC %08x%04x received TSC " |
470 | "%08x%04x\n", print_mac(mac, hdr->addr2), | 470 | "%08x%04x\n", print_mac(mac, hdr->addr2), |
@@ -504,7 +504,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
504 | * it needs to be recalculated for the next packet. */ | 504 | * it needs to be recalculated for the next packet. */ |
505 | tkey->rx_phase1_done = 0; | 505 | tkey->rx_phase1_done = 0; |
506 | } | 506 | } |
507 | if (net_ratelimit()) { | 507 | if (ieee80211_ratelimit_debug(IEEE80211_DL_DROP)) { |
508 | IEEE80211_DEBUG_DROP("TKIP: ICV error detected: STA=" | 508 | IEEE80211_DEBUG_DROP("TKIP: ICV error detected: STA=" |
509 | "%s\n", print_mac(mac, hdr->addr2)); | 509 | "%s\n", print_mac(mac, hdr->addr2)); |
510 | } | 510 | } |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 36d6798947b5..b3f366a33a5c 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -111,12 +111,8 @@ | |||
111 | #include <net/tcp.h> | 111 | #include <net/tcp.h> |
112 | #include <net/sock.h> | 112 | #include <net/sock.h> |
113 | #include <net/arp.h> | 113 | #include <net/arp.h> |
114 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | ||
115 | #include <net/ax25.h> | 114 | #include <net/ax25.h> |
116 | #if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) | ||
117 | #include <net/netrom.h> | 115 | #include <net/netrom.h> |
118 | #endif | ||
119 | #endif | ||
120 | #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE) | 116 | #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE) |
121 | #include <net/atmclip.h> | 117 | #include <net/atmclip.h> |
122 | struct neigh_table *clip_tbl_hook; | 118 | struct neigh_table *clip_tbl_hook; |
@@ -731,20 +727,10 @@ static int arp_process(struct sk_buff *skb) | |||
731 | htons(dev_type) != arp->ar_hrd) | 727 | htons(dev_type) != arp->ar_hrd) |
732 | goto out; | 728 | goto out; |
733 | break; | 729 | break; |
734 | #ifdef CONFIG_NET_ETHERNET | ||
735 | case ARPHRD_ETHER: | 730 | case ARPHRD_ETHER: |
736 | #endif | ||
737 | #ifdef CONFIG_TR | ||
738 | case ARPHRD_IEEE802_TR: | 731 | case ARPHRD_IEEE802_TR: |
739 | #endif | ||
740 | #ifdef CONFIG_FDDI | ||
741 | case ARPHRD_FDDI: | 732 | case ARPHRD_FDDI: |
742 | #endif | ||
743 | #ifdef CONFIG_NET_FC | ||
744 | case ARPHRD_IEEE802: | 733 | case ARPHRD_IEEE802: |
745 | #endif | ||
746 | #if defined(CONFIG_NET_ETHERNET) || defined(CONFIG_TR) || \ | ||
747 | defined(CONFIG_FDDI) || defined(CONFIG_NET_FC) | ||
748 | /* | 734 | /* |
749 | * ETHERNET, Token Ring and Fibre Channel (which are IEEE 802 | 735 | * ETHERNET, Token Ring and Fibre Channel (which are IEEE 802 |
750 | * devices, according to RFC 2625) devices will accept ARP | 736 | * devices, according to RFC 2625) devices will accept ARP |
@@ -759,21 +745,16 @@ static int arp_process(struct sk_buff *skb) | |||
759 | arp->ar_pro != htons(ETH_P_IP)) | 745 | arp->ar_pro != htons(ETH_P_IP)) |
760 | goto out; | 746 | goto out; |
761 | break; | 747 | break; |
762 | #endif | ||
763 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | ||
764 | case ARPHRD_AX25: | 748 | case ARPHRD_AX25: |
765 | if (arp->ar_pro != htons(AX25_P_IP) || | 749 | if (arp->ar_pro != htons(AX25_P_IP) || |
766 | arp->ar_hrd != htons(ARPHRD_AX25)) | 750 | arp->ar_hrd != htons(ARPHRD_AX25)) |
767 | goto out; | 751 | goto out; |
768 | break; | 752 | break; |
769 | #if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) | ||
770 | case ARPHRD_NETROM: | 753 | case ARPHRD_NETROM: |
771 | if (arp->ar_pro != htons(AX25_P_IP) || | 754 | if (arp->ar_pro != htons(AX25_P_IP) || |
772 | arp->ar_hrd != htons(ARPHRD_NETROM)) | 755 | arp->ar_hrd != htons(ARPHRD_NETROM)) |
773 | goto out; | 756 | goto out; |
774 | break; | 757 | break; |
775 | #endif | ||
776 | #endif | ||
777 | } | 758 | } |
778 | 759 | ||
779 | /* Understand only these message types */ | 760 | /* Understand only these message types */ |
@@ -828,7 +809,8 @@ static int arp_process(struct sk_buff *skb) | |||
828 | if (arp->ar_op == htons(ARPOP_REQUEST) && | 809 | if (arp->ar_op == htons(ARPOP_REQUEST) && |
829 | inet_addr_type(tip) == RTN_LOCAL && | 810 | inet_addr_type(tip) == RTN_LOCAL && |
830 | !arp_ignore(in_dev,dev,sip,tip)) | 811 | !arp_ignore(in_dev,dev,sip,tip)) |
831 | arp_send(ARPOP_REPLY,ETH_P_ARP,tip,dev,tip,sha,dev->dev_addr,dev->dev_addr); | 812 | arp_send(ARPOP_REPLY, ETH_P_ARP, sip, dev, tip, sha, |
813 | dev->dev_addr, sha); | ||
832 | goto out; | 814 | goto out; |
833 | } | 815 | } |
834 | 816 | ||
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index b0170732b5e9..6b3fffb554b6 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -853,8 +853,6 @@ static void inet_diag_rcv(struct sk_buff *skb) | |||
853 | mutex_unlock(&inet_diag_mutex); | 853 | mutex_unlock(&inet_diag_mutex); |
854 | } | 854 | } |
855 | 855 | ||
856 | static DEFINE_SPINLOCK(inet_diag_register_lock); | ||
857 | |||
858 | int inet_diag_register(const struct inet_diag_handler *h) | 856 | int inet_diag_register(const struct inet_diag_handler *h) |
859 | { | 857 | { |
860 | const __u16 type = h->idiag_type; | 858 | const __u16 type = h->idiag_type; |
@@ -863,13 +861,13 @@ int inet_diag_register(const struct inet_diag_handler *h) | |||
863 | if (type >= INET_DIAG_GETSOCK_MAX) | 861 | if (type >= INET_DIAG_GETSOCK_MAX) |
864 | goto out; | 862 | goto out; |
865 | 863 | ||
866 | spin_lock(&inet_diag_register_lock); | 864 | mutex_lock(&inet_diag_mutex); |
867 | err = -EEXIST; | 865 | err = -EEXIST; |
868 | if (inet_diag_table[type] == NULL) { | 866 | if (inet_diag_table[type] == NULL) { |
869 | inet_diag_table[type] = h; | 867 | inet_diag_table[type] = h; |
870 | err = 0; | 868 | err = 0; |
871 | } | 869 | } |
872 | spin_unlock(&inet_diag_register_lock); | 870 | mutex_unlock(&inet_diag_mutex); |
873 | out: | 871 | out: |
874 | return err; | 872 | return err; |
875 | } | 873 | } |
@@ -882,11 +880,9 @@ void inet_diag_unregister(const struct inet_diag_handler *h) | |||
882 | if (type >= INET_DIAG_GETSOCK_MAX) | 880 | if (type >= INET_DIAG_GETSOCK_MAX) |
883 | return; | 881 | return; |
884 | 882 | ||
885 | spin_lock(&inet_diag_register_lock); | 883 | mutex_lock(&inet_diag_mutex); |
886 | inet_diag_table[type] = NULL; | 884 | inet_diag_table[type] = NULL; |
887 | spin_unlock(&inet_diag_register_lock); | 885 | mutex_unlock(&inet_diag_mutex); |
888 | |||
889 | synchronize_rcu(); | ||
890 | } | 886 | } |
891 | EXPORT_SYMBOL_GPL(inet_diag_unregister); | 887 | EXPORT_SYMBOL_GPL(inet_diag_unregister); |
892 | 888 | ||
@@ -901,7 +897,7 @@ static int __init inet_diag_init(void) | |||
901 | goto out; | 897 | goto out; |
902 | 898 | ||
903 | idiagnl = netlink_kernel_create(&init_net, NETLINK_INET_DIAG, 0, | 899 | idiagnl = netlink_kernel_create(&init_net, NETLINK_INET_DIAG, 0, |
904 | inet_diag_rcv, NULL, THIS_MODULE); | 900 | inet_diag_rcv, &inet_diag_mutex, THIS_MODULE); |
905 | if (idiagnl == NULL) | 901 | if (idiagnl == NULL) |
906 | goto out_free_table; | 902 | goto out_free_table; |
907 | err = 0; | 903 | err = 0; |
diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c index 20c884a57721..8fba20256f52 100644 --- a/net/ipv4/ipvs/ip_vs_core.c +++ b/net/ipv4/ipvs/ip_vs_core.c | |||
@@ -637,7 +637,7 @@ static int ip_vs_out_icmp(struct sk_buff *skb, int *related) | |||
637 | verdict = NF_DROP; | 637 | verdict = NF_DROP; |
638 | 638 | ||
639 | if (IP_VS_FWD_METHOD(cp) != 0) { | 639 | if (IP_VS_FWD_METHOD(cp) != 0) { |
640 | IP_VS_ERR("shouldn't reach here, because the box is on the" | 640 | IP_VS_ERR("shouldn't reach here, because the box is on the " |
641 | "half connection in the tun/dr module.\n"); | 641 | "half connection in the tun/dr module.\n"); |
642 | } | 642 | } |
643 | 643 | ||
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index b64cf45a9ead..693d92490c11 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c | |||
@@ -1424,7 +1424,6 @@ proc_do_sync_threshold(ctl_table *table, int write, struct file *filp, | |||
1424 | 1424 | ||
1425 | static struct ctl_table vs_vars[] = { | 1425 | static struct ctl_table vs_vars[] = { |
1426 | { | 1426 | { |
1427 | .ctl_name = NET_IPV4_VS_AMEMTHRESH, | ||
1428 | .procname = "amemthresh", | 1427 | .procname = "amemthresh", |
1429 | .data = &sysctl_ip_vs_amemthresh, | 1428 | .data = &sysctl_ip_vs_amemthresh, |
1430 | .maxlen = sizeof(int), | 1429 | .maxlen = sizeof(int), |
@@ -1433,7 +1432,6 @@ static struct ctl_table vs_vars[] = { | |||
1433 | }, | 1432 | }, |
1434 | #ifdef CONFIG_IP_VS_DEBUG | 1433 | #ifdef CONFIG_IP_VS_DEBUG |
1435 | { | 1434 | { |
1436 | .ctl_name = NET_IPV4_VS_DEBUG_LEVEL, | ||
1437 | .procname = "debug_level", | 1435 | .procname = "debug_level", |
1438 | .data = &sysctl_ip_vs_debug_level, | 1436 | .data = &sysctl_ip_vs_debug_level, |
1439 | .maxlen = sizeof(int), | 1437 | .maxlen = sizeof(int), |
@@ -1442,7 +1440,6 @@ static struct ctl_table vs_vars[] = { | |||
1442 | }, | 1440 | }, |
1443 | #endif | 1441 | #endif |
1444 | { | 1442 | { |
1445 | .ctl_name = NET_IPV4_VS_AMDROPRATE, | ||
1446 | .procname = "am_droprate", | 1443 | .procname = "am_droprate", |
1447 | .data = &sysctl_ip_vs_am_droprate, | 1444 | .data = &sysctl_ip_vs_am_droprate, |
1448 | .maxlen = sizeof(int), | 1445 | .maxlen = sizeof(int), |
@@ -1450,7 +1447,6 @@ static struct ctl_table vs_vars[] = { | |||
1450 | .proc_handler = &proc_dointvec, | 1447 | .proc_handler = &proc_dointvec, |
1451 | }, | 1448 | }, |
1452 | { | 1449 | { |
1453 | .ctl_name = NET_IPV4_VS_DROP_ENTRY, | ||
1454 | .procname = "drop_entry", | 1450 | .procname = "drop_entry", |
1455 | .data = &sysctl_ip_vs_drop_entry, | 1451 | .data = &sysctl_ip_vs_drop_entry, |
1456 | .maxlen = sizeof(int), | 1452 | .maxlen = sizeof(int), |
@@ -1458,7 +1454,6 @@ static struct ctl_table vs_vars[] = { | |||
1458 | .proc_handler = &proc_do_defense_mode, | 1454 | .proc_handler = &proc_do_defense_mode, |
1459 | }, | 1455 | }, |
1460 | { | 1456 | { |
1461 | .ctl_name = NET_IPV4_VS_DROP_PACKET, | ||
1462 | .procname = "drop_packet", | 1457 | .procname = "drop_packet", |
1463 | .data = &sysctl_ip_vs_drop_packet, | 1458 | .data = &sysctl_ip_vs_drop_packet, |
1464 | .maxlen = sizeof(int), | 1459 | .maxlen = sizeof(int), |
@@ -1466,7 +1461,6 @@ static struct ctl_table vs_vars[] = { | |||
1466 | .proc_handler = &proc_do_defense_mode, | 1461 | .proc_handler = &proc_do_defense_mode, |
1467 | }, | 1462 | }, |
1468 | { | 1463 | { |
1469 | .ctl_name = NET_IPV4_VS_SECURE_TCP, | ||
1470 | .procname = "secure_tcp", | 1464 | .procname = "secure_tcp", |
1471 | .data = &sysctl_ip_vs_secure_tcp, | 1465 | .data = &sysctl_ip_vs_secure_tcp, |
1472 | .maxlen = sizeof(int), | 1466 | .maxlen = sizeof(int), |
@@ -1475,7 +1469,6 @@ static struct ctl_table vs_vars[] = { | |||
1475 | }, | 1469 | }, |
1476 | #if 0 | 1470 | #if 0 |
1477 | { | 1471 | { |
1478 | .ctl_name = NET_IPV4_VS_TO_ES, | ||
1479 | .procname = "timeout_established", | 1472 | .procname = "timeout_established", |
1480 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_ESTABLISHED], | 1473 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_ESTABLISHED], |
1481 | .maxlen = sizeof(int), | 1474 | .maxlen = sizeof(int), |
@@ -1483,7 +1476,6 @@ static struct ctl_table vs_vars[] = { | |||
1483 | .proc_handler = &proc_dointvec_jiffies, | 1476 | .proc_handler = &proc_dointvec_jiffies, |
1484 | }, | 1477 | }, |
1485 | { | 1478 | { |
1486 | .ctl_name = NET_IPV4_VS_TO_SS, | ||
1487 | .procname = "timeout_synsent", | 1479 | .procname = "timeout_synsent", |
1488 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_SENT], | 1480 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_SENT], |
1489 | .maxlen = sizeof(int), | 1481 | .maxlen = sizeof(int), |
@@ -1491,7 +1483,6 @@ static struct ctl_table vs_vars[] = { | |||
1491 | .proc_handler = &proc_dointvec_jiffies, | 1483 | .proc_handler = &proc_dointvec_jiffies, |
1492 | }, | 1484 | }, |
1493 | { | 1485 | { |
1494 | .ctl_name = NET_IPV4_VS_TO_SR, | ||
1495 | .procname = "timeout_synrecv", | 1486 | .procname = "timeout_synrecv", |
1496 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_RECV], | 1487 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_RECV], |
1497 | .maxlen = sizeof(int), | 1488 | .maxlen = sizeof(int), |
@@ -1499,7 +1490,6 @@ static struct ctl_table vs_vars[] = { | |||
1499 | .proc_handler = &proc_dointvec_jiffies, | 1490 | .proc_handler = &proc_dointvec_jiffies, |
1500 | }, | 1491 | }, |
1501 | { | 1492 | { |
1502 | .ctl_name = NET_IPV4_VS_TO_FW, | ||
1503 | .procname = "timeout_finwait", | 1493 | .procname = "timeout_finwait", |
1504 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_FIN_WAIT], | 1494 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_FIN_WAIT], |
1505 | .maxlen = sizeof(int), | 1495 | .maxlen = sizeof(int), |
@@ -1507,7 +1497,6 @@ static struct ctl_table vs_vars[] = { | |||
1507 | .proc_handler = &proc_dointvec_jiffies, | 1497 | .proc_handler = &proc_dointvec_jiffies, |
1508 | }, | 1498 | }, |
1509 | { | 1499 | { |
1510 | .ctl_name = NET_IPV4_VS_TO_TW, | ||
1511 | .procname = "timeout_timewait", | 1500 | .procname = "timeout_timewait", |
1512 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_TIME_WAIT], | 1501 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_TIME_WAIT], |
1513 | .maxlen = sizeof(int), | 1502 | .maxlen = sizeof(int), |
@@ -1515,7 +1504,6 @@ static struct ctl_table vs_vars[] = { | |||
1515 | .proc_handler = &proc_dointvec_jiffies, | 1504 | .proc_handler = &proc_dointvec_jiffies, |
1516 | }, | 1505 | }, |
1517 | { | 1506 | { |
1518 | .ctl_name = NET_IPV4_VS_TO_CL, | ||
1519 | .procname = "timeout_close", | 1507 | .procname = "timeout_close", |
1520 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE], | 1508 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE], |
1521 | .maxlen = sizeof(int), | 1509 | .maxlen = sizeof(int), |
@@ -1523,7 +1511,6 @@ static struct ctl_table vs_vars[] = { | |||
1523 | .proc_handler = &proc_dointvec_jiffies, | 1511 | .proc_handler = &proc_dointvec_jiffies, |
1524 | }, | 1512 | }, |
1525 | { | 1513 | { |
1526 | .ctl_name = NET_IPV4_VS_TO_CW, | ||
1527 | .procname = "timeout_closewait", | 1514 | .procname = "timeout_closewait", |
1528 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE_WAIT], | 1515 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE_WAIT], |
1529 | .maxlen = sizeof(int), | 1516 | .maxlen = sizeof(int), |
@@ -1531,7 +1518,6 @@ static struct ctl_table vs_vars[] = { | |||
1531 | .proc_handler = &proc_dointvec_jiffies, | 1518 | .proc_handler = &proc_dointvec_jiffies, |
1532 | }, | 1519 | }, |
1533 | { | 1520 | { |
1534 | .ctl_name = NET_IPV4_VS_TO_LA, | ||
1535 | .procname = "timeout_lastack", | 1521 | .procname = "timeout_lastack", |
1536 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_LAST_ACK], | 1522 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_LAST_ACK], |
1537 | .maxlen = sizeof(int), | 1523 | .maxlen = sizeof(int), |
@@ -1539,7 +1525,6 @@ static struct ctl_table vs_vars[] = { | |||
1539 | .proc_handler = &proc_dointvec_jiffies, | 1525 | .proc_handler = &proc_dointvec_jiffies, |
1540 | }, | 1526 | }, |
1541 | { | 1527 | { |
1542 | .ctl_name = NET_IPV4_VS_TO_LI, | ||
1543 | .procname = "timeout_listen", | 1528 | .procname = "timeout_listen", |
1544 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_LISTEN], | 1529 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_LISTEN], |
1545 | .maxlen = sizeof(int), | 1530 | .maxlen = sizeof(int), |
@@ -1547,7 +1532,6 @@ static struct ctl_table vs_vars[] = { | |||
1547 | .proc_handler = &proc_dointvec_jiffies, | 1532 | .proc_handler = &proc_dointvec_jiffies, |
1548 | }, | 1533 | }, |
1549 | { | 1534 | { |
1550 | .ctl_name = NET_IPV4_VS_TO_SA, | ||
1551 | .procname = "timeout_synack", | 1535 | .procname = "timeout_synack", |
1552 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYNACK], | 1536 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYNACK], |
1553 | .maxlen = sizeof(int), | 1537 | .maxlen = sizeof(int), |
@@ -1555,7 +1539,6 @@ static struct ctl_table vs_vars[] = { | |||
1555 | .proc_handler = &proc_dointvec_jiffies, | 1539 | .proc_handler = &proc_dointvec_jiffies, |
1556 | }, | 1540 | }, |
1557 | { | 1541 | { |
1558 | .ctl_name = NET_IPV4_VS_TO_UDP, | ||
1559 | .procname = "timeout_udp", | 1542 | .procname = "timeout_udp", |
1560 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_UDP], | 1543 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_UDP], |
1561 | .maxlen = sizeof(int), | 1544 | .maxlen = sizeof(int), |
@@ -1563,7 +1546,6 @@ static struct ctl_table vs_vars[] = { | |||
1563 | .proc_handler = &proc_dointvec_jiffies, | 1546 | .proc_handler = &proc_dointvec_jiffies, |
1564 | }, | 1547 | }, |
1565 | { | 1548 | { |
1566 | .ctl_name = NET_IPV4_VS_TO_ICMP, | ||
1567 | .procname = "timeout_icmp", | 1549 | .procname = "timeout_icmp", |
1568 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_ICMP], | 1550 | .data = &vs_timeout_table_dos.timeout[IP_VS_S_ICMP], |
1569 | .maxlen = sizeof(int), | 1551 | .maxlen = sizeof(int), |
@@ -1572,7 +1554,6 @@ static struct ctl_table vs_vars[] = { | |||
1572 | }, | 1554 | }, |
1573 | #endif | 1555 | #endif |
1574 | { | 1556 | { |
1575 | .ctl_name = NET_IPV4_VS_CACHE_BYPASS, | ||
1576 | .procname = "cache_bypass", | 1557 | .procname = "cache_bypass", |
1577 | .data = &sysctl_ip_vs_cache_bypass, | 1558 | .data = &sysctl_ip_vs_cache_bypass, |
1578 | .maxlen = sizeof(int), | 1559 | .maxlen = sizeof(int), |
@@ -1580,7 +1561,6 @@ static struct ctl_table vs_vars[] = { | |||
1580 | .proc_handler = &proc_dointvec, | 1561 | .proc_handler = &proc_dointvec, |
1581 | }, | 1562 | }, |
1582 | { | 1563 | { |
1583 | .ctl_name = NET_IPV4_VS_EXPIRE_NODEST_CONN, | ||
1584 | .procname = "expire_nodest_conn", | 1564 | .procname = "expire_nodest_conn", |
1585 | .data = &sysctl_ip_vs_expire_nodest_conn, | 1565 | .data = &sysctl_ip_vs_expire_nodest_conn, |
1586 | .maxlen = sizeof(int), | 1566 | .maxlen = sizeof(int), |
@@ -1588,7 +1568,6 @@ static struct ctl_table vs_vars[] = { | |||
1588 | .proc_handler = &proc_dointvec, | 1568 | .proc_handler = &proc_dointvec, |
1589 | }, | 1569 | }, |
1590 | { | 1570 | { |
1591 | .ctl_name = NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE, | ||
1592 | .procname = "expire_quiescent_template", | 1571 | .procname = "expire_quiescent_template", |
1593 | .data = &sysctl_ip_vs_expire_quiescent_template, | 1572 | .data = &sysctl_ip_vs_expire_quiescent_template, |
1594 | .maxlen = sizeof(int), | 1573 | .maxlen = sizeof(int), |
@@ -1596,7 +1575,6 @@ static struct ctl_table vs_vars[] = { | |||
1596 | .proc_handler = &proc_dointvec, | 1575 | .proc_handler = &proc_dointvec, |
1597 | }, | 1576 | }, |
1598 | { | 1577 | { |
1599 | .ctl_name = NET_IPV4_VS_SYNC_THRESHOLD, | ||
1600 | .procname = "sync_threshold", | 1578 | .procname = "sync_threshold", |
1601 | .data = &sysctl_ip_vs_sync_threshold, | 1579 | .data = &sysctl_ip_vs_sync_threshold, |
1602 | .maxlen = sizeof(sysctl_ip_vs_sync_threshold), | 1580 | .maxlen = sizeof(sysctl_ip_vs_sync_threshold), |
@@ -1604,7 +1582,6 @@ static struct ctl_table vs_vars[] = { | |||
1604 | .proc_handler = &proc_do_sync_threshold, | 1582 | .proc_handler = &proc_do_sync_threshold, |
1605 | }, | 1583 | }, |
1606 | { | 1584 | { |
1607 | .ctl_name = NET_IPV4_VS_NAT_ICMP_SEND, | ||
1608 | .procname = "nat_icmp_send", | 1585 | .procname = "nat_icmp_send", |
1609 | .data = &sysctl_ip_vs_nat_icmp_send, | 1586 | .data = &sysctl_ip_vs_nat_icmp_send, |
1610 | .maxlen = sizeof(int), | 1587 | .maxlen = sizeof(int), |
@@ -1616,7 +1593,6 @@ static struct ctl_table vs_vars[] = { | |||
1616 | 1593 | ||
1617 | static ctl_table vs_table[] = { | 1594 | static ctl_table vs_table[] = { |
1618 | { | 1595 | { |
1619 | .ctl_name = NET_IPV4_VS, | ||
1620 | .procname = "vs", | 1596 | .procname = "vs", |
1621 | .mode = 0555, | 1597 | .mode = 0555, |
1622 | .child = vs_vars | 1598 | .child = vs_vars |
diff --git a/net/ipv4/ipvs/ip_vs_lblc.c b/net/ipv4/ipvs/ip_vs_lblc.c index 052f4ed59174..b843a11d7cf7 100644 --- a/net/ipv4/ipvs/ip_vs_lblc.c +++ b/net/ipv4/ipvs/ip_vs_lblc.c | |||
@@ -114,7 +114,6 @@ struct ip_vs_lblc_table { | |||
114 | 114 | ||
115 | static ctl_table vs_vars_table[] = { | 115 | static ctl_table vs_vars_table[] = { |
116 | { | 116 | { |
117 | .ctl_name = NET_IPV4_VS_LBLC_EXPIRE, | ||
118 | .procname = "lblc_expiration", | 117 | .procname = "lblc_expiration", |
119 | .data = &sysctl_ip_vs_lblc_expiration, | 118 | .data = &sysctl_ip_vs_lblc_expiration, |
120 | .maxlen = sizeof(int), | 119 | .maxlen = sizeof(int), |
@@ -126,7 +125,6 @@ static ctl_table vs_vars_table[] = { | |||
126 | 125 | ||
127 | static ctl_table vs_table[] = { | 126 | static ctl_table vs_table[] = { |
128 | { | 127 | { |
129 | .ctl_name = NET_IPV4_VS, | ||
130 | .procname = "vs", | 128 | .procname = "vs", |
131 | .mode = 0555, | 129 | .mode = 0555, |
132 | .child = vs_vars_table | 130 | .child = vs_vars_table |
diff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c index 427b593c1069..e5b323a6b2f7 100644 --- a/net/ipv4/ipvs/ip_vs_lblcr.c +++ b/net/ipv4/ipvs/ip_vs_lblcr.c | |||
@@ -302,7 +302,6 @@ struct ip_vs_lblcr_table { | |||
302 | 302 | ||
303 | static ctl_table vs_vars_table[] = { | 303 | static ctl_table vs_vars_table[] = { |
304 | { | 304 | { |
305 | .ctl_name = NET_IPV4_VS_LBLCR_EXPIRE, | ||
306 | .procname = "lblcr_expiration", | 305 | .procname = "lblcr_expiration", |
307 | .data = &sysctl_ip_vs_lblcr_expiration, | 306 | .data = &sysctl_ip_vs_lblcr_expiration, |
308 | .maxlen = sizeof(int), | 307 | .maxlen = sizeof(int), |
@@ -314,7 +313,6 @@ static ctl_table vs_vars_table[] = { | |||
314 | 313 | ||
315 | static ctl_table vs_table[] = { | 314 | static ctl_table vs_table[] = { |
316 | { | 315 | { |
317 | .ctl_name = NET_IPV4_VS, | ||
318 | .procname = "vs", | 316 | .procname = "vs", |
319 | .mode = 0555, | 317 | .mode = 0555, |
320 | .child = vs_vars_table | 318 | .child = vs_vars_table |
diff --git a/net/ipv4/ipvs/ip_vs_proto.c b/net/ipv4/ipvs/ip_vs_proto.c index e844ddb82b9a..c0e11ec8f0f9 100644 --- a/net/ipv4/ipvs/ip_vs_proto.c +++ b/net/ipv4/ipvs/ip_vs_proto.c | |||
@@ -45,7 +45,7 @@ static struct ip_vs_protocol *ip_vs_proto_table[IP_VS_PROTO_TAB_SIZE]; | |||
45 | /* | 45 | /* |
46 | * register an ipvs protocol | 46 | * register an ipvs protocol |
47 | */ | 47 | */ |
48 | static int register_ip_vs_protocol(struct ip_vs_protocol *pp) | 48 | static int __used register_ip_vs_protocol(struct ip_vs_protocol *pp) |
49 | { | 49 | { |
50 | unsigned hash = IP_VS_PROTO_HASH(pp->protocol); | 50 | unsigned hash = IP_VS_PROTO_HASH(pp->protocol); |
51 | 51 | ||
diff --git a/net/ipv4/netfilter/iptable_raw.c b/net/ipv4/netfilter/iptable_raw.c index 5de6e57ac55c..f8678651250f 100644 --- a/net/ipv4/netfilter/iptable_raw.c +++ b/net/ipv4/netfilter/iptable_raw.c | |||
@@ -66,7 +66,7 @@ ipt_local_hook(unsigned int hook, | |||
66 | if (skb->len < sizeof(struct iphdr) || | 66 | if (skb->len < sizeof(struct iphdr) || |
67 | ip_hdrlen(skb) < sizeof(struct iphdr)) { | 67 | ip_hdrlen(skb) < sizeof(struct iphdr)) { |
68 | if (net_ratelimit()) | 68 | if (net_ratelimit()) |
69 | printk("iptable_raw: ignoring short SOCK_RAW" | 69 | printk("iptable_raw: ignoring short SOCK_RAW " |
70 | "packet.\n"); | 70 | "packet.\n"); |
71 | return NF_ACCEPT; | 71 | return NF_ACCEPT; |
72 | } | 72 | } |
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index 70e7997ea284..86b465b176ba 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c | |||
@@ -607,13 +607,10 @@ static void nf_nat_move_storage(struct nf_conn *conntrack, void *old) | |||
607 | struct nf_conn_nat *new_nat = nf_ct_ext_find(conntrack, NF_CT_EXT_NAT); | 607 | struct nf_conn_nat *new_nat = nf_ct_ext_find(conntrack, NF_CT_EXT_NAT); |
608 | struct nf_conn_nat *old_nat = (struct nf_conn_nat *)old; | 608 | struct nf_conn_nat *old_nat = (struct nf_conn_nat *)old; |
609 | struct nf_conn *ct = old_nat->ct; | 609 | struct nf_conn *ct = old_nat->ct; |
610 | unsigned int srchash; | ||
611 | 610 | ||
612 | if (!(ct->status & IPS_NAT_DONE_MASK)) | 611 | if (!ct || !(ct->status & IPS_NAT_DONE_MASK)) |
613 | return; | 612 | return; |
614 | 613 | ||
615 | srchash = hash_by_src(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); | ||
616 | |||
617 | write_lock_bh(&nf_nat_lock); | 614 | write_lock_bh(&nf_nat_lock); |
618 | hlist_replace_rcu(&old_nat->bysource, &new_nat->bysource); | 615 | hlist_replace_rcu(&old_nat->bysource, &new_nat->bysource); |
619 | new_nat->ct = ct; | 616 | new_nat->ct = ct; |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 1bff9ed349ff..c426dec6d579 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2888,18 +2888,14 @@ static int ip_rt_acct_read(char *buffer, char **start, off_t offset, | |||
2888 | offset /= sizeof(u32); | 2888 | offset /= sizeof(u32); |
2889 | 2889 | ||
2890 | if (length > 0) { | 2890 | if (length > 0) { |
2891 | u32 *src = ((u32 *) IP_RT_ACCT_CPU(0)) + offset; | ||
2892 | u32 *dst = (u32 *) buffer; | 2891 | u32 *dst = (u32 *) buffer; |
2893 | 2892 | ||
2894 | /* Copy first cpu. */ | ||
2895 | *start = buffer; | 2893 | *start = buffer; |
2896 | memcpy(dst, src, length); | 2894 | memset(dst, 0, length); |
2897 | 2895 | ||
2898 | /* Add the other cpus in, one int at a time */ | ||
2899 | for_each_possible_cpu(i) { | 2896 | for_each_possible_cpu(i) { |
2900 | unsigned int j; | 2897 | unsigned int j; |
2901 | 2898 | u32 *src = ((u32 *) IP_RT_ACCT_CPU(i)) + offset; | |
2902 | src = ((u32 *) IP_RT_ACCT_CPU(i)) + offset; | ||
2903 | 2899 | ||
2904 | for (j = 0; j < length/4; j++) | 2900 | for (j = 0; j < length/4; j++) |
2905 | dst[j] += src[j]; | 2901 | dst[j] += src[j]; |
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index ffddd2b45352..bec6fe880657 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c | |||
@@ -191,7 +191,7 @@ static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, | |||
191 | 191 | ||
192 | tcp_get_default_congestion_control(val); | 192 | tcp_get_default_congestion_control(val); |
193 | ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen); | 193 | ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen); |
194 | if (ret == 0 && newval && newlen) | 194 | if (ret == 1 && newval && newlen) |
195 | ret = tcp_set_default_congestion_control(val); | 195 | ret = tcp_set_default_congestion_control(val); |
196 | return ret; | 196 | return ret; |
197 | } | 197 | } |
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c index 64f1cbaf96e8..5aa5f5496d6d 100644 --- a/net/ipv4/tcp_illinois.c +++ b/net/ipv4/tcp_illinois.c | |||
@@ -298,7 +298,7 @@ static u32 tcp_illinois_ssthresh(struct sock *sk) | |||
298 | struct illinois *ca = inet_csk_ca(sk); | 298 | struct illinois *ca = inet_csk_ca(sk); |
299 | 299 | ||
300 | /* Multiplicative decrease */ | 300 | /* Multiplicative decrease */ |
301 | return max((tp->snd_cwnd * ca->beta) >> BETA_SHIFT, 2U); | 301 | return max(tp->snd_cwnd - ((tp->snd_cwnd * ca->beta) >> BETA_SHIFT), 2U); |
302 | } | 302 | } |
303 | 303 | ||
304 | 304 | ||
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index e566f3c67677..652c32368ccc 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -900,8 +900,7 @@ int tcp_v4_md5_do_add(struct sock *sk, __be32 addr, | |||
900 | sizeof(*keys) * md5sig->entries4); | 900 | sizeof(*keys) * md5sig->entries4); |
901 | 901 | ||
902 | /* Free old key list, and reference new one */ | 902 | /* Free old key list, and reference new one */ |
903 | if (md5sig->keys4) | 903 | kfree(md5sig->keys4); |
904 | kfree(md5sig->keys4); | ||
905 | md5sig->keys4 = keys; | 904 | md5sig->keys4 = keys; |
906 | md5sig->alloced4++; | 905 | md5sig->alloced4++; |
907 | } | 906 | } |
@@ -939,10 +938,10 @@ int tcp_v4_md5_do_del(struct sock *sk, __be32 addr) | |||
939 | tp->md5sig_info->alloced4 = 0; | 938 | tp->md5sig_info->alloced4 = 0; |
940 | } else if (tp->md5sig_info->entries4 != i) { | 939 | } else if (tp->md5sig_info->entries4 != i) { |
941 | /* Need to do some manipulation */ | 940 | /* Need to do some manipulation */ |
942 | memcpy(&tp->md5sig_info->keys4[i], | 941 | memmove(&tp->md5sig_info->keys4[i], |
943 | &tp->md5sig_info->keys4[i+1], | 942 | &tp->md5sig_info->keys4[i+1], |
944 | (tp->md5sig_info->entries4 - i) * | 943 | (tp->md5sig_info->entries4 - i) * |
945 | sizeof(struct tcp4_md5sig_key)); | 944 | sizeof(struct tcp4_md5sig_key)); |
946 | } | 945 | } |
947 | tcp_free_md5sig_pool(); | 946 | tcp_free_md5sig_pool(); |
948 | return 0; | 947 | return 0; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 324b4207254a..e5130a7fe181 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1295,6 +1295,7 @@ static int tcp_mtu_probe(struct sock *sk) | |||
1295 | struct sk_buff *skb, *nskb, *next; | 1295 | struct sk_buff *skb, *nskb, *next; |
1296 | int len; | 1296 | int len; |
1297 | int probe_size; | 1297 | int probe_size; |
1298 | int size_needed; | ||
1298 | unsigned int pif; | 1299 | unsigned int pif; |
1299 | int copy; | 1300 | int copy; |
1300 | int mss_now; | 1301 | int mss_now; |
@@ -1313,27 +1314,20 @@ static int tcp_mtu_probe(struct sock *sk) | |||
1313 | /* Very simple search strategy: just double the MSS. */ | 1314 | /* Very simple search strategy: just double the MSS. */ |
1314 | mss_now = tcp_current_mss(sk, 0); | 1315 | mss_now = tcp_current_mss(sk, 0); |
1315 | probe_size = 2*tp->mss_cache; | 1316 | probe_size = 2*tp->mss_cache; |
1317 | size_needed = probe_size + (tp->reordering + 1) * tp->mss_cache; | ||
1316 | if (probe_size > tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_high)) { | 1318 | if (probe_size > tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_high)) { |
1317 | /* TODO: set timer for probe_converge_event */ | 1319 | /* TODO: set timer for probe_converge_event */ |
1318 | return -1; | 1320 | return -1; |
1319 | } | 1321 | } |
1320 | 1322 | ||
1321 | /* Have enough data in the send queue to probe? */ | 1323 | /* Have enough data in the send queue to probe? */ |
1322 | len = 0; | 1324 | if (tp->write_seq - tp->snd_nxt < size_needed) |
1323 | if ((skb = tcp_send_head(sk)) == NULL) | ||
1324 | return -1; | ||
1325 | while ((len += skb->len) < probe_size && !tcp_skb_is_last(sk, skb)) | ||
1326 | skb = tcp_write_queue_next(sk, skb); | ||
1327 | if (len < probe_size) | ||
1328 | return -1; | 1325 | return -1; |
1329 | 1326 | ||
1330 | /* Receive window check. */ | 1327 | if (tp->snd_wnd < size_needed) |
1331 | if (after(TCP_SKB_CB(skb)->seq + probe_size, tp->snd_una + tp->snd_wnd)) { | 1328 | return -1; |
1332 | if (tp->snd_wnd < probe_size) | 1329 | if (after(tp->snd_nxt + size_needed, tp->snd_una + tp->snd_wnd)) |
1333 | return -1; | 1330 | return 0; |
1334 | else | ||
1335 | return 0; | ||
1336 | } | ||
1337 | 1331 | ||
1338 | /* Do we need to wait to drain cwnd? */ | 1332 | /* Do we need to wait to drain cwnd? */ |
1339 | pif = tcp_packets_in_flight(tp); | 1333 | pif = tcp_packets_in_flight(tp); |
@@ -1352,7 +1346,6 @@ static int tcp_mtu_probe(struct sock *sk) | |||
1352 | 1346 | ||
1353 | skb = tcp_send_head(sk); | 1347 | skb = tcp_send_head(sk); |
1354 | tcp_insert_write_queue_before(nskb, skb, sk); | 1348 | tcp_insert_write_queue_before(nskb, skb, sk); |
1355 | tcp_advance_send_head(sk, skb); | ||
1356 | 1349 | ||
1357 | TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(skb)->seq; | 1350 | TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(skb)->seq; |
1358 | TCP_SKB_CB(nskb)->end_seq = TCP_SKB_CB(skb)->seq + probe_size; | 1351 | TCP_SKB_CB(nskb)->end_seq = TCP_SKB_CB(skb)->seq + probe_size; |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 1bd8d818f8e9..567664eac463 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -967,7 +967,7 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev, | |||
967 | if (unlikely(score.addr_type == IPV6_ADDR_ANY || | 967 | if (unlikely(score.addr_type == IPV6_ADDR_ANY || |
968 | score.addr_type & IPV6_ADDR_MULTICAST)) { | 968 | score.addr_type & IPV6_ADDR_MULTICAST)) { |
969 | LIMIT_NETDEBUG(KERN_DEBUG | 969 | LIMIT_NETDEBUG(KERN_DEBUG |
970 | "ADDRCONF: unspecified / multicast address" | 970 | "ADDRCONF: unspecified / multicast address " |
971 | "assigned as unicast address on %s", | 971 | "assigned as unicast address on %s", |
972 | dev->name); | 972 | dev->name); |
973 | continue; | 973 | continue; |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 3aad861975a0..93980c3b83e6 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -581,7 +581,10 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer, | |||
581 | } | 581 | } |
582 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | 582 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; |
583 | } | 583 | } |
584 | tcp_alloc_md5sig_pool(); | 584 | if (tcp_alloc_md5sig_pool() == NULL) { |
585 | kfree(newkey); | ||
586 | return -ENOMEM; | ||
587 | } | ||
585 | if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) { | 588 | if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) { |
586 | keys = kmalloc((sizeof (tp->md5sig_info->keys6[0]) * | 589 | keys = kmalloc((sizeof (tp->md5sig_info->keys6[0]) * |
587 | (tp->md5sig_info->entries6 + 1)), GFP_ATOMIC); | 590 | (tp->md5sig_info->entries6 + 1)), GFP_ATOMIC); |
@@ -634,10 +637,6 @@ static int tcp_v6_md5_do_del(struct sock *sk, struct in6_addr *peer) | |||
634 | kfree(tp->md5sig_info->keys6); | 637 | kfree(tp->md5sig_info->keys6); |
635 | tp->md5sig_info->keys6 = NULL; | 638 | tp->md5sig_info->keys6 = NULL; |
636 | tp->md5sig_info->alloced6 = 0; | 639 | tp->md5sig_info->alloced6 = 0; |
637 | |||
638 | tcp_free_md5sig_pool(); | ||
639 | |||
640 | return 0; | ||
641 | } else { | 640 | } else { |
642 | /* shrink the database */ | 641 | /* shrink the database */ |
643 | if (tp->md5sig_info->entries6 != i) | 642 | if (tp->md5sig_info->entries6 != i) |
@@ -646,6 +645,8 @@ static int tcp_v6_md5_do_del(struct sock *sk, struct in6_addr *peer) | |||
646 | (tp->md5sig_info->entries6 - i) | 645 | (tp->md5sig_info->entries6 - i) |
647 | * sizeof (tp->md5sig_info->keys6[0])); | 646 | * sizeof (tp->md5sig_info->keys6[0])); |
648 | } | 647 | } |
648 | tcp_free_md5sig_pool(); | ||
649 | return 0; | ||
649 | } | 650 | } |
650 | } | 651 | } |
651 | return -ENOENT; | 652 | return -ENOENT; |
diff --git a/net/irda/iriap.c b/net/irda/iriap.c index dc5e34a01620..a86a5d83786b 100644 --- a/net/irda/iriap.c +++ b/net/irda/iriap.c | |||
@@ -928,7 +928,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb) | |||
928 | 928 | ||
929 | opcode = fp[0]; | 929 | opcode = fp[0]; |
930 | if (~opcode & 0x80) { | 930 | if (~opcode & 0x80) { |
931 | IRDA_WARNING("%s: IrIAS multiframe commands or results" | 931 | IRDA_WARNING("%s: IrIAS multiframe commands or results " |
932 | "is not implemented yet!\n", __FUNCTION__); | 932 | "is not implemented yet!\n", __FUNCTION__); |
933 | return; | 933 | return; |
934 | } | 934 | } |
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c index 7f9c8542e5fc..c68220773d28 100644 --- a/net/irda/irlan/irlan_eth.c +++ b/net/irda/irlan/irlan_eth.c | |||
@@ -296,6 +296,7 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) | |||
296 | */ | 296 | */ |
297 | void irlan_eth_send_gratuitous_arp(struct net_device *dev) | 297 | void irlan_eth_send_gratuitous_arp(struct net_device *dev) |
298 | { | 298 | { |
299 | #ifdef CONFIG_INET | ||
299 | struct in_device *in_dev; | 300 | struct in_device *in_dev; |
300 | 301 | ||
301 | /* | 302 | /* |
@@ -303,7 +304,6 @@ void irlan_eth_send_gratuitous_arp(struct net_device *dev) | |||
303 | * is useful if we have changed access points on the same | 304 | * is useful if we have changed access points on the same |
304 | * subnet. | 305 | * subnet. |
305 | */ | 306 | */ |
306 | #ifdef CONFIG_INET | ||
307 | IRDA_DEBUG(4, "IrLAN: Sending gratuitous ARP\n"); | 307 | IRDA_DEBUG(4, "IrLAN: Sending gratuitous ARP\n"); |
308 | rcu_read_lock(); | 308 | rcu_read_lock(); |
309 | in_dev = __in_dev_get_rcu(dev); | 309 | in_dev = __in_dev_get_rcu(dev); |
diff --git a/net/key/af_key.c b/net/key/af_key.c index 10c89d47f685..878039b9557d 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -1015,9 +1015,7 @@ static inline struct sk_buff *pfkey_xfrm_state2msg(struct xfrm_state *x) | |||
1015 | { | 1015 | { |
1016 | struct sk_buff *skb; | 1016 | struct sk_buff *skb; |
1017 | 1017 | ||
1018 | spin_lock_bh(&x->lock); | ||
1019 | skb = __pfkey_xfrm_state2msg(x, 1, 3); | 1018 | skb = __pfkey_xfrm_state2msg(x, 1, 3); |
1020 | spin_unlock_bh(&x->lock); | ||
1021 | 1019 | ||
1022 | return skb; | 1020 | return skb; |
1023 | } | 1021 | } |
@@ -1552,7 +1550,7 @@ static int pfkey_get(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, | |||
1552 | 1550 | ||
1553 | out_hdr = (struct sadb_msg *) out_skb->data; | 1551 | out_hdr = (struct sadb_msg *) out_skb->data; |
1554 | out_hdr->sadb_msg_version = hdr->sadb_msg_version; | 1552 | out_hdr->sadb_msg_version = hdr->sadb_msg_version; |
1555 | out_hdr->sadb_msg_type = SADB_DUMP; | 1553 | out_hdr->sadb_msg_type = SADB_GET; |
1556 | out_hdr->sadb_msg_satype = pfkey_proto2satype(proto); | 1554 | out_hdr->sadb_msg_satype = pfkey_proto2satype(proto); |
1557 | out_hdr->sadb_msg_errno = 0; | 1555 | out_hdr->sadb_msg_errno = 0; |
1558 | out_hdr->sadb_msg_reserved = 0; | 1556 | out_hdr->sadb_msg_reserved = 0; |
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 0dc114c4ef2b..505af1f067ab 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -267,6 +267,17 @@ static int ieee80211_open(struct net_device *dev) | |||
267 | tasklet_enable(&local->tasklet); | 267 | tasklet_enable(&local->tasklet); |
268 | } | 268 | } |
269 | 269 | ||
270 | /* | ||
271 | * set_multicast_list will be invoked by the networking core | ||
272 | * which will check whether any increments here were done in | ||
273 | * error and sync them down to the hardware as filter flags. | ||
274 | */ | ||
275 | if (sdata->flags & IEEE80211_SDATA_ALLMULTI) | ||
276 | atomic_inc(&local->iff_allmultis); | ||
277 | |||
278 | if (sdata->flags & IEEE80211_SDATA_PROMISC) | ||
279 | atomic_inc(&local->iff_promiscs); | ||
280 | |||
270 | local->open_count++; | 281 | local->open_count++; |
271 | 282 | ||
272 | netif_start_queue(dev); | 283 | netif_start_queue(dev); |
@@ -284,6 +295,18 @@ static int ieee80211_stop(struct net_device *dev) | |||
284 | 295 | ||
285 | netif_stop_queue(dev); | 296 | netif_stop_queue(dev); |
286 | 297 | ||
298 | /* | ||
299 | * Don't count this interface for promisc/allmulti while it | ||
300 | * is down. dev_mc_unsync() will invoke set_multicast_list | ||
301 | * on the master interface which will sync these down to the | ||
302 | * hardware as filter flags. | ||
303 | */ | ||
304 | if (sdata->flags & IEEE80211_SDATA_ALLMULTI) | ||
305 | atomic_dec(&local->iff_allmultis); | ||
306 | |||
307 | if (sdata->flags & IEEE80211_SDATA_PROMISC) | ||
308 | atomic_dec(&local->iff_promiscs); | ||
309 | |||
287 | dev_mc_unsync(local->mdev, dev); | 310 | dev_mc_unsync(local->mdev, dev); |
288 | 311 | ||
289 | /* down all dependent devices, that is VLANs */ | 312 | /* down all dependent devices, that is VLANs */ |
@@ -370,8 +393,8 @@ static void ieee80211_set_multicast_list(struct net_device *dev) | |||
370 | 393 | ||
371 | allmulti = !!(dev->flags & IFF_ALLMULTI); | 394 | allmulti = !!(dev->flags & IFF_ALLMULTI); |
372 | promisc = !!(dev->flags & IFF_PROMISC); | 395 | promisc = !!(dev->flags & IFF_PROMISC); |
373 | sdata_allmulti = sdata->flags & IEEE80211_SDATA_ALLMULTI; | 396 | sdata_allmulti = !!(sdata->flags & IEEE80211_SDATA_ALLMULTI); |
374 | sdata_promisc = sdata->flags & IEEE80211_SDATA_PROMISC; | 397 | sdata_promisc = !!(sdata->flags & IEEE80211_SDATA_PROMISC); |
375 | 398 | ||
376 | if (allmulti != sdata_allmulti) { | 399 | if (allmulti != sdata_allmulti) { |
377 | if (dev->flags & IFF_ALLMULTI) | 400 | if (dev->flags & IFF_ALLMULTI) |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 015b3f879aa9..16afd24d4f6b 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -2647,7 +2647,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) | |||
2647 | local->sta_scanning = 0; | 2647 | local->sta_scanning = 0; |
2648 | 2648 | ||
2649 | if (ieee80211_hw_config(local)) | 2649 | if (ieee80211_hw_config(local)) |
2650 | printk(KERN_DEBUG "%s: failed to restore operational" | 2650 | printk(KERN_DEBUG "%s: failed to restore operational " |
2651 | "channel after scan\n", dev->name); | 2651 | "channel after scan\n", dev->name); |
2652 | 2652 | ||
2653 | 2653 | ||
diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig index 8210f549c492..5390bc792159 100644 --- a/net/sctp/Kconfig +++ b/net/sctp/Kconfig | |||
@@ -6,9 +6,9 @@ menuconfig IP_SCTP | |||
6 | tristate "The SCTP Protocol (EXPERIMENTAL)" | 6 | tristate "The SCTP Protocol (EXPERIMENTAL)" |
7 | depends on INET && EXPERIMENTAL | 7 | depends on INET && EXPERIMENTAL |
8 | depends on IPV6 || IPV6=n | 8 | depends on IPV6 || IPV6=n |
9 | select CRYPTO if SCTP_HMAC_SHA1 || SCTP_HMAC_MD5 | 9 | select CRYPTO |
10 | select CRYPTO_HMAC if SCTP_HMAC_SHA1 || SCTP_HMAC_MD5 | 10 | select CRYPTO_HMAC |
11 | select CRYPTO_SHA1 if SCTP_HMAC_SHA1 | 11 | select CRYPTO_SHA1 |
12 | select CRYPTO_MD5 if SCTP_HMAC_MD5 | 12 | select CRYPTO_MD5 if SCTP_HMAC_MD5 |
13 | ---help--- | 13 | ---help--- |
14 | Stream Control Transmission Protocol | 14 | Stream Control Transmission Protocol |
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 6d5fa6bb371b..97e6ebd14500 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c | |||
@@ -54,11 +54,13 @@ static struct sctp_hmac sctp_hmac_list[SCTP_AUTH_NUM_HMACS] = { | |||
54 | /* id 2 is reserved as well */ | 54 | /* id 2 is reserved as well */ |
55 | .hmac_id = SCTP_AUTH_HMAC_ID_RESERVED_2, | 55 | .hmac_id = SCTP_AUTH_HMAC_ID_RESERVED_2, |
56 | }, | 56 | }, |
57 | #if defined (CONFIG_CRYPTO_SHA256) || defined (CONFIG_CRYPTO_SHA256_MODULE) | ||
57 | { | 58 | { |
58 | .hmac_id = SCTP_AUTH_HMAC_ID_SHA256, | 59 | .hmac_id = SCTP_AUTH_HMAC_ID_SHA256, |
59 | .hmac_name="hmac(sha256)", | 60 | .hmac_name="hmac(sha256)", |
60 | .hmac_len = SCTP_SHA256_SIG_SIZE, | 61 | .hmac_len = SCTP_SHA256_SIG_SIZE, |
61 | } | 62 | } |
63 | #endif | ||
62 | }; | 64 | }; |
63 | 65 | ||
64 | 66 | ||
@@ -631,7 +633,7 @@ static int __sctp_auth_cid(sctp_cid_t chunk, struct sctp_chunks_param *param) | |||
631 | int found = 0; | 633 | int found = 0; |
632 | int i; | 634 | int i; |
633 | 635 | ||
634 | if (!param) | 636 | if (!param || param->param_hdr.length == 0) |
635 | return 0; | 637 | return 0; |
636 | 638 | ||
637 | len = ntohs(param->param_hdr.length) - sizeof(sctp_paramhdr_t); | 639 | len = ntohs(param->param_hdr.length) - sizeof(sctp_paramhdr_t); |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 5a9783c38de1..f4876291bb5e 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -77,6 +77,8 @@ static int sctp_process_param(struct sctp_association *asoc, | |||
77 | union sctp_params param, | 77 | union sctp_params param, |
78 | const union sctp_addr *peer_addr, | 78 | const union sctp_addr *peer_addr, |
79 | gfp_t gfp); | 79 | gfp_t gfp); |
80 | static void *sctp_addto_param(struct sctp_chunk *chunk, int len, | ||
81 | const void *data); | ||
80 | 82 | ||
81 | /* What was the inbound interface for this chunk? */ | 83 | /* What was the inbound interface for this chunk? */ |
82 | int sctp_chunk_iif(const struct sctp_chunk *chunk) | 84 | int sctp_chunk_iif(const struct sctp_chunk *chunk) |
@@ -207,11 +209,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, | |||
207 | 209 | ||
208 | chunksize = sizeof(init) + addrs_len + SCTP_SAT_LEN(num_types); | 210 | chunksize = sizeof(init) + addrs_len + SCTP_SAT_LEN(num_types); |
209 | chunksize += sizeof(ecap_param); | 211 | chunksize += sizeof(ecap_param); |
210 | if (sctp_prsctp_enable) { | 212 | |
211 | chunksize += sizeof(prsctp_param); | ||
212 | extensions[num_ext] = SCTP_CID_FWD_TSN; | ||
213 | num_ext += 1; | ||
214 | } | ||
215 | /* ADDIP: Section 4.2.7: | 213 | /* ADDIP: Section 4.2.7: |
216 | * An implementation supporting this extension [ADDIP] MUST list | 214 | * An implementation supporting this extension [ADDIP] MUST list |
217 | * the ASCONF,the ASCONF-ACK, and the AUTH chunks in its INIT and | 215 | * the ASCONF,the ASCONF-ACK, and the AUTH chunks in its INIT and |
@@ -243,7 +241,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, | |||
243 | if (auth_chunks->length) | 241 | if (auth_chunks->length) |
244 | chunksize += ntohs(auth_chunks->length); | 242 | chunksize += ntohs(auth_chunks->length); |
245 | else | 243 | else |
246 | auth_hmacs = NULL; | 244 | auth_chunks = NULL; |
247 | 245 | ||
248 | extensions[num_ext] = SCTP_CID_AUTH; | 246 | extensions[num_ext] = SCTP_CID_AUTH; |
249 | num_ext += 1; | 247 | num_ext += 1; |
@@ -297,7 +295,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, | |||
297 | htons(sizeof(sctp_supported_ext_param_t) + num_ext); | 295 | htons(sizeof(sctp_supported_ext_param_t) + num_ext); |
298 | sctp_addto_chunk(retval, sizeof(sctp_supported_ext_param_t), | 296 | sctp_addto_chunk(retval, sizeof(sctp_supported_ext_param_t), |
299 | &ext_param); | 297 | &ext_param); |
300 | sctp_addto_chunk(retval, num_ext, extensions); | 298 | sctp_addto_param(retval, num_ext, extensions); |
301 | } | 299 | } |
302 | 300 | ||
303 | if (sctp_prsctp_enable) | 301 | if (sctp_prsctp_enable) |
@@ -371,20 +369,12 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, | |||
371 | if (asoc->peer.ecn_capable) | 369 | if (asoc->peer.ecn_capable) |
372 | chunksize += sizeof(ecap_param); | 370 | chunksize += sizeof(ecap_param); |
373 | 371 | ||
374 | /* Tell peer that we'll do PR-SCTP only if peer advertised. */ | ||
375 | if (asoc->peer.prsctp_capable) { | ||
376 | chunksize += sizeof(prsctp_param); | ||
377 | extensions[num_ext] = SCTP_CID_FWD_TSN; | ||
378 | num_ext += 1; | ||
379 | } | ||
380 | |||
381 | if (sctp_addip_enable) { | 372 | if (sctp_addip_enable) { |
382 | extensions[num_ext] = SCTP_CID_ASCONF; | 373 | extensions[num_ext] = SCTP_CID_ASCONF; |
383 | extensions[num_ext+1] = SCTP_CID_ASCONF_ACK; | 374 | extensions[num_ext+1] = SCTP_CID_ASCONF_ACK; |
384 | num_ext += 2; | 375 | num_ext += 2; |
385 | } | 376 | } |
386 | 377 | ||
387 | chunksize += sizeof(ext_param) + num_ext; | ||
388 | chunksize += sizeof(aiparam); | 378 | chunksize += sizeof(aiparam); |
389 | 379 | ||
390 | if (asoc->peer.auth_capable) { | 380 | if (asoc->peer.auth_capable) { |
@@ -407,6 +397,9 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, | |||
407 | num_ext += 1; | 397 | num_ext += 1; |
408 | } | 398 | } |
409 | 399 | ||
400 | if (num_ext) | ||
401 | chunksize += sizeof(sctp_supported_ext_param_t) + num_ext; | ||
402 | |||
410 | /* Now allocate and fill out the chunk. */ | 403 | /* Now allocate and fill out the chunk. */ |
411 | retval = sctp_make_chunk(asoc, SCTP_CID_INIT_ACK, 0, chunksize); | 404 | retval = sctp_make_chunk(asoc, SCTP_CID_INIT_ACK, 0, chunksize); |
412 | if (!retval) | 405 | if (!retval) |
@@ -428,7 +421,7 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, | |||
428 | htons(sizeof(sctp_supported_ext_param_t) + num_ext); | 421 | htons(sizeof(sctp_supported_ext_param_t) + num_ext); |
429 | sctp_addto_chunk(retval, sizeof(sctp_supported_ext_param_t), | 422 | sctp_addto_chunk(retval, sizeof(sctp_supported_ext_param_t), |
430 | &ext_param); | 423 | &ext_param); |
431 | sctp_addto_chunk(retval, num_ext, extensions); | 424 | sctp_addto_param(retval, num_ext, extensions); |
432 | } | 425 | } |
433 | if (asoc->peer.prsctp_capable) | 426 | if (asoc->peer.prsctp_capable) |
434 | sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param); | 427 | sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param); |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 5ebbe808d801..5fb84778846d 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -959,7 +959,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep, | |||
959 | { | 959 | { |
960 | struct sctp_transport *transport = (struct sctp_transport *) arg; | 960 | struct sctp_transport *transport = (struct sctp_transport *) arg; |
961 | 961 | ||
962 | if (asoc->overall_error_count >= asoc->max_retrans) { | 962 | if (asoc->overall_error_count > asoc->max_retrans) { |
963 | sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, | 963 | sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, |
964 | SCTP_ERROR(ETIMEDOUT)); | 964 | SCTP_ERROR(ETIMEDOUT)); |
965 | /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */ | 965 | /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */ |
@@ -1146,7 +1146,7 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep, | |||
1146 | /* Check if the timestamp looks valid. */ | 1146 | /* Check if the timestamp looks valid. */ |
1147 | if (time_after(hbinfo->sent_at, jiffies) || | 1147 | if (time_after(hbinfo->sent_at, jiffies) || |
1148 | time_after(jiffies, hbinfo->sent_at + max_interval)) { | 1148 | time_after(jiffies, hbinfo->sent_at + max_interval)) { |
1149 | SCTP_DEBUG_PRINTK("%s: HEARTBEAT ACK with invalid timestamp" | 1149 | SCTP_DEBUG_PRINTK("%s: HEARTBEAT ACK with invalid timestamp " |
1150 | "received for transport: %p\n", | 1150 | "received for transport: %p\n", |
1151 | __FUNCTION__, link); | 1151 | __FUNCTION__, link); |
1152 | return SCTP_DISPOSITION_DISCARD; | 1152 | return SCTP_DISPOSITION_DISCARD; |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 53995af9ca4b..22906b803523 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -967,7 +967,7 @@ gss_validate(struct rpc_task *task, __be32 *p) | |||
967 | if (maj_stat == GSS_S_CONTEXT_EXPIRED) | 967 | if (maj_stat == GSS_S_CONTEXT_EXPIRED) |
968 | clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); | 968 | clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); |
969 | if (maj_stat) { | 969 | if (maj_stat) { |
970 | dprintk("RPC: %5u gss_validate: gss_verify_mic returned" | 970 | dprintk("RPC: %5u gss_validate: gss_verify_mic returned " |
971 | "error 0x%08x\n", task->tk_pid, maj_stat); | 971 | "error 0x%08x\n", task->tk_pid, maj_stat); |
972 | goto out_bad; | 972 | goto out_bad; |
973 | } | 973 | } |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 282a9a2ec90c..cd641c8634f0 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -62,7 +62,7 @@ static inline void do_xprt_reserve(struct rpc_task *); | |||
62 | static void xprt_connect_status(struct rpc_task *task); | 62 | static void xprt_connect_status(struct rpc_task *task); |
63 | static int __xprt_get_cong(struct rpc_xprt *, struct rpc_task *); | 63 | static int __xprt_get_cong(struct rpc_xprt *, struct rpc_task *); |
64 | 64 | ||
65 | static spinlock_t xprt_list_lock = SPIN_LOCK_UNLOCKED; | 65 | static DEFINE_SPINLOCK(xprt_list_lock); |
66 | static LIST_HEAD(xprt_list); | 66 | static LIST_HEAD(xprt_list); |
67 | 67 | ||
68 | /* | 68 | /* |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 02298f529dad..2f630a512ab7 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -1828,7 +1828,7 @@ static struct rpc_xprt *xs_setup_xprt(struct xprt_create *args, | |||
1828 | * @args: rpc transport creation arguments | 1828 | * @args: rpc transport creation arguments |
1829 | * | 1829 | * |
1830 | */ | 1830 | */ |
1831 | struct rpc_xprt *xs_setup_udp(struct xprt_create *args) | 1831 | static struct rpc_xprt *xs_setup_udp(struct xprt_create *args) |
1832 | { | 1832 | { |
1833 | struct sockaddr *addr = args->dstaddr; | 1833 | struct sockaddr *addr = args->dstaddr; |
1834 | struct rpc_xprt *xprt; | 1834 | struct rpc_xprt *xprt; |
@@ -1894,7 +1894,7 @@ struct rpc_xprt *xs_setup_udp(struct xprt_create *args) | |||
1894 | * @args: rpc transport creation arguments | 1894 | * @args: rpc transport creation arguments |
1895 | * | 1895 | * |
1896 | */ | 1896 | */ |
1897 | struct rpc_xprt *xs_setup_tcp(struct xprt_create *args) | 1897 | static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args) |
1898 | { | 1898 | { |
1899 | struct sockaddr *addr = args->dstaddr; | 1899 | struct sockaddr *addr = args->dstaddr; |
1900 | struct rpc_xprt *xprt; | 1900 | struct rpc_xprt *xprt; |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index e835da8fc091..060bba4567d2 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -1637,8 +1637,15 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1637 | mutex_lock(&u->readlock); | 1637 | mutex_lock(&u->readlock); |
1638 | 1638 | ||
1639 | skb = skb_recv_datagram(sk, flags, noblock, &err); | 1639 | skb = skb_recv_datagram(sk, flags, noblock, &err); |
1640 | if (!skb) | 1640 | if (!skb) { |
1641 | unix_state_lock(sk); | ||
1642 | /* Signal EOF on disconnected non-blocking SEQPACKET socket. */ | ||
1643 | if (sk->sk_type == SOCK_SEQPACKET && err == -EAGAIN && | ||
1644 | (sk->sk_shutdown & RCV_SHUTDOWN)) | ||
1645 | err = 0; | ||
1646 | unix_state_unlock(sk); | ||
1641 | goto out_unlock; | 1647 | goto out_unlock; |
1648 | } | ||
1642 | 1649 | ||
1643 | wake_up_interruptible_sync(&u->peer_wait); | 1650 | wake_up_interruptible_sync(&u->peer_wait); |
1644 | 1651 | ||
diff --git a/net/wireless/wext.c b/net/wireless/wext.c index 85e5f9dd0d8e..47e80cc2077c 100644 --- a/net/wireless/wext.c +++ b/net/wireless/wext.c | |||
@@ -1094,7 +1094,7 @@ int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd, | |||
1094 | rtnl_lock(); | 1094 | rtnl_lock(); |
1095 | ret = wireless_process_ioctl(net, ifr, cmd); | 1095 | ret = wireless_process_ioctl(net, ifr, cmd); |
1096 | rtnl_unlock(); | 1096 | rtnl_unlock(); |
1097 | if (IW_IS_GET(cmd) && copy_to_user(arg, ifr, sizeof(struct ifreq))) | 1097 | if (IW_IS_GET(cmd) && copy_to_user(arg, ifr, sizeof(struct iwreq))) |
1098 | return -EFAULT; | 1098 | return -EFAULT; |
1099 | return ret; | 1099 | return ret; |
1100 | } | 1100 | } |
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index b702bd8a3893..9a4cf2e45a15 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -1344,6 +1344,7 @@ restart: | |||
1344 | xfrm_nr += pols[0]->xfrm_nr; | 1344 | xfrm_nr += pols[0]->xfrm_nr; |
1345 | 1345 | ||
1346 | switch (policy->action) { | 1346 | switch (policy->action) { |
1347 | default: | ||
1347 | case XFRM_POLICY_BLOCK: | 1348 | case XFRM_POLICY_BLOCK: |
1348 | /* Prohibit the flow */ | 1349 | /* Prohibit the flow */ |
1349 | err = -EPERM; | 1350 | err = -EPERM; |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 224b44e31a07..cf43c49eab37 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -552,7 +552,7 @@ int __xfrm_state_delete(struct xfrm_state *x) | |||
552 | * The xfrm_state_alloc call gives a reference, and that | 552 | * The xfrm_state_alloc call gives a reference, and that |
553 | * is what we are dropping here. | 553 | * is what we are dropping here. |
554 | */ | 554 | */ |
555 | __xfrm_state_put(x); | 555 | xfrm_state_put(x); |
556 | err = 0; | 556 | err = 0; |
557 | } | 557 | } |
558 | 558 | ||
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index d41588d101d0..e75dbdcb08a4 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -507,7 +507,6 @@ static int copy_to_user_state_extra(struct xfrm_state *x, | |||
507 | struct xfrm_usersa_info *p, | 507 | struct xfrm_usersa_info *p, |
508 | struct sk_buff *skb) | 508 | struct sk_buff *skb) |
509 | { | 509 | { |
510 | spin_lock_bh(&x->lock); | ||
511 | copy_to_user_state(x, p); | 510 | copy_to_user_state(x, p); |
512 | 511 | ||
513 | if (x->coaddr) | 512 | if (x->coaddr) |
@@ -515,7 +514,6 @@ static int copy_to_user_state_extra(struct xfrm_state *x, | |||
515 | 514 | ||
516 | if (x->lastused) | 515 | if (x->lastused) |
517 | NLA_PUT_U64(skb, XFRMA_LASTUSED, x->lastused); | 516 | NLA_PUT_U64(skb, XFRMA_LASTUSED, x->lastused); |
518 | spin_unlock_bh(&x->lock); | ||
519 | 517 | ||
520 | if (x->aalg) | 518 | if (x->aalg) |
521 | NLA_PUT(skb, XFRMA_ALG_AUTH, alg_len(x->aalg), x->aalg); | 519 | NLA_PUT(skb, XFRMA_ALG_AUTH, alg_len(x->aalg), x->aalg); |
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index c6bee85c3962..a38787a881ea 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -591,7 +591,6 @@ int main(int ac, char **av) | |||
591 | conf_read_simple(name, S_DEF_USER); | 591 | conf_read_simple(name, S_DEF_USER); |
592 | else if (!stat("all.config", &tmpstat)) | 592 | else if (!stat("all.config", &tmpstat)) |
593 | conf_read_simple("all.config", S_DEF_USER); | 593 | conf_read_simple("all.config", S_DEF_USER); |
594 | conf_set_env_sym("K64BIT", "64BIT", S_DEF_USER); | ||
595 | break; | 594 | break; |
596 | default: | 595 | default: |
597 | break; | 596 | break; |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index e4fa3f302541..e0f402f3b75d 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -145,33 +145,6 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) | |||
145 | return 0; | 145 | return 0; |
146 | } | 146 | } |
147 | 147 | ||
148 | /* Read an environment variable and assign the value to the symbol */ | ||
149 | int conf_set_env_sym(const char *env, const char *symname, int def) | ||
150 | { | ||
151 | struct symbol *sym; | ||
152 | char *p; | ||
153 | int def_flags; | ||
154 | |||
155 | p = getenv(env); | ||
156 | if (p) { | ||
157 | char warning[200]; | ||
158 | sprintf(warning, "Environment variable (%s = \"%s\")", env, p); | ||
159 | conf_filename = warning; | ||
160 | def_flags = SYMBOL_DEF << def; | ||
161 | if (def == S_DEF_USER) { | ||
162 | sym = sym_find(symname); | ||
163 | if (!sym) | ||
164 | return 1; | ||
165 | } else { | ||
166 | sym = sym_lookup(symname, 0); | ||
167 | if (sym->type == S_UNKNOWN) | ||
168 | sym->type = S_OTHER; | ||
169 | } | ||
170 | conf_set_sym_val(sym, def, def_flags, p); | ||
171 | } | ||
172 | return 0; | ||
173 | } | ||
174 | |||
175 | int conf_read_simple(const char *name, int def) | 148 | int conf_read_simple(const char *name, int def) |
176 | { | 149 | { |
177 | FILE *in = NULL; | 150 | FILE *in = NULL; |
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h index dca294e90cc3..4d09f6ddefe3 100644 --- a/scripts/kconfig/lkc_proto.h +++ b/scripts/kconfig/lkc_proto.h | |||
@@ -1,7 +1,6 @@ | |||
1 | 1 | ||
2 | /* confdata.c */ | 2 | /* confdata.c */ |
3 | P(conf_parse,void,(const char *name)); | 3 | P(conf_parse,void,(const char *name)); |
4 | P(conf_set_env_sym,int,(const char *envname, const char *symname, int def)); | ||
5 | P(conf_read,int,(const char *name)); | 4 | P(conf_read,int,(const char *name)); |
6 | P(conf_read_simple,int,(const char *name, int)); | 5 | P(conf_read_simple,int,(const char *name, int)); |
7 | P(conf_write,int,(const char *name)); | 6 | P(conf_write,int,(const char *name)); |