diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-02-06 13:06:40 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-02-07 11:35:08 +0000 |
commit | 11aa09fab727017f60b439c4d140ad8dafac9f45 (patch) | |
tree | 69dcde322a93b9dd634eed3d938d986d7d9c9f9b | |
parent | 35a7c3361e7f7814a7a5afb97a1d5fad74a16c8d (diff) | |
download | alpine_aports-11aa09fab727017f60b439c4d140ad8dafac9f45.tar.bz2 alpine_aports-11aa09fab727017f60b439c4d140ad8dafac9f45.tar.xz alpine_aports-11aa09fab727017f60b439c4d140ad8dafac9f45.zip |
main/linux-grsec: port stable fixes from 3.4.28-3.4.29
(cherry picked from commit 04b8f4d3f4326cd32cffce17c24848316b5cabda)
-rw-r--r-- | main/linux-grsec/APKBUILD | 6 | ||||
-rw-r--r-- | main/linux-grsec/patch-3.6.11-al3.patch (renamed from main/linux-grsec/patch-3.6.11-al2.patch) | 927 |
2 files changed, 906 insertions, 27 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD index cc73138bcd..294ec02e7b 100644 --- a/main/linux-grsec/APKBUILD +++ b/main/linux-grsec/APKBUILD | |||
@@ -4,7 +4,7 @@ _flavor=grsec | |||
4 | pkgname=linux-${_flavor} | 4 | pkgname=linux-${_flavor} |
5 | pkgver=3.6.11 | 5 | pkgver=3.6.11 |
6 | _kernver=3.6 | 6 | _kernver=3.6 |
7 | pkgrel=11 | 7 | pkgrel=12 |
8 | pkgdesc="Linux kernel with grsecurity" | 8 | pkgdesc="Linux kernel with grsecurity" |
9 | url=http://grsecurity.net | 9 | url=http://grsecurity.net |
10 | depends="mkinitfs linux-firmware" | 10 | depends="mkinitfs linux-firmware" |
@@ -14,7 +14,7 @@ _config=${config:-kernelconfig.${CARCH}} | |||
14 | install= | 14 | install= |
15 | source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz | 15 | source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz |
16 | http://ftp.kernel.org/pub/linux/kernel/v3.x/patch-$pkgver.xz | 16 | http://ftp.kernel.org/pub/linux/kernel/v3.x/patch-$pkgver.xz |
17 | patch-3.6.11-al2.patch | 17 | patch-3.6.11-al3.patch |
18 | grsecurity-2.9.1-3.6.11-al1-unofficial-0.patch | 18 | grsecurity-2.9.1-3.6.11-al1-unofficial-0.patch |
19 | 19 | ||
20 | 0004-arp-flush-arp-cache-on-device-change.patch | 20 | 0004-arp-flush-arp-cache-on-device-change.patch |
@@ -151,7 +151,7 @@ dev() { | |||
151 | 151 | ||
152 | md5sums="1a1760420eac802c541a20ab51a093d1 linux-3.6.tar.xz | 152 | md5sums="1a1760420eac802c541a20ab51a093d1 linux-3.6.tar.xz |
153 | bd4bba74093405887d521309a74c19e9 patch-3.6.11.xz | 153 | bd4bba74093405887d521309a74c19e9 patch-3.6.11.xz |
154 | 4d225839f004e4133c5fa48b7ca0ddf5 patch-3.6.11-al2.patch | 154 | ca40e52ffe0519221fc07c25bedfc346 patch-3.6.11-al3.patch |
155 | 3838e6334ed957fd73e793e1816fe66c grsecurity-2.9.1-3.6.11-al1-unofficial-0.patch | 155 | 3838e6334ed957fd73e793e1816fe66c grsecurity-2.9.1-3.6.11-al1-unofficial-0.patch |
156 | 776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch | 156 | 776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch |
157 | daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch | 157 | daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch |
diff --git a/main/linux-grsec/patch-3.6.11-al2.patch b/main/linux-grsec/patch-3.6.11-al3.patch index 3139bf3a63..91e87fef2f 100644 --- a/main/linux-grsec/patch-3.6.11-al2.patch +++ b/main/linux-grsec/patch-3.6.11-al3.patch | |||
@@ -15,6 +15,19 @@ index df74518..ab1017b 100644 | |||
15 | 15 | ||
16 | info.si_signo = SIGSEGV; | 16 | info.si_signo = SIGSEGV; |
17 | info.si_errno = 0; | 17 | info.si_errno = 0; |
18 | diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c | ||
19 | index bd0e88c..c2ff99c 100644 | ||
20 | --- a/arch/arm/mach-at91/setup.c | ||
21 | +++ b/arch/arm/mach-at91/setup.c | ||
22 | @@ -104,6 +104,8 @@ static void __init soc_detect(u32 dbgu_base) | ||
23 | switch (socid) { | ||
24 | case ARCH_ID_AT91RM9200: | ||
25 | at91_soc_initdata.type = AT91_SOC_RM9200; | ||
26 | + if (at91_soc_initdata.subtype == AT91_SOC_SUBTYPE_NONE) | ||
27 | + at91_soc_initdata.subtype = AT91_SOC_RM9200_BGA; | ||
28 | at91_boot_soc = at91rm9200_soc; | ||
29 | break; | ||
30 | |||
18 | diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h | 31 | diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h |
19 | index a611ad3..b6132aa 100644 | 32 | index a611ad3..b6132aa 100644 |
20 | --- a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h | 33 | --- a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h |
@@ -58,6 +71,54 @@ index 124bce6..a301e61 100644 | |||
58 | #define REALVIEW_EB11MP_L220_BASE 0x10102000 /* L220 registers */ | 71 | #define REALVIEW_EB11MP_L220_BASE 0x10102000 /* L220 registers */ |
59 | #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0xD8 /* Register offset for MPCore sysctl */ | 72 | #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0xD8 /* Register offset for MPCore sysctl */ |
60 | #else | 73 | #else |
74 | diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c | ||
75 | index 13f555d..357fc03 100644 | ||
76 | --- a/arch/arm/mm/dma-mapping.c | ||
77 | +++ b/arch/arm/mm/dma-mapping.c | ||
78 | @@ -729,25 +729,27 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset, | ||
79 | size_t size, enum dma_data_direction dir, | ||
80 | void (*op)(const void *, size_t, int)) | ||
81 | { | ||
82 | + unsigned long pfn; | ||
83 | + size_t left = size; | ||
84 | + | ||
85 | + pfn = page_to_pfn(page) + offset / PAGE_SIZE; | ||
86 | + offset %= PAGE_SIZE; | ||
87 | + | ||
88 | /* | ||
89 | * A single sg entry may refer to multiple physically contiguous | ||
90 | * pages. But we still need to process highmem pages individually. | ||
91 | * If highmem is not configured then the bulk of this loop gets | ||
92 | * optimized out. | ||
93 | */ | ||
94 | - size_t left = size; | ||
95 | do { | ||
96 | size_t len = left; | ||
97 | void *vaddr; | ||
98 | |||
99 | + page = pfn_to_page(pfn); | ||
100 | + | ||
101 | if (PageHighMem(page)) { | ||
102 | - if (len + offset > PAGE_SIZE) { | ||
103 | - if (offset >= PAGE_SIZE) { | ||
104 | - page += offset / PAGE_SIZE; | ||
105 | - offset %= PAGE_SIZE; | ||
106 | - } | ||
107 | + if (len + offset > PAGE_SIZE) | ||
108 | len = PAGE_SIZE - offset; | ||
109 | - } | ||
110 | vaddr = kmap_high_get(page); | ||
111 | if (vaddr) { | ||
112 | vaddr += offset; | ||
113 | @@ -764,7 +766,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset, | ||
114 | op(vaddr, len, dir); | ||
115 | } | ||
116 | offset = 0; | ||
117 | - page++; | ||
118 | + pfn++; | ||
119 | left -= len; | ||
120 | } while (left); | ||
121 | } | ||
61 | diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c | 122 | diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c |
62 | index c2fa21d..b68b531 100644 | 123 | index c2fa21d..b68b531 100644 |
63 | --- a/arch/arm/mm/mmu.c | 124 | --- a/arch/arm/mm/mmu.c |
@@ -71,6 +132,59 @@ index c2fa21d..b68b531 100644 | |||
71 | protection_map[i] = __pgprot(v | user_pgprot); | 132 | protection_map[i] = __pgprot(v | user_pgprot); |
72 | } | 133 | } |
73 | 134 | ||
135 | diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S | ||
136 | index cc926c9..323ce1a 100644 | ||
137 | --- a/arch/arm/vfp/entry.S | ||
138 | +++ b/arch/arm/vfp/entry.S | ||
139 | @@ -22,7 +22,7 @@ | ||
140 | @ IRQs disabled. | ||
141 | @ | ||
142 | ENTRY(do_vfp) | ||
143 | -#ifdef CONFIG_PREEMPT | ||
144 | +#ifdef CONFIG_PREEMPT_COUNT | ||
145 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | ||
146 | add r11, r4, #1 @ increment it | ||
147 | str r11, [r10, #TI_PREEMPT] | ||
148 | @@ -35,7 +35,7 @@ ENTRY(do_vfp) | ||
149 | ENDPROC(do_vfp) | ||
150 | |||
151 | ENTRY(vfp_null_entry) | ||
152 | -#ifdef CONFIG_PREEMPT | ||
153 | +#ifdef CONFIG_PREEMPT_COUNT | ||
154 | get_thread_info r10 | ||
155 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | ||
156 | sub r11, r4, #1 @ decrement it | ||
157 | @@ -53,7 +53,7 @@ ENDPROC(vfp_null_entry) | ||
158 | |||
159 | __INIT | ||
160 | ENTRY(vfp_testing_entry) | ||
161 | -#ifdef CONFIG_PREEMPT | ||
162 | +#ifdef CONFIG_PREEMPT_COUNT | ||
163 | get_thread_info r10 | ||
164 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | ||
165 | sub r11, r4, #1 @ decrement it | ||
166 | diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S | ||
167 | index ea0349f..dd5e56f 100644 | ||
168 | --- a/arch/arm/vfp/vfphw.S | ||
169 | +++ b/arch/arm/vfp/vfphw.S | ||
170 | @@ -168,7 +168,7 @@ vfp_hw_state_valid: | ||
171 | @ else it's one 32-bit instruction, so | ||
172 | @ always subtract 4 from the following | ||
173 | @ instruction address. | ||
174 | -#ifdef CONFIG_PREEMPT | ||
175 | +#ifdef CONFIG_PREEMPT_COUNT | ||
176 | get_thread_info r10 | ||
177 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | ||
178 | sub r11, r4, #1 @ decrement it | ||
179 | @@ -192,7 +192,7 @@ look_for_VFP_exceptions: | ||
180 | @ not recognised by VFP | ||
181 | |||
182 | DBGSTR "not VFP" | ||
183 | -#ifdef CONFIG_PREEMPT | ||
184 | +#ifdef CONFIG_PREEMPT_COUNT | ||
185 | get_thread_info r10 | ||
186 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | ||
187 | sub r11, r4, #1 @ decrement it | ||
74 | diff --git a/arch/cris/include/asm/io.h b/arch/cris/include/asm/io.h | 188 | diff --git a/arch/cris/include/asm/io.h b/arch/cris/include/asm/io.h |
75 | index 32567bc..ac12ae2 100644 | 189 | index 32567bc..ac12ae2 100644 |
76 | --- a/arch/cris/include/asm/io.h | 190 | --- a/arch/cris/include/asm/io.h |
@@ -319,16 +433,31 @@ index 8f8e8ee..2a6919e 100644 | |||
319 | jmp iret_exc | 433 | jmp iret_exc |
320 | 5: pushl_cfi $-1 /* orig_ax = -1 => not a system call */ | 434 | 5: pushl_cfi $-1 /* orig_ax = -1 => not a system call */ |
321 | SAVE_ALL | 435 | SAVE_ALL |
436 | diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c | ||
437 | index eb11369..8563b64 100644 | ||
438 | --- a/arch/x86/kernel/msr.c | ||
439 | +++ b/arch/x86/kernel/msr.c | ||
440 | @@ -174,6 +174,9 @@ static int msr_open(struct inode *inode, struct file *file) | ||
441 | unsigned int cpu; | ||
442 | struct cpuinfo_x86 *c; | ||
443 | |||
444 | + if (!capable(CAP_SYS_RAWIO)) | ||
445 | + return -EPERM; | ||
446 | + | ||
447 | cpu = iminor(file->f_path.dentry->d_inode); | ||
448 | if (cpu >= nr_cpu_ids || !cpu_online(cpu)) | ||
449 | return -ENXIO; /* No such CPU */ | ||
322 | diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c | 450 | diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c |
323 | index 5cee802..53339c1 100644 | 451 | index 5cee802..b328612 100644 |
324 | --- a/arch/x86/kernel/setup.c | 452 | --- a/arch/x86/kernel/setup.c |
325 | +++ b/arch/x86/kernel/setup.c | 453 | +++ b/arch/x86/kernel/setup.c |
326 | @@ -613,6 +613,81 @@ static __init void reserve_ibft_region(void) | 454 | @@ -613,6 +613,83 @@ static __init void reserve_ibft_region(void) |
327 | 455 | ||
328 | static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10; | 456 | static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10; |
329 | 457 | ||
330 | +static bool __init snb_gfx_workaround_needed(void) | 458 | +static bool __init snb_gfx_workaround_needed(void) |
331 | +{ | 459 | +{ |
460 | +#ifdef CONFIG_PCI | ||
332 | + int i; | 461 | + int i; |
333 | + u16 vendor, devid; | 462 | + u16 vendor, devid; |
334 | + static const u16 snb_ids[] = { | 463 | + static const u16 snb_ids[] = { |
@@ -353,6 +482,7 @@ index 5cee802..53339c1 100644 | |||
353 | + for (i = 0; i < ARRAY_SIZE(snb_ids); i++) | 482 | + for (i = 0; i < ARRAY_SIZE(snb_ids); i++) |
354 | + if (devid == snb_ids[i]) | 483 | + if (devid == snb_ids[i]) |
355 | + return true; | 484 | + return true; |
485 | +#endif | ||
356 | + | 486 | + |
357 | + return false; | 487 | + return false; |
358 | +} | 488 | +} |
@@ -405,7 +535,7 @@ index 5cee802..53339c1 100644 | |||
405 | static void __init trim_bios_range(void) | 535 | static void __init trim_bios_range(void) |
406 | { | 536 | { |
407 | /* | 537 | /* |
408 | @@ -633,6 +708,7 @@ static void __init trim_bios_range(void) | 538 | @@ -633,6 +710,7 @@ static void __init trim_bios_range(void) |
409 | * take them out. | 539 | * take them out. |
410 | */ | 540 | */ |
411 | e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1); | 541 | e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1); |
@@ -413,7 +543,7 @@ index 5cee802..53339c1 100644 | |||
413 | sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); | 543 | sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); |
414 | } | 544 | } |
415 | 545 | ||
416 | @@ -911,6 +987,8 @@ void __init setup_arch(char **cmdline_p) | 546 | @@ -911,6 +989,8 @@ void __init setup_arch(char **cmdline_p) |
417 | 547 | ||
418 | setup_real_mode(); | 548 | setup_real_mode(); |
419 | 549 | ||
@@ -422,6 +552,69 @@ index 5cee802..53339c1 100644 | |||
422 | init_gbpages(); | 552 | init_gbpages(); |
423 | 553 | ||
424 | /* max_pfn_mapped is updated here */ | 554 | /* max_pfn_mapped is updated here */ |
555 | diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c | ||
556 | index 72d8899..6825327 100644 | ||
557 | --- a/arch/x86/platform/efi/efi.c | ||
558 | +++ b/arch/x86/platform/efi/efi.c | ||
559 | @@ -900,7 +900,7 @@ void __init efi_enter_virtual_mode(void) | ||
560 | * | ||
561 | * Call EFI services through wrapper functions. | ||
562 | */ | ||
563 | - efi.runtime_version = efi_systab.fw_revision; | ||
564 | + efi.runtime_version = efi_systab.hdr.revision; | ||
565 | efi.get_time = virt_efi_get_time; | ||
566 | efi.set_time = virt_efi_set_time; | ||
567 | efi.get_wakeup_time = virt_efi_get_wakeup_time; | ||
568 | diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c | ||
569 | index ac3aa54..0fba86d 100644 | ||
570 | --- a/arch/x86/platform/efi/efi_64.c | ||
571 | +++ b/arch/x86/platform/efi/efi_64.c | ||
572 | @@ -38,7 +38,7 @@ | ||
573 | #include <asm/cacheflush.h> | ||
574 | #include <asm/fixmap.h> | ||
575 | |||
576 | -static pgd_t save_pgd __initdata; | ||
577 | +static pgd_t *save_pgd __initdata; | ||
578 | static unsigned long efi_flags __initdata; | ||
579 | |||
580 | static void __init early_code_mapping_set_exec(int executable) | ||
581 | @@ -61,12 +61,20 @@ static void __init early_code_mapping_set_exec(int executable) | ||
582 | void __init efi_call_phys_prelog(void) | ||
583 | { | ||
584 | unsigned long vaddress; | ||
585 | + int pgd; | ||
586 | + int n_pgds; | ||
587 | |||
588 | early_code_mapping_set_exec(1); | ||
589 | local_irq_save(efi_flags); | ||
590 | - vaddress = (unsigned long)__va(0x0UL); | ||
591 | - save_pgd = *pgd_offset_k(0x0UL); | ||
592 | - set_pgd(pgd_offset_k(0x0UL), *pgd_offset_k(vaddress)); | ||
593 | + | ||
594 | + n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT), PGDIR_SIZE); | ||
595 | + save_pgd = kmalloc(n_pgds * sizeof(pgd_t), GFP_KERNEL); | ||
596 | + | ||
597 | + for (pgd = 0; pgd < n_pgds; pgd++) { | ||
598 | + save_pgd[pgd] = *pgd_offset_k(pgd * PGDIR_SIZE); | ||
599 | + vaddress = (unsigned long)__va(pgd * PGDIR_SIZE); | ||
600 | + set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), *pgd_offset_k(vaddress)); | ||
601 | + } | ||
602 | __flush_tlb_all(); | ||
603 | } | ||
604 | |||
605 | @@ -75,7 +83,11 @@ void __init efi_call_phys_epilog(void) | ||
606 | /* | ||
607 | * After the lock is released, the original page table is restored. | ||
608 | */ | ||
609 | - set_pgd(pgd_offset_k(0x0UL), save_pgd); | ||
610 | + int pgd; | ||
611 | + int n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT) , PGDIR_SIZE); | ||
612 | + for (pgd = 0; pgd < n_pgds; pgd++) | ||
613 | + set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), save_pgd[pgd]); | ||
614 | + kfree(save_pgd); | ||
615 | __flush_tlb_all(); | ||
616 | local_irq_restore(efi_flags); | ||
617 | early_code_mapping_set_exec(0); | ||
425 | diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c | 618 | diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c |
426 | index ad3730b..aac684d 100644 | 619 | index ad3730b..aac684d 100644 |
427 | --- a/drivers/acpi/processor_idle.c | 620 | --- a/drivers/acpi/processor_idle.c |
@@ -1291,6 +1484,19 @@ index f7f1dc6..ed0e8b7 100644 | |||
1291 | 1484 | ||
1292 | /* skip validate if the capability is not present */ | 1485 | /* skip validate if the capability is not present */ |
1293 | if (!dma_has_cap(DMA_XOR_VAL, dma_chan->device->cap_mask)) | 1486 | if (!dma_has_cap(DMA_XOR_VAL, dma_chan->device->cap_mask)) |
1487 | diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c | ||
1488 | index e164c55..1bfb207 100644 | ||
1489 | --- a/drivers/edac/edac_pci_sysfs.c | ||
1490 | +++ b/drivers/edac/edac_pci_sysfs.c | ||
1491 | @@ -256,7 +256,7 @@ static ssize_t edac_pci_dev_store(struct kobject *kobj, | ||
1492 | struct edac_pci_dev_attribute *edac_pci_dev; | ||
1493 | edac_pci_dev = (struct edac_pci_dev_attribute *)attr; | ||
1494 | |||
1495 | - if (edac_pci_dev->show) | ||
1496 | + if (edac_pci_dev->store) | ||
1497 | return edac_pci_dev->store(edac_pci_dev->value, buffer, count); | ||
1498 | return -EIO; | ||
1499 | } | ||
1294 | diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c | 1500 | diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c |
1295 | index 08c6749..638e1f7 100644 | 1501 | index 08c6749..638e1f7 100644 |
1296 | --- a/drivers/firewire/net.c | 1502 | --- a/drivers/firewire/net.c |
@@ -1734,8 +1940,22 @@ index 895e628..a7e797c 100644 | |||
1734 | ret = connector_status_connected; | 1940 | ret = connector_status_connected; |
1735 | } | 1941 | } |
1736 | } | 1942 | } |
1943 | diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c | ||
1944 | index 8794744..f1b951d 100644 | ||
1945 | --- a/drivers/gpu/drm/radeon/radeon_cursor.c | ||
1946 | +++ b/drivers/gpu/drm/radeon/radeon_cursor.c | ||
1947 | @@ -240,7 +240,8 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc, | ||
1948 | y = 0; | ||
1949 | } | ||
1950 | |||
1951 | - if (ASIC_IS_AVIVO(rdev)) { | ||
1952 | + /* fixed on DCE6 and newer */ | ||
1953 | + if (ASIC_IS_AVIVO(rdev) && !ASIC_IS_DCE6(rdev)) { | ||
1954 | int i = 0; | ||
1955 | struct drm_crtc *crtc_p; | ||
1956 | |||
1737 | diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c | 1957 | diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c |
1738 | index 7ddef8f..0125d34 100644 | 1958 | index 7ddef8f..9bd2569 100644 |
1739 | --- a/drivers/gpu/drm/radeon/radeon_display.c | 1959 | --- a/drivers/gpu/drm/radeon/radeon_display.c |
1740 | +++ b/drivers/gpu/drm/radeon/radeon_display.c | 1960 | +++ b/drivers/gpu/drm/radeon/radeon_display.c |
1741 | @@ -695,10 +695,15 @@ int radeon_ddc_get_modes(struct radeon_connector *radeon_connector) | 1961 | @@ -695,10 +695,15 @@ int radeon_ddc_get_modes(struct radeon_connector *radeon_connector) |
@@ -1758,6 +1978,15 @@ index 7ddef8f..0125d34 100644 | |||
1758 | struct radeon_connector_atom_dig *dig = radeon_connector->con_priv; | 1978 | struct radeon_connector_atom_dig *dig = radeon_connector->con_priv; |
1759 | 1979 | ||
1760 | if ((dig->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT || | 1980 | if ((dig->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT || |
1981 | @@ -1113,7 +1118,7 @@ radeon_user_framebuffer_create(struct drm_device *dev, | ||
1982 | if (ret) { | ||
1983 | kfree(radeon_fb); | ||
1984 | drm_gem_object_unreference_unlocked(obj); | ||
1985 | - return NULL; | ||
1986 | + return ERR_PTR(ret); | ||
1987 | } | ||
1988 | |||
1989 | return &radeon_fb->base; | ||
1761 | diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c | 1990 | diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c |
1762 | index 3edec1c..6076e85 100644 | 1991 | index 3edec1c..6076e85 100644 |
1763 | --- a/drivers/gpu/drm/radeon/radeon_i2c.c | 1992 | --- a/drivers/gpu/drm/radeon/radeon_i2c.c |
@@ -2115,8 +2344,60 @@ index d6cc77a..5f306f7 100644 | |||
2115 | #endif /* CONFIG_X86 */ | 2344 | #endif /* CONFIG_X86 */ |
2116 | 2345 | ||
2117 | return retval; | 2346 | return retval; |
2347 | diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c | ||
2348 | index 18a89b7..e69ece6 100644 | ||
2349 | --- a/drivers/iommu/amd_iommu_init.c | ||
2350 | +++ b/drivers/iommu/amd_iommu_init.c | ||
2351 | @@ -906,6 +906,38 @@ static void __init free_iommu_all(void) | ||
2352 | } | ||
2353 | |||
2354 | /* | ||
2355 | + * Family15h Model 10h-1fh erratum 746 (IOMMU Logging May Stall Translations) | ||
2356 | + * Workaround: | ||
2357 | + * BIOS should disable L2B micellaneous clock gating by setting | ||
2358 | + * L2_L2B_CK_GATE_CONTROL[CKGateL2BMiscDisable](D0F2xF4_x90[2]) = 1b | ||
2359 | + */ | ||
2360 | +static void __init amd_iommu_erratum_746_workaround(struct amd_iommu *iommu) | ||
2361 | +{ | ||
2362 | + u32 value; | ||
2363 | + | ||
2364 | + if ((boot_cpu_data.x86 != 0x15) || | ||
2365 | + (boot_cpu_data.x86_model < 0x10) || | ||
2366 | + (boot_cpu_data.x86_model > 0x1f)) | ||
2367 | + return; | ||
2368 | + | ||
2369 | + pci_write_config_dword(iommu->dev, 0xf0, 0x90); | ||
2370 | + pci_read_config_dword(iommu->dev, 0xf4, &value); | ||
2371 | + | ||
2372 | + if (value & BIT(2)) | ||
2373 | + return; | ||
2374 | + | ||
2375 | + /* Select NB indirect register 0x90 and enable writing */ | ||
2376 | + pci_write_config_dword(iommu->dev, 0xf0, 0x90 | (1 << 8)); | ||
2377 | + | ||
2378 | + pci_write_config_dword(iommu->dev, 0xf4, value | 0x4); | ||
2379 | + pr_info("AMD-Vi: Applying erratum 746 workaround for IOMMU at %s\n", | ||
2380 | + dev_name(&iommu->dev->dev)); | ||
2381 | + | ||
2382 | + /* Clear the enable writing bit */ | ||
2383 | + pci_write_config_dword(iommu->dev, 0xf0, 0x90); | ||
2384 | +} | ||
2385 | + | ||
2386 | +/* | ||
2387 | * This function clues the initialization function for one IOMMU | ||
2388 | * together and also allocates the command buffer and programs the | ||
2389 | * hardware. It does NOT enable the IOMMU. This is done afterwards. | ||
2390 | @@ -1092,6 +1124,8 @@ static int iommu_init_pci(struct amd_iommu *iommu) | ||
2391 | iommu->stored_l2[i] = iommu_read_l2(iommu, i); | ||
2392 | } | ||
2393 | |||
2394 | + amd_iommu_erratum_746_workaround(iommu); | ||
2395 | + | ||
2396 | return pci_enable_device(iommu->dev); | ||
2397 | } | ||
2398 | |||
2118 | diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c | 2399 | diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c |
2119 | index 554e6ac..c646a8e 100644 | 2400 | index 554e6ac..04fb7af 100644 |
2120 | --- a/drivers/iommu/intel-iommu.c | 2401 | --- a/drivers/iommu/intel-iommu.c |
2121 | +++ b/drivers/iommu/intel-iommu.c | 2402 | +++ b/drivers/iommu/intel-iommu.c |
2122 | @@ -1827,10 +1827,17 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, | 2403 | @@ -1827,10 +1827,17 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, |
@@ -2179,6 +2460,41 @@ index 554e6ac..c646a8e 100644 | |||
2179 | if ((iommu_identity_mapping & IDENTMAP_AZALIA) && IS_AZALIA(pdev)) | 2460 | if ((iommu_identity_mapping & IDENTMAP_AZALIA) && IS_AZALIA(pdev)) |
2180 | return 1; | 2461 | return 1; |
2181 | 2462 | ||
2463 | @@ -4196,6 +4234,21 @@ static struct iommu_ops intel_iommu_ops = { | ||
2464 | .pgsize_bitmap = INTEL_IOMMU_PGSIZES, | ||
2465 | }; | ||
2466 | |||
2467 | +static void __devinit quirk_iommu_g4x_gfx(struct pci_dev *dev) | ||
2468 | +{ | ||
2469 | + /* G4x/GM45 integrated gfx dmar support is totally busted. */ | ||
2470 | + printk(KERN_INFO "DMAR: Disabling IOMMU for graphics on this chipset\n"); | ||
2471 | + dmar_map_gfx = 0; | ||
2472 | +} | ||
2473 | + | ||
2474 | +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_g4x_gfx); | ||
2475 | +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e00, quirk_iommu_g4x_gfx); | ||
2476 | +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e10, quirk_iommu_g4x_gfx); | ||
2477 | +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e20, quirk_iommu_g4x_gfx); | ||
2478 | +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e30, quirk_iommu_g4x_gfx); | ||
2479 | +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e40, quirk_iommu_g4x_gfx); | ||
2480 | +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e90, quirk_iommu_g4x_gfx); | ||
2481 | + | ||
2482 | static void __devinit quirk_iommu_rwbf(struct pci_dev *dev) | ||
2483 | { | ||
2484 | /* | ||
2485 | @@ -4204,12 +4257,6 @@ static void __devinit quirk_iommu_rwbf(struct pci_dev *dev) | ||
2486 | */ | ||
2487 | printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n"); | ||
2488 | rwbf_quirk = 1; | ||
2489 | - | ||
2490 | - /* https://bugzilla.redhat.com/show_bug.cgi?id=538163 */ | ||
2491 | - if (dev->revision == 0x07) { | ||
2492 | - printk(KERN_INFO "DMAR: Disabling IOMMU for graphics on this chipset\n"); | ||
2493 | - dmar_map_gfx = 0; | ||
2494 | - } | ||
2495 | } | ||
2496 | |||
2497 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf); | ||
2182 | diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c | 2498 | diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c |
2183 | index afd9598..a651d52 100644 | 2499 | index afd9598..a651d52 100644 |
2184 | --- a/drivers/md/dm-ioctl.c | 2500 | --- a/drivers/md/dm-ioctl.c |
@@ -2751,6 +3067,28 @@ index a1f4332..b27e215 100644 | |||
2751 | /* Choose NAND mode. */ | 3067 | /* Choose NAND mode. */ |
2752 | writel(BM_GPMI_CTRL1_GPMI_MODE, r->gpmi_regs + HW_GPMI_CTRL1_CLR); | 3068 | writel(BM_GPMI_CTRL1_GPMI_MODE, r->gpmi_regs + HW_GPMI_CTRL1_CLR); |
2753 | 3069 | ||
3070 | diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c | ||
3071 | index 4c538e3..f56a48e 100644 | ||
3072 | --- a/drivers/net/can/c_can/c_can.c | ||
3073 | +++ b/drivers/net/can/c_can/c_can.c | ||
3074 | @@ -918,7 +918,7 @@ static int c_can_handle_bus_err(struct net_device *dev, | ||
3075 | break; | ||
3076 | case LEC_ACK_ERROR: | ||
3077 | netdev_dbg(dev, "ack error\n"); | ||
3078 | - cf->data[2] |= (CAN_ERR_PROT_LOC_ACK | | ||
3079 | + cf->data[3] |= (CAN_ERR_PROT_LOC_ACK | | ||
3080 | CAN_ERR_PROT_LOC_ACK_DEL); | ||
3081 | break; | ||
3082 | case LEC_BIT1_ERROR: | ||
3083 | @@ -931,7 +931,7 @@ static int c_can_handle_bus_err(struct net_device *dev, | ||
3084 | break; | ||
3085 | case LEC_CRC_ERROR: | ||
3086 | netdev_dbg(dev, "CRC error\n"); | ||
3087 | - cf->data[2] |= (CAN_ERR_PROT_LOC_CRC_SEQ | | ||
3088 | + cf->data[3] |= (CAN_ERR_PROT_LOC_CRC_SEQ | | ||
3089 | CAN_ERR_PROT_LOC_CRC_DEL); | ||
3090 | break; | ||
3091 | default: | ||
2754 | diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c | 3092 | diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c |
2755 | index 963e2cc..8233e5e 100644 | 3093 | index 963e2cc..8233e5e 100644 |
2756 | --- a/drivers/net/can/dev.c | 3094 | --- a/drivers/net/can/dev.c |
@@ -2765,6 +3103,38 @@ index 963e2cc..8233e5e 100644 | |||
2765 | can_flush_echo_skb(dev); | 3103 | can_flush_echo_skb(dev); |
2766 | } | 3104 | } |
2767 | EXPORT_SYMBOL_GPL(close_candev); | 3105 | EXPORT_SYMBOL_GPL(close_candev); |
3106 | diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c | ||
3107 | index 48b3d62..7a43d4d 100644 | ||
3108 | --- a/drivers/net/can/pch_can.c | ||
3109 | +++ b/drivers/net/can/pch_can.c | ||
3110 | @@ -560,7 +560,7 @@ static void pch_can_error(struct net_device *ndev, u32 status) | ||
3111 | stats->rx_errors++; | ||
3112 | break; | ||
3113 | case PCH_CRC_ERR: | ||
3114 | - cf->data[2] |= CAN_ERR_PROT_LOC_CRC_SEQ | | ||
3115 | + cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ | | ||
3116 | CAN_ERR_PROT_LOC_CRC_DEL; | ||
3117 | priv->can.can_stats.bus_error++; | ||
3118 | stats->rx_errors++; | ||
3119 | diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c | ||
3120 | index 9ded21e..44996a9 100644 | ||
3121 | --- a/drivers/net/can/ti_hecc.c | ||
3122 | +++ b/drivers/net/can/ti_hecc.c | ||
3123 | @@ -746,12 +746,12 @@ static int ti_hecc_error(struct net_device *ndev, int int_status, | ||
3124 | } | ||
3125 | if (err_status & HECC_CANES_CRCE) { | ||
3126 | hecc_set_bit(priv, HECC_CANES, HECC_CANES_CRCE); | ||
3127 | - cf->data[2] |= CAN_ERR_PROT_LOC_CRC_SEQ | | ||
3128 | + cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ | | ||
3129 | CAN_ERR_PROT_LOC_CRC_DEL; | ||
3130 | } | ||
3131 | if (err_status & HECC_CANES_ACKE) { | ||
3132 | hecc_set_bit(priv, HECC_CANES, HECC_CANES_ACKE); | ||
3133 | - cf->data[2] |= CAN_ERR_PROT_LOC_ACK | | ||
3134 | + cf->data[3] |= CAN_ERR_PROT_LOC_ACK | | ||
3135 | CAN_ERR_PROT_LOC_ACK_DEL; | ||
3136 | } | ||
3137 | } | ||
2768 | diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c | 3138 | diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c |
2769 | index 48cc4fb..b1b8e96 100644 | 3139 | index 48cc4fb..b1b8e96 100644 |
2770 | --- a/drivers/net/ethernet/intel/igb/igb_main.c | 3140 | --- a/drivers/net/ethernet/intel/igb/igb_main.c |
@@ -3100,6 +3470,18 @@ index 3a1ff55..a633aea 100644 | |||
3100 | 3470 | ||
3101 | enum targetPowerHTRates { | 3471 | enum targetPowerHTRates { |
3102 | HT_TARGET_RATE_0_8_16, | 3472 | HT_TARGET_RATE_0_8_16, |
3473 | diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c | ||
3474 | index 1b48414..4527d0d 100644 | ||
3475 | --- a/drivers/net/wireless/ath/ath9k/beacon.c | ||
3476 | +++ b/drivers/net/wireless/ath/ath9k/beacon.c | ||
3477 | @@ -147,6 +147,7 @@ static struct ath_buf *ath9k_beacon_generate(struct ieee80211_hw *hw, | ||
3478 | skb->len, DMA_TO_DEVICE); | ||
3479 | dev_kfree_skb_any(skb); | ||
3480 | bf->bf_buf_addr = 0; | ||
3481 | + bf->bf_mpdu = NULL; | ||
3482 | } | ||
3483 | |||
3484 | skb = ieee80211_beacon_get(hw, vif); | ||
3103 | diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c | 3485 | diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c |
3104 | index e5cceb0..bbd249d 100644 | 3486 | index e5cceb0..bbd249d 100644 |
3105 | --- a/drivers/net/wireless/ath/ath9k/calib.c | 3487 | --- a/drivers/net/wireless/ath/ath9k/calib.c |
@@ -3126,6 +3508,51 @@ index 1060c19..60dcb6c 100644 | |||
3126 | #define NUM_NF_READINGS 6 | 3508 | #define NUM_NF_READINGS 6 |
3127 | #define ATH9K_NF_CAL_HIST_MAX 5 | 3509 | #define ATH9K_NF_CAL_HIST_MAX 5 |
3128 | 3510 | ||
3511 | diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c | ||
3512 | index 4a9570d..aac4a40 100644 | ||
3513 | --- a/drivers/net/wireless/ath/ath9k/htc_hst.c | ||
3514 | +++ b/drivers/net/wireless/ath/ath9k/htc_hst.c | ||
3515 | @@ -344,6 +344,8 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle, | ||
3516 | endpoint->ep_callbacks.tx(endpoint->ep_callbacks.priv, | ||
3517 | skb, htc_hdr->endpoint_id, | ||
3518 | txok); | ||
3519 | + } else { | ||
3520 | + kfree_skb(skb); | ||
3521 | } | ||
3522 | } | ||
3523 | |||
3524 | diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c | ||
3525 | index 4480c0c..6b12d48 100644 | ||
3526 | --- a/drivers/net/wireless/ath/ath9k/recv.c | ||
3527 | +++ b/drivers/net/wireless/ath/ath9k/recv.c | ||
3528 | @@ -744,6 +744,7 @@ static struct ath_buf *ath_get_next_rx_buf(struct ath_softc *sc, | ||
3529 | return NULL; | ||
3530 | } | ||
3531 | |||
3532 | + list_del(&bf->list); | ||
3533 | if (!bf->bf_mpdu) | ||
3534 | return bf; | ||
3535 | |||
3536 | @@ -1251,14 +1252,15 @@ requeue_drop_frag: | ||
3537 | sc->rx.frag = NULL; | ||
3538 | } | ||
3539 | requeue: | ||
3540 | + list_add_tail(&bf->list, &sc->rx.rxbuf); | ||
3541 | + if (flush) | ||
3542 | + continue; | ||
3543 | + | ||
3544 | if (edma) { | ||
3545 | - list_add_tail(&bf->list, &sc->rx.rxbuf); | ||
3546 | ath_rx_edma_buf_link(sc, qtype); | ||
3547 | } else { | ||
3548 | - list_move_tail(&bf->list, &sc->rx.rxbuf); | ||
3549 | ath_rx_buf_link(sc, bf); | ||
3550 | - if (!flush) | ||
3551 | - ath9k_hw_rxena(ah); | ||
3552 | + ath9k_hw_rxena(ah); | ||
3553 | } | ||
3554 | } while (1); | ||
3555 | |||
3129 | diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h | 3556 | diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h |
3130 | index 7c899fc..ac593ab 100644 | 3557 | index 7c899fc..ac593ab 100644 |
3131 | --- a/drivers/net/wireless/b43/b43.h | 3558 | --- a/drivers/net/wireless/b43/b43.h |
@@ -3485,6 +3912,120 @@ index 0ef08e0..aa87fb7 100644 | |||
3485 | if (err) | 3912 | if (err) |
3486 | goto err_load; | 3913 | goto err_load; |
3487 | } | 3914 | } |
3915 | diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | ||
3916 | index a5edebe..c110674 100644 | ||
3917 | --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | ||
3918 | +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | ||
3919 | @@ -1394,9 +1394,10 @@ void brcms_add_timer(struct brcms_timer *t, uint ms, int periodic) | ||
3920 | #endif | ||
3921 | t->ms = ms; | ||
3922 | t->periodic = (bool) periodic; | ||
3923 | - t->set = true; | ||
3924 | - | ||
3925 | - atomic_inc(&t->wl->callbacks); | ||
3926 | + if (!t->set) { | ||
3927 | + t->set = true; | ||
3928 | + atomic_inc(&t->wl->callbacks); | ||
3929 | + } | ||
3930 | |||
3931 | ieee80211_queue_delayed_work(hw, &t->dly_wrk, msecs_to_jiffies(ms)); | ||
3932 | } | ||
3933 | diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c | ||
3934 | index 0370403..27eccd9 100644 | ||
3935 | --- a/drivers/net/wireless/iwlegacy/common.c | ||
3936 | +++ b/drivers/net/wireless/iwlegacy/common.c | ||
3937 | @@ -3957,17 +3957,21 @@ il_connection_init_rx_config(struct il_priv *il) | ||
3938 | |||
3939 | memset(&il->staging, 0, sizeof(il->staging)); | ||
3940 | |||
3941 | - if (!il->vif) { | ||
3942 | + switch (il->iw_mode) { | ||
3943 | + case NL80211_IFTYPE_UNSPECIFIED: | ||
3944 | il->staging.dev_type = RXON_DEV_TYPE_ESS; | ||
3945 | - } else if (il->vif->type == NL80211_IFTYPE_STATION) { | ||
3946 | + break; | ||
3947 | + case NL80211_IFTYPE_STATION: | ||
3948 | il->staging.dev_type = RXON_DEV_TYPE_ESS; | ||
3949 | il->staging.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK; | ||
3950 | - } else if (il->vif->type == NL80211_IFTYPE_ADHOC) { | ||
3951 | + break; | ||
3952 | + case NL80211_IFTYPE_ADHOC: | ||
3953 | il->staging.dev_type = RXON_DEV_TYPE_IBSS; | ||
3954 | il->staging.flags = RXON_FLG_SHORT_PREAMBLE_MSK; | ||
3955 | il->staging.filter_flags = | ||
3956 | RXON_FILTER_BCON_AWARE_MSK | RXON_FILTER_ACCEPT_GRP_MSK; | ||
3957 | - } else { | ||
3958 | + break; | ||
3959 | + default: | ||
3960 | IL_ERR("Unsupported interface type %d\n", il->vif->type); | ||
3961 | return; | ||
3962 | } | ||
3963 | @@ -4550,8 +4554,7 @@ out: | ||
3964 | EXPORT_SYMBOL(il_mac_add_interface); | ||
3965 | |||
3966 | static void | ||
3967 | -il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif, | ||
3968 | - bool mode_change) | ||
3969 | +il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif) | ||
3970 | { | ||
3971 | lockdep_assert_held(&il->mutex); | ||
3972 | |||
3973 | @@ -4560,9 +4563,7 @@ il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif, | ||
3974 | il_force_scan_end(il); | ||
3975 | } | ||
3976 | |||
3977 | - if (!mode_change) | ||
3978 | - il_set_mode(il); | ||
3979 | - | ||
3980 | + il_set_mode(il); | ||
3981 | } | ||
3982 | |||
3983 | void | ||
3984 | @@ -4575,8 +4576,8 @@ il_mac_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | ||
3985 | |||
3986 | WARN_ON(il->vif != vif); | ||
3987 | il->vif = NULL; | ||
3988 | - | ||
3989 | - il_teardown_interface(il, vif, false); | ||
3990 | + il->iw_mode = NL80211_IFTYPE_UNSPECIFIED; | ||
3991 | + il_teardown_interface(il, vif); | ||
3992 | memset(il->bssid, 0, ETH_ALEN); | ||
3993 | |||
3994 | D_MAC80211("leave\n"); | ||
3995 | @@ -4685,18 +4686,10 @@ il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | ||
3996 | } | ||
3997 | |||
3998 | /* success */ | ||
3999 | - il_teardown_interface(il, vif, true); | ||
4000 | vif->type = newtype; | ||
4001 | vif->p2p = false; | ||
4002 | - err = il_set_mode(il); | ||
4003 | - WARN_ON(err); | ||
4004 | - /* | ||
4005 | - * We've switched internally, but submitting to the | ||
4006 | - * device may have failed for some reason. Mask this | ||
4007 | - * error, because otherwise mac80211 will not switch | ||
4008 | - * (and set the interface type back) and we'll be | ||
4009 | - * out of sync with it. | ||
4010 | - */ | ||
4011 | + il->iw_mode = newtype; | ||
4012 | + il_teardown_interface(il, vif); | ||
4013 | err = 0; | ||
4014 | |||
4015 | out: | ||
4016 | diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c | ||
4017 | index 13fbc4e..b879e13 100644 | ||
4018 | --- a/drivers/net/wireless/mwifiex/pcie.c | ||
4019 | +++ b/drivers/net/wireless/mwifiex/pcie.c | ||
4020 | @@ -161,7 +161,7 @@ static int mwifiex_pcie_suspend(struct pci_dev *pdev, pm_message_t state) | ||
4021 | |||
4022 | if (pdev) { | ||
4023 | card = (struct pcie_service_card *) pci_get_drvdata(pdev); | ||
4024 | - if (!card || card->adapter) { | ||
4025 | + if (!card || !card->adapter) { | ||
4026 | pr_err("Card or adapter structure is not valid\n"); | ||
4027 | return 0; | ||
4028 | } | ||
3488 | diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c | 4029 | diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c |
3489 | index fb21360..8951285 100644 | 4030 | index fb21360..8951285 100644 |
3490 | --- a/drivers/net/wireless/mwifiex/sta_ioctl.c | 4031 | --- a/drivers/net/wireless/mwifiex/sta_ioctl.c |
@@ -4948,7 +5489,7 @@ index 68d4c10..f141b4f 100644 | |||
4948 | g_lun0_dev = dev; | 5489 | g_lun0_dev = dev; |
4949 | 5490 | ||
4950 | diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c | 5491 | diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c |
4951 | index ea479e5..0bbcd35 100644 | 5492 | index ea479e5..c0dd776 100644 |
4952 | --- a/drivers/target/target_core_fabric_configfs.c | 5493 | --- a/drivers/target/target_core_fabric_configfs.c |
4953 | +++ b/drivers/target/target_core_fabric_configfs.c | 5494 | +++ b/drivers/target/target_core_fabric_configfs.c |
4954 | @@ -72,6 +72,12 @@ static int target_fabric_mappedlun_link( | 5495 | @@ -72,6 +72,12 @@ static int target_fabric_mappedlun_link( |
@@ -4964,19 +5505,18 @@ index ea479e5..0bbcd35 100644 | |||
4964 | /* | 5505 | /* |
4965 | * Ensure that the source port exists | 5506 | * Ensure that the source port exists |
4966 | */ | 5507 | */ |
4967 | @@ -746,6 +752,12 @@ static int target_fabric_port_link( | 5508 | @@ -763,6 +769,11 @@ static int target_fabric_port_link( |
4968 | struct target_fabric_configfs *tf; | 5509 | ret = -ENODEV; |
4969 | int ret; | 5510 | goto out; |
4970 | 5511 | } | |
4971 | + if (dev->dev_link_magic != SE_DEV_LINK_MAGIC) { | 5512 | + if (dev->dev_link_magic != SE_DEV_LINK_MAGIC) { |
4972 | + pr_err("Bad dev->dev_link_magic, not a valid se_dev_ci pointer:" | 5513 | + pr_err("Bad dev->dev_link_magic, not a valid se_dev_ci pointer:" |
4973 | + " %p to struct se_device: %p\n", se_dev_ci, dev); | 5514 | + " %p to struct se_device: %p\n", se_dev_ci, dev); |
4974 | + return -EFAULT; | 5515 | + return -EFAULT; |
4975 | + } | 5516 | + } |
4976 | + | 5517 | |
4977 | tpg_ci = &lun_ci->ci_parent->ci_group->cg_item; | 5518 | lun_p = core_dev_add_lun(se_tpg, dev, lun->unpacked_lun); |
4978 | se_tpg = container_of(to_config_group(tpg_ci), | 5519 | if (IS_ERR(lun_p)) { |
4979 | struct se_portal_group, tpg_group); | ||
4980 | diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c | 5520 | diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c |
4981 | index b8628a5..8dfe6f5 100644 | 5521 | index b8628a5..8dfe6f5 100644 |
4982 | --- a/drivers/target/target_core_tpg.c | 5522 | --- a/drivers/target/target_core_tpg.c |
@@ -6528,6 +7068,19 @@ index b982239..2f6212e 100644 | |||
6528 | if (opt->osd_keepalive_timeout != CEPH_OSD_KEEPALIVE_DEFAULT) | 7068 | if (opt->osd_keepalive_timeout != CEPH_OSD_KEEPALIVE_DEFAULT) |
6529 | seq_printf(m, ",osdkeepalivetimeout=%d", | 7069 | seq_printf(m, ",osdkeepalivetimeout=%d", |
6530 | opt->osd_keepalive_timeout); | 7070 | opt->osd_keepalive_timeout); |
7071 | diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c | ||
7072 | index ce5cbd7..210fce2 100644 | ||
7073 | --- a/fs/cifs/cifs_dfs_ref.c | ||
7074 | +++ b/fs/cifs/cifs_dfs_ref.c | ||
7075 | @@ -226,6 +226,8 @@ compose_mount_options_out: | ||
7076 | compose_mount_options_err: | ||
7077 | kfree(mountdata); | ||
7078 | mountdata = ERR_PTR(rc); | ||
7079 | + kfree(*devname); | ||
7080 | + *devname = NULL; | ||
7081 | goto compose_mount_options_out; | ||
7082 | } | ||
7083 | |||
6531 | diff --git a/fs/eventpoll.c b/fs/eventpoll.c | 7084 | diff --git a/fs/eventpoll.c b/fs/eventpoll.c |
6532 | index eedec84..3b032dd 100644 | 7085 | index eedec84..3b032dd 100644 |
6533 | --- a/fs/eventpoll.c | 7086 | --- a/fs/eventpoll.c |
@@ -6873,6 +7426,42 @@ index 627f108..e210a66 100644 | |||
6873 | } else | 7426 | } else |
6874 | error = NFS_PROTO(dir)->remove(dir, &dentry->d_name); | 7427 | error = NFS_PROTO(dir)->remove(dir, &dentry->d_name); |
6875 | if (error == -ENOENT) | 7428 | if (error == -ENOENT) |
7429 | diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c | ||
7430 | index dd057bc..fc8dc20 100644 | ||
7431 | --- a/fs/nfs/namespace.c | ||
7432 | +++ b/fs/nfs/namespace.c | ||
7433 | @@ -177,11 +177,31 @@ out_nofree: | ||
7434 | return mnt; | ||
7435 | } | ||
7436 | |||
7437 | +static int | ||
7438 | +nfs_namespace_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) | ||
7439 | +{ | ||
7440 | + if (NFS_FH(dentry->d_inode)->size != 0) | ||
7441 | + return nfs_getattr(mnt, dentry, stat); | ||
7442 | + generic_fillattr(dentry->d_inode, stat); | ||
7443 | + return 0; | ||
7444 | +} | ||
7445 | + | ||
7446 | +static int | ||
7447 | +nfs_namespace_setattr(struct dentry *dentry, struct iattr *attr) | ||
7448 | +{ | ||
7449 | + if (NFS_FH(dentry->d_inode)->size != 0) | ||
7450 | + return nfs_setattr(dentry, attr); | ||
7451 | + return -EACCES; | ||
7452 | +} | ||
7453 | + | ||
7454 | const struct inode_operations nfs_mountpoint_inode_operations = { | ||
7455 | .getattr = nfs_getattr, | ||
7456 | + .setattr = nfs_setattr, | ||
7457 | }; | ||
7458 | |||
7459 | const struct inode_operations nfs_referral_inode_operations = { | ||
7460 | + .getattr = nfs_namespace_getattr, | ||
7461 | + .setattr = nfs_namespace_setattr, | ||
7462 | }; | ||
7463 | |||
7464 | static void nfs_expire_automounts(struct work_struct *work) | ||
6876 | diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c | 7465 | diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c |
6877 | index 7bff871..5e61aac 100644 | 7466 | index 7bff871..5e61aac 100644 |
6878 | --- a/fs/nfs/nfs4proc.c | 7467 | --- a/fs/nfs/nfs4proc.c |
@@ -7132,6 +7721,23 @@ index aa23346..585ee1c 100644 | |||
7132 | 7721 | ||
7133 | newblock = udf_get_pblock(inode->i_sb, newblocknum, | 7722 | newblock = udf_get_pblock(inode->i_sb, newblocknum, |
7134 | iinfo->i_location.partitionReferenceNum, 0); | 7723 | iinfo->i_location.partitionReferenceNum, 0); |
7724 | diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c | ||
7725 | index e562dd4..1236b8c 100644 | ||
7726 | --- a/fs/xfs/xfs_aops.c | ||
7727 | +++ b/fs/xfs/xfs_aops.c | ||
7728 | @@ -86,11 +86,11 @@ xfs_destroy_ioend( | ||
7729 | } | ||
7730 | |||
7731 | if (ioend->io_iocb) { | ||
7732 | + inode_dio_done(ioend->io_inode); | ||
7733 | if (ioend->io_isasync) { | ||
7734 | aio_complete(ioend->io_iocb, ioend->io_error ? | ||
7735 | ioend->io_error : ioend->io_result, 0); | ||
7736 | } | ||
7737 | - inode_dio_done(ioend->io_inode); | ||
7738 | } | ||
7739 | |||
7740 | mempool_free(ioend, xfs_ioend_pool); | ||
7135 | diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h | 7741 | diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h |
7136 | index ed6642a..25f01d0 100644 | 7742 | index ed6642a..25f01d0 100644 |
7137 | --- a/include/asm-generic/tlb.h | 7743 | --- a/include/asm-generic/tlb.h |
@@ -7638,6 +8244,58 @@ index be4f856..67b64be 100644 | |||
7638 | __set_current_state(TASK_RUNNING); | 8244 | __set_current_state(TASK_RUNNING); |
7639 | if (clear_code) | 8245 | if (clear_code) |
7640 | current->exit_code = 0; | 8246 | current->exit_code = 0; |
8247 | diff --git a/kernel/smp.c b/kernel/smp.c | ||
8248 | index 29dd40a..69f38bd 100644 | ||
8249 | --- a/kernel/smp.c | ||
8250 | +++ b/kernel/smp.c | ||
8251 | @@ -33,6 +33,7 @@ struct call_function_data { | ||
8252 | struct call_single_data csd; | ||
8253 | atomic_t refs; | ||
8254 | cpumask_var_t cpumask; | ||
8255 | + cpumask_var_t cpumask_ipi; | ||
8256 | }; | ||
8257 | |||
8258 | static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_function_data, cfd_data); | ||
8259 | @@ -56,6 +57,9 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu) | ||
8260 | if (!zalloc_cpumask_var_node(&cfd->cpumask, GFP_KERNEL, | ||
8261 | cpu_to_node(cpu))) | ||
8262 | return notifier_from_errno(-ENOMEM); | ||
8263 | + if (!zalloc_cpumask_var_node(&cfd->cpumask_ipi, GFP_KERNEL, | ||
8264 | + cpu_to_node(cpu))) | ||
8265 | + return notifier_from_errno(-ENOMEM); | ||
8266 | break; | ||
8267 | |||
8268 | #ifdef CONFIG_HOTPLUG_CPU | ||
8269 | @@ -65,6 +69,7 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu) | ||
8270 | case CPU_DEAD: | ||
8271 | case CPU_DEAD_FROZEN: | ||
8272 | free_cpumask_var(cfd->cpumask); | ||
8273 | + free_cpumask_var(cfd->cpumask_ipi); | ||
8274 | break; | ||
8275 | #endif | ||
8276 | }; | ||
8277 | @@ -526,6 +531,12 @@ void smp_call_function_many(const struct cpumask *mask, | ||
8278 | return; | ||
8279 | } | ||
8280 | |||
8281 | + /* | ||
8282 | + * After we put an entry into the list, data->cpumask | ||
8283 | + * may be cleared again when another CPU sends another IPI for | ||
8284 | + * a SMP function call, so data->cpumask will be zero. | ||
8285 | + */ | ||
8286 | + cpumask_copy(data->cpumask_ipi, data->cpumask); | ||
8287 | raw_spin_lock_irqsave(&call_function.lock, flags); | ||
8288 | /* | ||
8289 | * Place entry at the _HEAD_ of the list, so that any cpu still | ||
8290 | @@ -549,7 +560,7 @@ void smp_call_function_many(const struct cpumask *mask, | ||
8291 | smp_mb(); | ||
8292 | |||
8293 | /* Send a message to all CPUs in the map */ | ||
8294 | - arch_send_call_function_ipi_mask(data->cpumask); | ||
8295 | + arch_send_call_function_ipi_mask(data->cpumask_ipi); | ||
8296 | |||
8297 | /* Optionally wait for the CPUs to complete */ | ||
8298 | if (wait) | ||
7641 | diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c | 8299 | diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c |
7642 | index 781ecc2..7f8a8df 100644 | 8300 | index 781ecc2..7f8a8df 100644 |
7643 | --- a/kernel/trace/ftrace.c | 8301 | --- a/kernel/trace/ftrace.c |
@@ -7956,6 +8614,32 @@ index 0b997c8..aeb0962 100644 | |||
7956 | if (!test_bit(HCI_INIT, &hdev->flags) && | 8614 | if (!test_bit(HCI_INIT, &hdev->flags) && |
7957 | !test_bit(HCI_SETUP, &hdev->dev_flags)) { | 8615 | !test_bit(HCI_SETUP, &hdev->dev_flags)) { |
7958 | hci_dev_lock(hdev); | 8616 | hci_dev_lock(hdev); |
8617 | diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c | ||
8618 | index 715d7e3..67d1893 100644 | ||
8619 | --- a/net/bluetooth/hci_event.c | ||
8620 | +++ b/net/bluetooth/hci_event.c | ||
8621 | @@ -2387,7 +2387,7 @@ static void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) | ||
8622 | if (ev->opcode != HCI_OP_NOP) | ||
8623 | del_timer(&hdev->cmd_timer); | ||
8624 | |||
8625 | - if (ev->ncmd) { | ||
8626 | + if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) { | ||
8627 | atomic_set(&hdev->cmd_cnt, 1); | ||
8628 | if (!skb_queue_empty(&hdev->cmd_q)) | ||
8629 | queue_work(hdev->workqueue, &hdev->cmd_work); | ||
8630 | diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c | ||
8631 | index ccd985d..03652f3 100644 | ||
8632 | --- a/net/bluetooth/hidp/core.c | ||
8633 | +++ b/net/bluetooth/hidp/core.c | ||
8634 | @@ -931,7 +931,7 @@ static int hidp_setup_hid(struct hidp_session *session, | ||
8635 | hid->version = req->version; | ||
8636 | hid->country = req->country; | ||
8637 | |||
8638 | - strncpy(hid->name, req->name, 128); | ||
8639 | + strncpy(hid->name, req->name, sizeof(req->name) - 1); | ||
8640 | strncpy(hid->phys, batostr(&bt_sk(session->ctrl_sock->sk)->src), 64); | ||
8641 | strncpy(hid->uniq, batostr(&bt_sk(session->ctrl_sock->sk)->dst), 64); | ||
8642 | |||
7959 | diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c | 8643 | diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c |
7960 | index 1a17850..32893a0 100644 | 8644 | index 1a17850..32893a0 100644 |
7961 | --- a/net/bluetooth/rfcomm/sock.c | 8645 | --- a/net/bluetooth/rfcomm/sock.c |
@@ -8712,6 +9396,29 @@ index 7e32d42..8b45fb4 100644 | |||
8712 | goto out; | 9396 | goto out; |
8713 | } | 9397 | } |
8714 | __inet6_hash(newsk, NULL); | 9398 | __inet6_hash(newsk, NULL); |
9399 | diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c | ||
9400 | index a58c0b6..f985911 100644 | ||
9401 | --- a/net/mac80211/cfg.c | ||
9402 | +++ b/net/mac80211/cfg.c | ||
9403 | @@ -151,7 +151,17 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev, | ||
9404 | sta = sta_info_get(sdata, mac_addr); | ||
9405 | else | ||
9406 | sta = sta_info_get_bss(sdata, mac_addr); | ||
9407 | - if (!sta) { | ||
9408 | + /* | ||
9409 | + * The ASSOC test makes sure the driver is ready to | ||
9410 | + * receive the key. When wpa_supplicant has roamed | ||
9411 | + * using FT, it attempts to set the key before | ||
9412 | + * association has completed, this rejects that attempt | ||
9413 | + * so it will set the key again after assocation. | ||
9414 | + * | ||
9415 | + * TODO: accept the key if we have a station entry and | ||
9416 | + * add it to the device after the station. | ||
9417 | + */ | ||
9418 | + if (!sta || !test_sta_flag(sta, WLAN_STA_ASSOC)) { | ||
9419 | ieee80211_key_free(sdata->local, key); | ||
9420 | err = -ENOENT; | ||
9421 | goto out_unlock; | ||
8715 | diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c | 9422 | diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c |
8716 | index a5894dd..c55eacc 100644 | 9423 | index a5894dd..c55eacc 100644 |
8717 | --- a/net/mac80211/ibss.c | 9424 | --- a/net/mac80211/ibss.c |
@@ -8740,7 +9447,7 @@ index a5894dd..c55eacc 100644 | |||
8740 | int interval = IEEE80211_SCAN_INTERVAL; | 9447 | int interval = IEEE80211_SCAN_INTERVAL; |
8741 | 9448 | ||
8742 | diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h | 9449 | diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h |
8743 | index 642a2a3..19d4ec3 100644 | 9450 | index 642a2a3..fcab057 100644 |
8744 | --- a/net/mac80211/ieee80211_i.h | 9451 | --- a/net/mac80211/ieee80211_i.h |
8745 | +++ b/net/mac80211/ieee80211_i.h | 9452 | +++ b/net/mac80211/ieee80211_i.h |
8746 | @@ -1239,9 +1239,9 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | 9453 | @@ -1239,9 +1239,9 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, |
@@ -8756,11 +9463,125 @@ index 642a2a3..19d4ec3 100644 | |||
8756 | int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, | 9463 | int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, |
8757 | struct cfg80211_scan_request *req); | 9464 | struct cfg80211_scan_request *req); |
8758 | void ieee80211_scan_cancel(struct ieee80211_local *local); | 9465 | void ieee80211_scan_cancel(struct ieee80211_local *local); |
9466 | @@ -1267,10 +1267,8 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata); | ||
9467 | void ieee80211_sched_scan_stopped_work(struct work_struct *work); | ||
9468 | |||
9469 | /* off-channel helpers */ | ||
9470 | -void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, | ||
9471 | - bool offchannel_ps_enable); | ||
9472 | -void ieee80211_offchannel_return(struct ieee80211_local *local, | ||
9473 | - bool offchannel_ps_disable); | ||
9474 | +void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local); | ||
9475 | +void ieee80211_offchannel_return(struct ieee80211_local *local); | ||
9476 | void ieee80211_roc_setup(struct ieee80211_local *local); | ||
9477 | void ieee80211_start_next_roc(struct ieee80211_local *local); | ||
9478 | void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata); | ||
9479 | diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c | ||
9480 | index 2138dc3..37e3028 100644 | ||
9481 | --- a/net/mac80211/offchannel.c | ||
9482 | +++ b/net/mac80211/offchannel.c | ||
9483 | @@ -102,8 +102,7 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata) | ||
9484 | ieee80211_sta_reset_conn_monitor(sdata); | ||
9485 | } | ||
9486 | |||
9487 | -void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, | ||
9488 | - bool offchannel_ps_enable) | ||
9489 | +void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local) | ||
9490 | { | ||
9491 | struct ieee80211_sub_if_data *sdata; | ||
9492 | |||
9493 | @@ -128,8 +127,7 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, | ||
9494 | |||
9495 | if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { | ||
9496 | netif_tx_stop_all_queues(sdata->dev); | ||
9497 | - if (offchannel_ps_enable && | ||
9498 | - (sdata->vif.type == NL80211_IFTYPE_STATION) && | ||
9499 | + if (sdata->vif.type == NL80211_IFTYPE_STATION && | ||
9500 | sdata->u.mgd.associated) | ||
9501 | ieee80211_offchannel_ps_enable(sdata); | ||
9502 | } | ||
9503 | @@ -137,8 +135,7 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, | ||
9504 | mutex_unlock(&local->iflist_mtx); | ||
9505 | } | ||
9506 | |||
9507 | -void ieee80211_offchannel_return(struct ieee80211_local *local, | ||
9508 | - bool offchannel_ps_disable) | ||
9509 | +void ieee80211_offchannel_return(struct ieee80211_local *local) | ||
9510 | { | ||
9511 | struct ieee80211_sub_if_data *sdata; | ||
9512 | |||
9513 | @@ -151,11 +148,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local, | ||
9514 | continue; | ||
9515 | |||
9516 | /* Tell AP we're back */ | ||
9517 | - if (offchannel_ps_disable && | ||
9518 | - sdata->vif.type == NL80211_IFTYPE_STATION) { | ||
9519 | - if (sdata->u.mgd.associated) | ||
9520 | - ieee80211_offchannel_ps_disable(sdata); | ||
9521 | - } | ||
9522 | + if (sdata->vif.type == NL80211_IFTYPE_STATION && | ||
9523 | + sdata->u.mgd.associated) | ||
9524 | + ieee80211_offchannel_ps_disable(sdata); | ||
9525 | |||
9526 | if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { | ||
9527 | /* | ||
9528 | @@ -376,7 +371,7 @@ void ieee80211_sw_roc_work(struct work_struct *work) | ||
9529 | local->tmp_channel = NULL; | ||
9530 | ieee80211_hw_config(local, 0); | ||
9531 | |||
9532 | - ieee80211_offchannel_return(local, true); | ||
9533 | + ieee80211_offchannel_return(local); | ||
9534 | } | ||
9535 | |||
9536 | ieee80211_recalc_idle(local); | ||
8759 | diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c | 9537 | diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c |
8760 | index 839dd97..09fc38d 100644 | 9538 | index 839dd97..8719635 100644 |
8761 | --- a/net/mac80211/scan.c | 9539 | --- a/net/mac80211/scan.c |
8762 | +++ b/net/mac80211/scan.c | 9540 | +++ b/net/mac80211/scan.c |
8763 | @@ -819,9 +819,9 @@ int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, | 9541 | @@ -310,7 +310,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted, |
9542 | if (!was_hw_scan) { | ||
9543 | ieee80211_configure_filter(local); | ||
9544 | drv_sw_scan_complete(local); | ||
9545 | - ieee80211_offchannel_return(local, true); | ||
9546 | + ieee80211_offchannel_return(local); | ||
9547 | } | ||
9548 | |||
9549 | ieee80211_recalc_idle(local); | ||
9550 | @@ -355,7 +355,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) | ||
9551 | local->next_scan_state = SCAN_DECISION; | ||
9552 | local->scan_channel_idx = 0; | ||
9553 | |||
9554 | - ieee80211_offchannel_stop_vifs(local, true); | ||
9555 | + ieee80211_offchannel_stop_vifs(local); | ||
9556 | |||
9557 | ieee80211_configure_filter(local); | ||
9558 | |||
9559 | @@ -680,12 +680,8 @@ static void ieee80211_scan_state_suspend(struct ieee80211_local *local, | ||
9560 | local->scan_channel = NULL; | ||
9561 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); | ||
9562 | |||
9563 | - /* | ||
9564 | - * Re-enable vifs and beaconing. Leave PS | ||
9565 | - * in off-channel state..will put that back | ||
9566 | - * on-channel at the end of scanning. | ||
9567 | - */ | ||
9568 | - ieee80211_offchannel_return(local, false); | ||
9569 | + /* disable PS */ | ||
9570 | + ieee80211_offchannel_return(local); | ||
9571 | |||
9572 | *next_delay = HZ / 5; | ||
9573 | /* afterwards, resume scan & go to next channel */ | ||
9574 | @@ -695,8 +691,7 @@ static void ieee80211_scan_state_suspend(struct ieee80211_local *local, | ||
9575 | static void ieee80211_scan_state_resume(struct ieee80211_local *local, | ||
9576 | unsigned long *next_delay) | ||
9577 | { | ||
9578 | - /* PS already is in off-channel mode */ | ||
9579 | - ieee80211_offchannel_stop_vifs(local, false); | ||
9580 | + ieee80211_offchannel_stop_vifs(local); | ||
9581 | |||
9582 | if (local->ops->flush) { | ||
9583 | drv_flush(local, false); | ||
9584 | @@ -819,9 +814,9 @@ int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, | ||
8764 | return res; | 9585 | return res; |
8765 | } | 9586 | } |
8766 | 9587 | ||
@@ -8773,7 +9594,7 @@ index 839dd97..09fc38d 100644 | |||
8773 | { | 9594 | { |
8774 | struct ieee80211_local *local = sdata->local; | 9595 | struct ieee80211_local *local = sdata->local; |
8775 | int ret = -EBUSY; | 9596 | int ret = -EBUSY; |
8776 | @@ -835,22 +835,36 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata, | 9597 | @@ -835,22 +830,36 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata, |
8777 | 9598 | ||
8778 | /* fill internal scan request */ | 9599 | /* fill internal scan request */ |
8779 | if (!chan) { | 9600 | if (!chan) { |
@@ -9043,10 +9864,18 @@ index 48d7c0a..bd3ba88 100644 | |||
9043 | free_irq(IRQ_AC97, NULL); | 9864 | free_irq(IRQ_AC97, NULL); |
9044 | if (ac97conf_clk) { | 9865 | if (ac97conf_clk) { |
9045 | diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c | 9866 | diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
9046 | index e1b7061..31ac338 100644 | 9867 | index e1b7061..c6646d9 100644 |
9047 | --- a/sound/pci/hda/patch_realtek.c | 9868 | --- a/sound/pci/hda/patch_realtek.c |
9048 | +++ b/sound/pci/hda/patch_realtek.c | 9869 | +++ b/sound/pci/hda/patch_realtek.c |
9049 | @@ -6562,8 +6562,8 @@ static void alc861vd_fixup_dallas(struct hda_codec *codec, | 9870 | @@ -4719,6 +4719,7 @@ static const struct snd_pci_quirk alc880_fixup_tbl[] = { |
9871 | SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_FIXUP_VOL_KNOB), | ||
9872 | SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810), | ||
9873 | SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM), | ||
9874 | + SND_PCI_QUIRK(0x1631, 0xe011, "PB 13201056", ALC880_FIXUP_6ST), | ||
9875 | SND_PCI_QUIRK(0x1734, 0x107c, "FSC F1734", ALC880_FIXUP_F1734), | ||
9876 | SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU), | ||
9877 | SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734), | ||
9878 | @@ -6562,8 +6563,8 @@ static void alc861vd_fixup_dallas(struct hda_codec *codec, | ||
9050 | const struct alc_fixup *fix, int action) | 9879 | const struct alc_fixup *fix, int action) |
9051 | { | 9880 | { |
9052 | if (action == ALC_FIXUP_ACT_PRE_PROBE) { | 9881 | if (action == ALC_FIXUP_ACT_PRE_PROBE) { |
@@ -9100,10 +9929,27 @@ index a3acb7a..6275a2b 100644 | |||
9100 | 9929 | ||
9101 | wm2000_write(i2c, WM2000_REG_SYS_START0, 0x33); | 9930 | wm2000_write(i2c, WM2000_REG_SYS_START0, 0x33); |
9102 | diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c | 9931 | diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c |
9103 | index c8bff6d..86b84a1 100644 | 9932 | index c8bff6d..8e0cf14 100644 |
9104 | --- a/sound/soc/codecs/wm2200.c | 9933 | --- a/sound/soc/codecs/wm2200.c |
9105 | +++ b/sound/soc/codecs/wm2200.c | 9934 | +++ b/sound/soc/codecs/wm2200.c |
9106 | @@ -1380,15 +1380,9 @@ static int wm2200_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) | 9935 | @@ -897,8 +897,6 @@ static const char *wm2200_mixer_texts[] = { |
9936 | "EQR", | ||
9937 | "LHPF1", | ||
9938 | "LHPF2", | ||
9939 | - "LHPF3", | ||
9940 | - "LHPF4", | ||
9941 | "DSP1.1", | ||
9942 | "DSP1.2", | ||
9943 | "DSP1.3", | ||
9944 | @@ -931,7 +929,6 @@ static int wm2200_mixer_values[] = { | ||
9945 | 0x25, | ||
9946 | 0x50, /* EQ */ | ||
9947 | 0x51, | ||
9948 | - 0x52, | ||
9949 | 0x60, /* LHPF1 */ | ||
9950 | 0x61, /* LHPF2 */ | ||
9951 | 0x68, /* DSP1 */ | ||
9952 | @@ -1380,15 +1377,9 @@ static int wm2200_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) | ||
9107 | case SND_SOC_DAIFMT_DSP_A: | 9953 | case SND_SOC_DAIFMT_DSP_A: |
9108 | fmt_val = 0; | 9954 | fmt_val = 0; |
9109 | break; | 9955 | break; |
@@ -9119,7 +9965,7 @@ index c8bff6d..86b84a1 100644 | |||
9119 | default: | 9965 | default: |
9120 | dev_err(codec->dev, "Unsupported DAI format %d\n", | 9966 | dev_err(codec->dev, "Unsupported DAI format %d\n", |
9121 | fmt & SND_SOC_DAIFMT_FORMAT_MASK); | 9967 | fmt & SND_SOC_DAIFMT_FORMAT_MASK); |
9122 | @@ -1440,7 +1434,7 @@ static int wm2200_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) | 9968 | @@ -1440,7 +1431,7 @@ static int wm2200_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) |
9123 | WM2200_AIF1TX_LRCLK_MSTR | WM2200_AIF1TX_LRCLK_INV, | 9969 | WM2200_AIF1TX_LRCLK_MSTR | WM2200_AIF1TX_LRCLK_INV, |
9124 | lrclk); | 9970 | lrclk); |
9125 | snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_5, | 9971 | snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_5, |
@@ -9362,6 +10208,39 @@ index eeefbce..34b9bb7 100644 | |||
9362 | return 0; | 10208 | return 0; |
9363 | } | 10209 | } |
9364 | 10210 | ||
10211 | diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c | ||
10212 | index 298070e..41e8bfb 100644 | ||
10213 | --- a/sound/usb/mixer.c | ||
10214 | +++ b/sound/usb/mixer.c | ||
10215 | @@ -1259,16 +1259,23 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void | ||
10216 | } | ||
10217 | channels = (hdr->bLength - 7) / csize - 1; | ||
10218 | bmaControls = hdr->bmaControls; | ||
10219 | + if (hdr->bLength < 7 + csize) { | ||
10220 | + snd_printk(KERN_ERR "usbaudio: unit %u: " | ||
10221 | + "invalid UAC_FEATURE_UNIT descriptor\n", | ||
10222 | + unitid); | ||
10223 | + return -EINVAL; | ||
10224 | + } | ||
10225 | } else { | ||
10226 | struct uac2_feature_unit_descriptor *ftr = _ftr; | ||
10227 | csize = 4; | ||
10228 | channels = (hdr->bLength - 6) / 4 - 1; | ||
10229 | bmaControls = ftr->bmaControls; | ||
10230 | - } | ||
10231 | - | ||
10232 | - if (hdr->bLength < 7 || !csize || hdr->bLength < 7 + csize) { | ||
10233 | - snd_printk(KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT descriptor\n", unitid); | ||
10234 | - return -EINVAL; | ||
10235 | + if (hdr->bLength < 6 + csize) { | ||
10236 | + snd_printk(KERN_ERR "usbaudio: unit %u: " | ||
10237 | + "invalid UAC_FEATURE_UNIT descriptor\n", | ||
10238 | + unitid); | ||
10239 | + return -EINVAL; | ||
10240 | + } | ||
10241 | } | ||
10242 | |||
10243 | /* parse the source unit */ | ||
9365 | diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c | 10244 | diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c |
9366 | index 0f58b4b..b8d1ad1 100644 | 10245 | index 0f58b4b..b8d1ad1 100644 |
9367 | --- a/sound/usb/quirks.c | 10246 | --- a/sound/usb/quirks.c |