1 |
Author: mpagano |
2 |
Date: 2009-04-03 02:44:12 +0000 (Fri, 03 Apr 2009) |
3 |
New Revision: 1541 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/2.6.29/1000_linux-2.6.29.1.patch |
7 |
Modified: |
8 |
genpatches-2.6/trunk/2.6.29/0000_README |
9 |
Log: |
10 |
Linux patch version 2.6.29.1 |
11 |
|
12 |
Modified: genpatches-2.6/trunk/2.6.29/0000_README |
13 |
=================================================================== |
14 |
--- genpatches-2.6/trunk/2.6.29/0000_README 2009-03-31 20:45:18 UTC (rev 1540) |
15 |
+++ genpatches-2.6/trunk/2.6.29/0000_README 2009-04-03 02:44:12 UTC (rev 1541) |
16 |
@@ -39,6 +39,10 @@ |
17 |
Individual Patch Descriptions: |
18 |
-------------------------------------------------------------------------- |
19 |
|
20 |
+Patch: 1000_linux-2.6.29.1.patch |
21 |
+From: http://www.kernel.org |
22 |
+Desc: Linux 2.6.29.1 |
23 |
+ |
24 |
Patch: 1915_ext4-automatically-allocate-delay-allocated-blocks-on-rename.patch |
25 |
From: Theodore Ts'o <tytso@×××.edu> |
26 |
Desc: ext4: Automatically allocate delay allocated blocks on rename |
27 |
|
28 |
Added: genpatches-2.6/trunk/2.6.29/1000_linux-2.6.29.1.patch |
29 |
=================================================================== |
30 |
--- genpatches-2.6/trunk/2.6.29/1000_linux-2.6.29.1.patch (rev 0) |
31 |
+++ genpatches-2.6/trunk/2.6.29/1000_linux-2.6.29.1.patch 2009-04-03 02:44:12 UTC (rev 1541) |
32 |
@@ -0,0 +1,1243 @@ |
33 |
+diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h |
34 |
+index a58378c..ce3b36e 100644 |
35 |
+--- a/arch/arm/include/asm/elf.h |
36 |
++++ b/arch/arm/include/asm/elf.h |
37 |
+@@ -50,6 +50,7 @@ typedef struct user_fp elf_fpregset_t; |
38 |
+ #define R_ARM_ABS32 2 |
39 |
+ #define R_ARM_CALL 28 |
40 |
+ #define R_ARM_JUMP24 29 |
41 |
++#define R_ARM_V4BX 40 |
42 |
+ |
43 |
+ /* |
44 |
+ * These are used to set parameters in the core dumps. |
45 |
+diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c |
46 |
+index dab48f2..9f509fd 100644 |
47 |
+--- a/arch/arm/kernel/module.c |
48 |
++++ b/arch/arm/kernel/module.c |
49 |
+@@ -132,6 +132,15 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, |
50 |
+ *(u32 *)loc |= offset & 0x00ffffff; |
51 |
+ break; |
52 |
+ |
53 |
++ case R_ARM_V4BX: |
54 |
++ /* Preserve Rm and the condition code. Alter |
55 |
++ * other bits to re-code instruction as |
56 |
++ * MOV PC,Rm. |
57 |
++ */ |
58 |
++ *(u32 *)loc &= 0xf000000f; |
59 |
++ *(u32 *)loc |= 0x01a0f000; |
60 |
++ break; |
61 |
++ |
62 |
+ default: |
63 |
+ printk(KERN_ERR "%s: unknown relocation: %u\n", |
64 |
+ module->name, ELF32_R_TYPE(rel->r_info)); |
65 |
+diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c |
66 |
+index 673b0db..4873f26 100644 |
67 |
+--- a/arch/arm/mach-iop13xx/pci.c |
68 |
++++ b/arch/arm/mach-iop13xx/pci.c |
69 |
+@@ -1026,8 +1026,10 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) |
70 |
+ which_atu = 0; |
71 |
+ } |
72 |
+ |
73 |
+- if (!which_atu) |
74 |
++ if (!which_atu) { |
75 |
++ kfree(res); |
76 |
+ return 0; |
77 |
++ } |
78 |
+ |
79 |
+ switch(which_atu) { |
80 |
+ case IOP13XX_INIT_ATU_ATUX: |
81 |
+@@ -1074,6 +1076,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) |
82 |
+ sys->map_irq = iop13xx_pcie_map_irq; |
83 |
+ break; |
84 |
+ default: |
85 |
++ kfree(res); |
86 |
+ return 0; |
87 |
+ } |
88 |
+ |
89 |
+diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c |
90 |
+index 437f520..e1dadf7 100644 |
91 |
+--- a/arch/arm/mach-omap2/mmc-twl4030.c |
92 |
++++ b/arch/arm/mach-omap2/mmc-twl4030.c |
93 |
+@@ -397,6 +397,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) |
94 |
+ break; |
95 |
+ default: |
96 |
+ pr_err("MMC%d configuration not supported!\n", c->mmc); |
97 |
++ kfree(mmc); |
98 |
+ continue; |
99 |
+ } |
100 |
+ hsmmc_data[c->mmc - 1] = mmc; |
101 |
+diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c |
102 |
+index d4d082c..5a89e57 100644 |
103 |
+--- a/arch/arm/mm/mmu.c |
104 |
++++ b/arch/arm/mm/mmu.c |
105 |
+@@ -694,7 +694,7 @@ static void __init sanity_check_meminfo(void) |
106 |
+ * the vmalloc area. |
107 |
+ */ |
108 |
+ if (__va(bank->start) >= VMALLOC_MIN || |
109 |
+- __va(bank->start) < PAGE_OFFSET) { |
110 |
++ __va(bank->start) < (void *)PAGE_OFFSET) { |
111 |
+ printk(KERN_NOTICE "Ignoring RAM at %.8lx-%.8lx " |
112 |
+ "(vmalloc region overlap).\n", |
113 |
+ bank->start, bank->start + bank->size - 1); |
114 |
+diff --git a/arch/sparc/include/asm/tlb_64.h b/arch/sparc/include/asm/tlb_64.h |
115 |
+index ec81cde..0aaa086 100644 |
116 |
+--- a/arch/sparc/include/asm/tlb_64.h |
117 |
++++ b/arch/sparc/include/asm/tlb_64.h |
118 |
+@@ -58,6 +58,8 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, unsigned i |
119 |
+ static inline void tlb_flush_mmu(struct mmu_gather *mp) |
120 |
+ { |
121 |
+ if (mp->need_flush) { |
122 |
++ if (!mp->fullmm) |
123 |
++ flush_tlb_pending(); |
124 |
+ free_pages_and_swap_cache(mp->pages, mp->pages_nr); |
125 |
+ mp->pages_nr = 0; |
126 |
+ mp->need_flush = 0; |
127 |
+@@ -78,8 +80,6 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un |
128 |
+ |
129 |
+ if (mp->fullmm) |
130 |
+ mp->fullmm = 0; |
131 |
+- else |
132 |
+- flush_tlb_pending(); |
133 |
+ |
134 |
+ /* keep the page table cache within bounds */ |
135 |
+ check_pgt_cache(); |
136 |
+diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c |
137 |
+index f357722..2c0cc72 100644 |
138 |
+--- a/arch/sparc/kernel/nmi.c |
139 |
++++ b/arch/sparc/kernel/nmi.c |
140 |
+@@ -13,6 +13,7 @@ |
141 |
+ #include <linux/module.h> |
142 |
+ #include <linux/kprobes.h> |
143 |
+ #include <linux/kernel_stat.h> |
144 |
++#include <linux/reboot.h> |
145 |
+ #include <linux/slab.h> |
146 |
+ #include <linux/kdebug.h> |
147 |
+ #include <linux/delay.h> |
148 |
+@@ -206,13 +207,33 @@ void nmi_adjust_hz(unsigned int new_hz) |
149 |
+ } |
150 |
+ EXPORT_SYMBOL_GPL(nmi_adjust_hz); |
151 |
+ |
152 |
++static int nmi_shutdown(struct notifier_block *nb, unsigned long cmd, void *p) |
153 |
++{ |
154 |
++ on_each_cpu(stop_watchdog, NULL, 1); |
155 |
++ return 0; |
156 |
++} |
157 |
++ |
158 |
++static struct notifier_block nmi_reboot_notifier = { |
159 |
++ .notifier_call = nmi_shutdown, |
160 |
++}; |
161 |
++ |
162 |
+ int __init nmi_init(void) |
163 |
+ { |
164 |
++ int err; |
165 |
++ |
166 |
+ nmi_usable = 1; |
167 |
+ |
168 |
+ on_each_cpu(start_watchdog, NULL, 1); |
169 |
+ |
170 |
+- return check_nmi_watchdog(); |
171 |
++ err = check_nmi_watchdog(); |
172 |
++ if (!err) { |
173 |
++ err = register_reboot_notifier(&nmi_reboot_notifier); |
174 |
++ if (err) { |
175 |
++ nmi_usable = 0; |
176 |
++ on_each_cpu(stop_watchdog, NULL, 1); |
177 |
++ } |
178 |
++ } |
179 |
++ return err; |
180 |
+ } |
181 |
+ |
182 |
+ static int __init setup_nmi_watchdog(char *str) |
183 |
+diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c |
184 |
+index 6cd1a5b..79457f6 100644 |
185 |
+--- a/arch/sparc/kernel/smp_64.c |
186 |
++++ b/arch/sparc/kernel/smp_64.c |
187 |
+@@ -1031,7 +1031,7 @@ void smp_fetch_global_regs(void) |
188 |
+ * If the address space is non-shared (ie. mm->count == 1) we avoid |
189 |
+ * cross calls when we want to flush the currently running process's |
190 |
+ * tlb state. This is done by clearing all cpu bits except the current |
191 |
+- * processor's in current->active_mm->cpu_vm_mask and performing the |
192 |
++ * processor's in current->mm->cpu_vm_mask and performing the |
193 |
+ * flush locally only. This will force any subsequent cpus which run |
194 |
+ * this task to flush the context from the local tlb if the process |
195 |
+ * migrates to another cpu (again). |
196 |
+@@ -1074,7 +1074,7 @@ void smp_flush_tlb_pending(struct mm_struct *mm, unsigned long nr, unsigned long |
197 |
+ u32 ctx = CTX_HWBITS(mm->context); |
198 |
+ int cpu = get_cpu(); |
199 |
+ |
200 |
+- if (mm == current->active_mm && atomic_read(&mm->mm_users) == 1) |
201 |
++ if (mm == current->mm && atomic_read(&mm->mm_users) == 1) |
202 |
+ mm->cpu_vm_mask = cpumask_of_cpu(cpu); |
203 |
+ else |
204 |
+ smp_cross_call_masked(&xcall_flush_tlb_pending, |
205 |
+diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c |
206 |
+index 2ac0ab7..a7a50b2 100644 |
207 |
+--- a/arch/x86/kernel/check.c |
208 |
++++ b/arch/x86/kernel/check.c |
209 |
+@@ -86,12 +86,12 @@ void __init setup_bios_corruption_check(void) |
210 |
+ if (addr == 0) |
211 |
+ break; |
212 |
+ |
213 |
++ if (addr >= corruption_check_size) |
214 |
++ break; |
215 |
++ |
216 |
+ if ((addr + size) > corruption_check_size) |
217 |
+ size = corruption_check_size - addr; |
218 |
+ |
219 |
+- if (size == 0) |
220 |
+- break; |
221 |
+- |
222 |
+ e820_update_range(addr, size, E820_RAM, E820_RESERVED); |
223 |
+ scan_areas[num_scan_areas].addr = addr; |
224 |
+ scan_areas[num_scan_areas].size = size; |
225 |
+diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c |
226 |
+index 0c0a455..6f557e0 100644 |
227 |
+--- a/arch/x86/kernel/cpu/mtrr/generic.c |
228 |
++++ b/arch/x86/kernel/cpu/mtrr/generic.c |
229 |
+@@ -41,6 +41,32 @@ static int __init mtrr_debug(char *opt) |
230 |
+ } |
231 |
+ early_param("mtrr.show", mtrr_debug); |
232 |
+ |
233 |
++/** |
234 |
++ * BIOS is expected to clear MtrrFixDramModEn bit, see for example |
235 |
++ * "BIOS and Kernel Developer's Guide for the AMD Athlon 64 and AMD |
236 |
++ * Opteron Processors" (26094 Rev. 3.30 February 2006), section |
237 |
++ * "13.2.1.2 SYSCFG Register": "The MtrrFixDramModEn bit should be set |
238 |
++ * to 1 during BIOS initalization of the fixed MTRRs, then cleared to |
239 |
++ * 0 for operation." |
240 |
++ */ |
241 |
++static inline void k8_check_syscfg_dram_mod_en(void) |
242 |
++{ |
243 |
++ u32 lo, hi; |
244 |
++ |
245 |
++ if (!((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && |
246 |
++ (boot_cpu_data.x86 >= 0x0f))) |
247 |
++ return; |
248 |
++ |
249 |
++ rdmsr(MSR_K8_SYSCFG, lo, hi); |
250 |
++ if (lo & K8_MTRRFIXRANGE_DRAM_MODIFY) { |
251 |
++ printk(KERN_ERR FW_WARN "MTRR: CPU %u: SYSCFG[MtrrFixDramModEn]" |
252 |
++ " not cleared by BIOS, clearing this bit\n", |
253 |
++ smp_processor_id()); |
254 |
++ lo &= ~K8_MTRRFIXRANGE_DRAM_MODIFY; |
255 |
++ mtrr_wrmsr(MSR_K8_SYSCFG, lo, hi); |
256 |
++ } |
257 |
++} |
258 |
++ |
259 |
+ /* |
260 |
+ * Returns the effective MTRR type for the region |
261 |
+ * Error returns: |
262 |
+@@ -174,6 +200,8 @@ get_fixed_ranges(mtrr_type * frs) |
263 |
+ unsigned int *p = (unsigned int *) frs; |
264 |
+ int i; |
265 |
+ |
266 |
++ k8_check_syscfg_dram_mod_en(); |
267 |
++ |
268 |
+ rdmsr(MTRRfix64K_00000_MSR, p[0], p[1]); |
269 |
+ |
270 |
+ for (i = 0; i < 2; i++) |
271 |
+@@ -308,27 +336,10 @@ void mtrr_wrmsr(unsigned msr, unsigned a, unsigned b) |
272 |
+ } |
273 |
+ |
274 |
+ /** |
275 |
+- * Enable and allow read/write of extended fixed-range MTRR bits on K8 CPUs |
276 |
+- * see AMD publication no. 24593, chapter 3.2.1 for more information |
277 |
+- */ |
278 |
+-static inline void k8_enable_fixed_iorrs(void) |
279 |
+-{ |
280 |
+- unsigned lo, hi; |
281 |
+- |
282 |
+- rdmsr(MSR_K8_SYSCFG, lo, hi); |
283 |
+- mtrr_wrmsr(MSR_K8_SYSCFG, lo |
284 |
+- | K8_MTRRFIXRANGE_DRAM_ENABLE |
285 |
+- | K8_MTRRFIXRANGE_DRAM_MODIFY, hi); |
286 |
+-} |
287 |
+- |
288 |
+-/** |
289 |
+ * set_fixed_range - checks & updates a fixed-range MTRR if it differs from the value it should have |
290 |
+ * @msr: MSR address of the MTTR which should be checked and updated |
291 |
+ * @changed: pointer which indicates whether the MTRR needed to be changed |
292 |
+ * @msrwords: pointer to the MSR values which the MSR should have |
293 |
+- * |
294 |
+- * If K8 extentions are wanted, update the K8 SYSCFG MSR also. |
295 |
+- * See AMD publication no. 24593, chapter 7.8.1, page 233 for more information. |
296 |
+ */ |
297 |
+ static void set_fixed_range(int msr, bool *changed, unsigned int *msrwords) |
298 |
+ { |
299 |
+@@ -337,10 +348,6 @@ static void set_fixed_range(int msr, bool *changed, unsigned int *msrwords) |
300 |
+ rdmsr(msr, lo, hi); |
301 |
+ |
302 |
+ if (lo != msrwords[0] || hi != msrwords[1]) { |
303 |
+- if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && |
304 |
+- (boot_cpu_data.x86 >= 0x0f && boot_cpu_data.x86 <= 0x11) && |
305 |
+- ((msrwords[0] | msrwords[1]) & K8_MTRR_RDMEM_WRMEM_MASK)) |
306 |
+- k8_enable_fixed_iorrs(); |
307 |
+ mtrr_wrmsr(msr, msrwords[0], msrwords[1]); |
308 |
+ *changed = true; |
309 |
+ } |
310 |
+@@ -419,6 +426,8 @@ static int set_fixed_ranges(mtrr_type * frs) |
311 |
+ bool changed = false; |
312 |
+ int block=-1, range; |
313 |
+ |
314 |
++ k8_check_syscfg_dram_mod_en(); |
315 |
++ |
316 |
+ while (fixed_range_blocks[++block].ranges) |
317 |
+ for (range=0; range < fixed_range_blocks[block].ranges; range++) |
318 |
+ set_fixed_range(fixed_range_blocks[block].base_msr + range, |
319 |
+diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c |
320 |
+index 06ca07f..f7d38d6 100644 |
321 |
+--- a/arch/x86/kernel/ptrace.c |
322 |
++++ b/arch/x86/kernel/ptrace.c |
323 |
+@@ -690,9 +690,8 @@ static int ptrace_bts_config(struct task_struct *child, |
324 |
+ if (!cfg.signal) |
325 |
+ return -EINVAL; |
326 |
+ |
327 |
+- return -EOPNOTSUPP; |
328 |
+- |
329 |
+ child->thread.bts_ovfl_signal = cfg.signal; |
330 |
++ return -EOPNOTSUPP; |
331 |
+ } |
332 |
+ |
333 |
+ if ((cfg.flags & PTRACE_BTS_O_ALLOC) && |
334 |
+diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c |
335 |
+index 6812b82..16e505a 100644 |
336 |
+--- a/arch/x86/kernel/tlb_uv.c |
337 |
++++ b/arch/x86/kernel/tlb_uv.c |
338 |
+@@ -742,7 +742,7 @@ static int __init uv_bau_init(void) |
339 |
+ int node; |
340 |
+ int nblades; |
341 |
+ int last_blade; |
342 |
+- int cur_cpu = 0; |
343 |
++ int cur_cpu; |
344 |
+ |
345 |
+ if (!is_uv_system()) |
346 |
+ return 0; |
347 |
+@@ -752,6 +752,7 @@ static int __init uv_bau_init(void) |
348 |
+ uv_mmask = (1UL << uv_hub_info->n_val) - 1; |
349 |
+ nblades = 0; |
350 |
+ last_blade = -1; |
351 |
++ cur_cpu = 0; |
352 |
+ for_each_online_node(node) { |
353 |
+ blade = uv_node_to_blade_id(node); |
354 |
+ if (blade == last_blade) |
355 |
+diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h |
356 |
+index 9fd78b6..c95a67d 100644 |
357 |
+--- a/arch/x86/kvm/paging_tmpl.h |
358 |
++++ b/arch/x86/kvm/paging_tmpl.h |
359 |
+@@ -314,9 +314,9 @@ static int FNAME(shadow_walk_entry)(struct kvm_shadow_walk *_sw, |
360 |
+ return 0; |
361 |
+ |
362 |
+ if (is_large_pte(*sptep)) { |
363 |
++ rmap_remove(vcpu->kvm, sptep); |
364 |
+ set_shadow_pte(sptep, shadow_trap_nonpresent_pte); |
365 |
+ kvm_flush_remote_tlbs(vcpu->kvm); |
366 |
+- rmap_remove(vcpu->kvm, sptep); |
367 |
+ } |
368 |
+ |
369 |
+ if (level == PT_DIRECTORY_LEVEL && gw->level == PT_DIRECTORY_LEVEL) { |
370 |
+diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c |
371 |
+index a9e769e..da56821 100644 |
372 |
+--- a/arch/x86/kvm/svm.c |
373 |
++++ b/arch/x86/kvm/svm.c |
374 |
+@@ -760,20 +760,37 @@ static void svm_get_segment(struct kvm_vcpu *vcpu, |
375 |
+ var->db = (s->attrib >> SVM_SELECTOR_DB_SHIFT) & 1; |
376 |
+ var->g = (s->attrib >> SVM_SELECTOR_G_SHIFT) & 1; |
377 |
+ |
378 |
+- /* |
379 |
+- * SVM always stores 0 for the 'G' bit in the CS selector in |
380 |
+- * the VMCB on a VMEXIT. This hurts cross-vendor migration: |
381 |
+- * Intel's VMENTRY has a check on the 'G' bit. |
382 |
+- */ |
383 |
+- if (seg == VCPU_SREG_CS) |
384 |
++ switch (seg) { |
385 |
++ case VCPU_SREG_CS: |
386 |
++ /* |
387 |
++ * SVM always stores 0 for the 'G' bit in the CS selector in |
388 |
++ * the VMCB on a VMEXIT. This hurts cross-vendor migration: |
389 |
++ * Intel's VMENTRY has a check on the 'G' bit. |
390 |
++ */ |
391 |
+ var->g = s->limit > 0xfffff; |
392 |
+- |
393 |
+- /* |
394 |
+- * Work around a bug where the busy flag in the tr selector |
395 |
+- * isn't exposed |
396 |
+- */ |
397 |
+- if (seg == VCPU_SREG_TR) |
398 |
++ break; |
399 |
++ case VCPU_SREG_TR: |
400 |
++ /* |
401 |
++ * Work around a bug where the busy flag in the tr selector |
402 |
++ * isn't exposed |
403 |
++ */ |
404 |
+ var->type |= 0x2; |
405 |
++ break; |
406 |
++ case VCPU_SREG_DS: |
407 |
++ case VCPU_SREG_ES: |
408 |
++ case VCPU_SREG_FS: |
409 |
++ case VCPU_SREG_GS: |
410 |
++ /* |
411 |
++ * The accessed bit must always be set in the segment |
412 |
++ * descriptor cache, although it can be cleared in the |
413 |
++ * descriptor, the cached bit always remains at 1. Since |
414 |
++ * Intel has a check on this, set it here to support |
415 |
++ * cross-vendor migration. |
416 |
++ */ |
417 |
++ if (!var->unusable) |
418 |
++ var->type |= 0x1; |
419 |
++ break; |
420 |
++ } |
421 |
+ |
422 |
+ var->unusable = !var->present; |
423 |
+ } |
424 |
+diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c |
425 |
+index 7611af5..90de444 100644 |
426 |
+--- a/arch/x86/kvm/vmx.c |
427 |
++++ b/arch/x86/kvm/vmx.c |
428 |
+@@ -928,11 +928,11 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data) |
429 |
+ int ret = 0; |
430 |
+ |
431 |
+ switch (msr_index) { |
432 |
+-#ifdef CONFIG_X86_64 |
433 |
+ case MSR_EFER: |
434 |
+ vmx_load_host_state(vmx); |
435 |
+ ret = kvm_set_msr_common(vcpu, msr_index, data); |
436 |
+ break; |
437 |
++#ifdef CONFIG_X86_64 |
438 |
+ case MSR_FS_BASE: |
439 |
+ vmcs_writel(GUEST_FS_BASE, data); |
440 |
+ break; |
441 |
+diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c |
442 |
+index 960a8d9..4175cb4 100644 |
443 |
+--- a/arch/x86/lguest/boot.c |
444 |
++++ b/arch/x86/lguest/boot.c |
445 |
+@@ -485,11 +485,17 @@ static void lguest_write_cr4(unsigned long val) |
446 |
+ * into a process' address space. We set the entry then tell the Host the |
447 |
+ * toplevel and address this corresponds to. The Guest uses one pagetable per |
448 |
+ * process, so we need to tell the Host which one we're changing (mm->pgd). */ |
449 |
++static void lguest_pte_update(struct mm_struct *mm, unsigned long addr, |
450 |
++ pte_t *ptep) |
451 |
++{ |
452 |
++ lazy_hcall(LHCALL_SET_PTE, __pa(mm->pgd), addr, ptep->pte_low); |
453 |
++} |
454 |
++ |
455 |
+ static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr, |
456 |
+ pte_t *ptep, pte_t pteval) |
457 |
+ { |
458 |
+ *ptep = pteval; |
459 |
+- lazy_hcall(LHCALL_SET_PTE, __pa(mm->pgd), addr, pteval.pte_low); |
460 |
++ lguest_pte_update(mm, addr, ptep); |
461 |
+ } |
462 |
+ |
463 |
+ /* The Guest calls this to set a top-level entry. Again, we set the entry then |
464 |
+@@ -1034,6 +1040,8 @@ __init void lguest_init(void) |
465 |
+ pv_mmu_ops.read_cr3 = lguest_read_cr3; |
466 |
+ pv_mmu_ops.lazy_mode.enter = paravirt_enter_lazy_mmu; |
467 |
+ pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mode; |
468 |
++ pv_mmu_ops.pte_update = lguest_pte_update; |
469 |
++ pv_mmu_ops.pte_update_defer = lguest_pte_update; |
470 |
+ |
471 |
+ #ifdef CONFIG_X86_LOCAL_APIC |
472 |
+ /* apic read/write intercepts */ |
473 |
+diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c |
474 |
+index e0ab173..21bc1f7 100644 |
475 |
+--- a/arch/x86/mm/pat.c |
476 |
++++ b/arch/x86/mm/pat.c |
477 |
+@@ -641,10 +641,11 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot, |
478 |
+ is_ram = pat_pagerange_is_ram(paddr, paddr + size); |
479 |
+ |
480 |
+ /* |
481 |
+- * reserve_pfn_range() doesn't support RAM pages. |
482 |
++ * reserve_pfn_range() doesn't support RAM pages. Maintain the current |
483 |
++ * behavior with RAM pages by returning success. |
484 |
+ */ |
485 |
+ if (is_ram != 0) |
486 |
+- return -EINVAL; |
487 |
++ return 0; |
488 |
+ |
489 |
+ ret = reserve_memtype(paddr, paddr + size, want_flags, &flags); |
490 |
+ if (ret) |
491 |
+diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c |
492 |
+index 5ead808..f234a37 100644 |
493 |
+--- a/arch/x86/pci/i386.c |
494 |
++++ b/arch/x86/pci/i386.c |
495 |
+@@ -319,6 +319,9 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
496 |
+ return -EINVAL; |
497 |
+ } |
498 |
+ flags = new_flags; |
499 |
++ vma->vm_page_prot = __pgprot( |
500 |
++ (pgprot_val(vma->vm_page_prot) & ~_PAGE_CACHE_MASK) | |
501 |
++ flags); |
502 |
+ } |
503 |
+ |
504 |
+ if (((vma->vm_pgoff < max_low_pfn_mapped) || |
505 |
+diff --git a/drivers/char/raw.c b/drivers/char/raw.c |
506 |
+index 96adf28..20d90e6 100644 |
507 |
+--- a/drivers/char/raw.c |
508 |
++++ b/drivers/char/raw.c |
509 |
+@@ -90,6 +90,7 @@ out1: |
510 |
+ blkdev_put(bdev, filp->f_mode); |
511 |
+ out: |
512 |
+ mutex_unlock(&raw_mutex); |
513 |
++ unlock_kernel(); |
514 |
+ return err; |
515 |
+ } |
516 |
+ |
517 |
+diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c |
518 |
+index 576a831..82ff484 100644 |
519 |
+--- a/drivers/lguest/page_tables.c |
520 |
++++ b/drivers/lguest/page_tables.c |
521 |
+@@ -373,8 +373,10 @@ unsigned long guest_pa(struct lg_cpu *cpu, unsigned long vaddr) |
522 |
+ /* First step: get the top-level Guest page table entry. */ |
523 |
+ gpgd = lgread(cpu, gpgd_addr(cpu, vaddr), pgd_t); |
524 |
+ /* Toplevel not present? We can't map it in. */ |
525 |
+- if (!(pgd_flags(gpgd) & _PAGE_PRESENT)) |
526 |
++ if (!(pgd_flags(gpgd) & _PAGE_PRESENT)) { |
527 |
+ kill_guest(cpu, "Bad address %#lx", vaddr); |
528 |
++ return -1UL; |
529 |
++ } |
530 |
+ |
531 |
+ gpte = lgread(cpu, gpte_addr(gpgd, vaddr), pte_t); |
532 |
+ if (!(pte_flags(gpte) & _PAGE_PRESENT)) |
533 |
+diff --git a/drivers/media/dvb/firewire/firedtv-avc.c b/drivers/media/dvb/firewire/firedtv-avc.c |
534 |
+index b55d9cc..adc2ce9 100644 |
535 |
+--- a/drivers/media/dvb/firewire/firedtv-avc.c |
536 |
++++ b/drivers/media/dvb/firewire/firedtv-avc.c |
537 |
+@@ -135,6 +135,7 @@ static const char *debug_fcp_opcode(unsigned int opcode, |
538 |
+ case SFE_VENDOR_OPCODE_REGISTER_REMOTE_CONTROL: return "RegisterRC"; |
539 |
+ case SFE_VENDOR_OPCODE_LNB_CONTROL: return "LNBControl"; |
540 |
+ case SFE_VENDOR_OPCODE_TUNE_QPSK: return "TuneQPSK"; |
541 |
++ case SFE_VENDOR_OPCODE_TUNE_QPSK2: return "TuneQPSK2"; |
542 |
+ case SFE_VENDOR_OPCODE_HOST2CA: return "Host2CA"; |
543 |
+ case SFE_VENDOR_OPCODE_CA2HOST: return "CA2Host"; |
544 |
+ } |
545 |
+@@ -266,7 +267,10 @@ static void avc_tuner_tuneqpsk(struct firedtv *fdtv, |
546 |
+ c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; |
547 |
+ c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; |
548 |
+ c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; |
549 |
+- c->operand[3] = SFE_VENDOR_OPCODE_TUNE_QPSK; |
550 |
++ if (fdtv->type == FIREDTV_DVB_S2) |
551 |
++ c->operand[3] = SFE_VENDOR_OPCODE_TUNE_QPSK2; |
552 |
++ else |
553 |
++ c->operand[3] = SFE_VENDOR_OPCODE_TUNE_QPSK; |
554 |
+ |
555 |
+ c->operand[4] = (params->frequency >> 24) & 0xff; |
556 |
+ c->operand[5] = (params->frequency >> 16) & 0xff; |
557 |
+diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c |
558 |
+index b8f2be8..907cd02 100644 |
559 |
+--- a/drivers/media/video/v4l2-common.c |
560 |
++++ b/drivers/media/video/v4l2-common.c |
561 |
+@@ -910,10 +910,10 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter, |
562 |
+ struct i2c_board_info info; |
563 |
+ |
564 |
+ BUG_ON(!dev); |
565 |
+-#ifdef MODULE |
566 |
++ |
567 |
+ if (module_name) |
568 |
+ request_module(module_name); |
569 |
+-#endif |
570 |
++ |
571 |
+ /* Setup the i2c board info with the device type and |
572 |
+ the device address. */ |
573 |
+ memset(&info, 0, sizeof(info)); |
574 |
+@@ -958,10 +958,10 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter, |
575 |
+ struct i2c_board_info info; |
576 |
+ |
577 |
+ BUG_ON(!dev); |
578 |
+-#ifdef MODULE |
579 |
++ |
580 |
+ if (module_name) |
581 |
+ request_module(module_name); |
582 |
+-#endif |
583 |
++ |
584 |
+ /* Setup the i2c board info with the device type and |
585 |
+ the device address. */ |
586 |
+ memset(&info, 0, sizeof(info)); |
587 |
+diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c |
588 |
+index 1b40632..edf23c9 100644 |
589 |
+--- a/drivers/net/dnet.c |
590 |
++++ b/drivers/net/dnet.c |
591 |
+@@ -9,6 +9,7 @@ |
592 |
+ * published by the Free Software Foundation. |
593 |
+ */ |
594 |
+ #include <linux/version.h> |
595 |
++#include <linux/io.h> |
596 |
+ #include <linux/module.h> |
597 |
+ #include <linux/moduleparam.h> |
598 |
+ #include <linux/kernel.h> |
599 |
+diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c |
600 |
+index 1d77ee9..6cf69d3 100644 |
601 |
+--- a/drivers/net/wireless/ath5k/base.c |
602 |
++++ b/drivers/net/wireless/ath5k/base.c |
603 |
+@@ -1090,8 +1090,18 @@ ath5k_mode_setup(struct ath5k_softc *sc) |
604 |
+ static inline int |
605 |
+ ath5k_hw_to_driver_rix(struct ath5k_softc *sc, int hw_rix) |
606 |
+ { |
607 |
+- WARN_ON(hw_rix < 0 || hw_rix > AR5K_MAX_RATES); |
608 |
+- return sc->rate_idx[sc->curband->band][hw_rix]; |
609 |
++ int rix; |
610 |
++ |
611 |
++ /* return base rate on errors */ |
612 |
++ if (WARN(hw_rix < 0 || hw_rix >= AR5K_MAX_RATES, |
613 |
++ "hw_rix out of bounds: %x\n", hw_rix)) |
614 |
++ return 0; |
615 |
++ |
616 |
++ rix = sc->rate_idx[sc->curband->band][hw_rix]; |
617 |
++ if (WARN(rix < 0, "invalid hw_rix: %x\n", hw_rix)) |
618 |
++ rix = 0; |
619 |
++ |
620 |
++ return rix; |
621 |
+ } |
622 |
+ |
623 |
+ /***************\ |
624 |
+@@ -1668,7 +1678,6 @@ ath5k_check_ibss_tsf(struct ath5k_softc *sc, struct sk_buff *skb, |
625 |
+ } |
626 |
+ } |
627 |
+ |
628 |
+- |
629 |
+ static void |
630 |
+ ath5k_tasklet_rx(unsigned long data) |
631 |
+ { |
632 |
+@@ -2188,6 +2197,7 @@ static void |
633 |
+ ath5k_beacon_config(struct ath5k_softc *sc) |
634 |
+ { |
635 |
+ struct ath5k_hw *ah = sc->ah; |
636 |
++ unsigned long flags; |
637 |
+ |
638 |
+ ath5k_hw_set_imr(ah, 0); |
639 |
+ sc->bmisscount = 0; |
640 |
+@@ -2211,9 +2221,9 @@ ath5k_beacon_config(struct ath5k_softc *sc) |
641 |
+ |
642 |
+ if (sc->opmode == NL80211_IFTYPE_ADHOC) { |
643 |
+ if (ath5k_hw_hasveol(ah)) { |
644 |
+- spin_lock(&sc->block); |
645 |
++ spin_lock_irqsave(&sc->block, flags); |
646 |
+ ath5k_beacon_send(sc); |
647 |
+- spin_unlock(&sc->block); |
648 |
++ spin_unlock_irqrestore(&sc->block, flags); |
649 |
+ } |
650 |
+ } else |
651 |
+ ath5k_beacon_update_timers(sc, -1); |
652 |
+@@ -2259,7 +2269,7 @@ ath5k_init(struct ath5k_softc *sc, bool is_resume) |
653 |
+ sc->curband = &sc->sbands[sc->curchan->band]; |
654 |
+ sc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL | |
655 |
+ AR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL | |
656 |
+- AR5K_INT_FATAL | AR5K_INT_GLOBAL | AR5K_INT_MIB; |
657 |
++ AR5K_INT_FATAL | AR5K_INT_GLOBAL; |
658 |
+ ret = ath5k_reset(sc, false, false); |
659 |
+ if (ret) |
660 |
+ goto done; |
661 |
+diff --git a/drivers/net/wireless/ath5k/base.h b/drivers/net/wireless/ath5k/base.h |
662 |
+index facc60d..d86ab39 100644 |
663 |
+--- a/drivers/net/wireless/ath5k/base.h |
664 |
++++ b/drivers/net/wireless/ath5k/base.h |
665 |
+@@ -112,7 +112,7 @@ struct ath5k_softc { |
666 |
+ struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; |
667 |
+ struct ieee80211_channel channels[ATH_CHAN_MAX]; |
668 |
+ struct ieee80211_rate rates[IEEE80211_NUM_BANDS][AR5K_MAX_RATES]; |
669 |
+- u8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES]; |
670 |
++ s8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES]; |
671 |
+ enum nl80211_iftype opmode; |
672 |
+ struct ath5k_hw *ah; /* Atheros HW */ |
673 |
+ |
674 |
+diff --git a/drivers/net/wireless/ath9k/recv.c b/drivers/net/wireless/ath9k/recv.c |
675 |
+index 462e08c..c114cb7 100644 |
676 |
+--- a/drivers/net/wireless/ath9k/recv.c |
677 |
++++ b/drivers/net/wireless/ath9k/recv.c |
678 |
+@@ -322,8 +322,13 @@ void ath_rx_cleanup(struct ath_softc *sc) |
679 |
+ |
680 |
+ list_for_each_entry(bf, &sc->rx.rxbuf, list) { |
681 |
+ skb = bf->bf_mpdu; |
682 |
+- if (skb) |
683 |
++ if (skb) { |
684 |
++ pci_unmap_single(sc->pdev, |
685 |
++ bf->bf_buf_addr, |
686 |
++ sc->rx.bufsize, |
687 |
++ DMA_FROM_DEVICE); |
688 |
+ dev_kfree_skb(skb); |
689 |
++ } |
690 |
+ } |
691 |
+ |
692 |
+ if (sc->rx.rxdma.dd_desc_len != 0) |
693 |
+diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c |
694 |
+index c92f0c6..80af54e 100644 |
695 |
+--- a/drivers/net/wireless/ath9k/xmit.c |
696 |
++++ b/drivers/net/wireless/ath9k/xmit.c |
697 |
+@@ -2035,7 +2035,7 @@ struct ath_txq *ath_test_get_txq(struct ath_softc *sc, struct sk_buff *skb) |
698 |
+ |
699 |
+ /* Try to avoid running out of descriptors */ |
700 |
+ if (txq->axq_depth >= (ATH_TXBUF - 20)) { |
701 |
+- DPRINTF(sc, ATH_DBG_FATAL, |
702 |
++ DPRINTF(sc, ATH_DBG_XMIT, |
703 |
+ "TX queue: %d is full, depth: %d\n", |
704 |
+ qnum, txq->axq_depth); |
705 |
+ ieee80211_stop_queue(sc->hw, skb_get_queue_mapping(skb)); |
706 |
+diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c |
707 |
+index eae9b80..12069e5 100644 |
708 |
+--- a/drivers/net/wireless/b43/xmit.c |
709 |
++++ b/drivers/net/wireless/b43/xmit.c |
710 |
+@@ -50,7 +50,7 @@ static int b43_plcp_get_bitrate_idx_cck(struct b43_plcp_hdr6 *plcp) |
711 |
+ } |
712 |
+ |
713 |
+ /* Extract the bitrate index out of an OFDM PLCP header. */ |
714 |
+-static u8 b43_plcp_get_bitrate_idx_ofdm(struct b43_plcp_hdr6 *plcp, bool aphy) |
715 |
++static int b43_plcp_get_bitrate_idx_ofdm(struct b43_plcp_hdr6 *plcp, bool aphy) |
716 |
+ { |
717 |
+ int base = aphy ? 0 : 4; |
718 |
+ |
719 |
+diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c |
720 |
+index 68a6412..ed502b7 100644 |
721 |
+--- a/drivers/scsi/arm/cumana_2.c |
722 |
++++ b/drivers/scsi/arm/cumana_2.c |
723 |
+@@ -318,7 +318,7 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length) |
724 |
+ { |
725 |
+ int ret = length; |
726 |
+ |
727 |
+- if (length >= 11 && strcmp(buffer, "CUMANASCSI2") == 0) { |
728 |
++ if (length >= 11 && strncmp(buffer, "CUMANASCSI2", 11) == 0) { |
729 |
+ buffer += 11; |
730 |
+ length -= 11; |
731 |
+ |
732 |
+diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c |
733 |
+index 49e7f56..3922fa9 100644 |
734 |
+--- a/drivers/usb/core/message.c |
735 |
++++ b/drivers/usb/core/message.c |
736 |
+@@ -1719,7 +1719,8 @@ free_interfaces: |
737 |
+ } |
738 |
+ kfree(new_interfaces); |
739 |
+ |
740 |
+- if (cp->string == NULL) |
741 |
++ if (cp->string == NULL && |
742 |
++ !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) |
743 |
+ cp->string = usb_cache_string(dev, cp->desc.iConfiguration); |
744 |
+ |
745 |
+ /* Now that all the interfaces are set up, register them |
746 |
+diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c |
747 |
+index c070b34..ab93918 100644 |
748 |
+--- a/drivers/usb/core/quirks.c |
749 |
++++ b/drivers/usb/core/quirks.c |
750 |
+@@ -54,6 +54,10 @@ static const struct usb_device_id usb_quirk_list[] = { |
751 |
+ { USB_DEVICE(0x0638, 0x0a13), .driver_info = |
752 |
+ USB_QUIRK_STRING_FETCH_255 }, |
753 |
+ |
754 |
++ /* Saitek Cyborg Gold Joystick */ |
755 |
++ { USB_DEVICE(0x06a3, 0x0006), .driver_info = |
756 |
++ USB_QUIRK_CONFIG_INTF_STRINGS }, |
757 |
++ |
758 |
+ /* M-Systems Flash Disk Pioneers */ |
759 |
+ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, |
760 |
+ |
761 |
+diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c |
762 |
+index 4cc2456..c667891 100644 |
763 |
+--- a/drivers/usb/core/sysfs.c |
764 |
++++ b/drivers/usb/core/sysfs.c |
765 |
+@@ -13,6 +13,7 @@ |
766 |
+ #include <linux/kernel.h> |
767 |
+ #include <linux/string.h> |
768 |
+ #include <linux/usb.h> |
769 |
++#include <linux/usb/quirks.h> |
770 |
+ #include "usb.h" |
771 |
+ |
772 |
+ /* Active configuration fields */ |
773 |
+@@ -813,7 +814,8 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf) |
774 |
+ if (intf->sysfs_files_created || intf->unregistering) |
775 |
+ return 0; |
776 |
+ |
777 |
+- if (alt->string == NULL) |
778 |
++ if (alt->string == NULL && |
779 |
++ !(udev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) |
780 |
+ alt->string = usb_cache_string(udev, alt->desc.iInterface); |
781 |
+ if (alt->string) |
782 |
+ retval = device_create_file(&intf->dev, &dev_attr_interface); |
783 |
+diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c |
784 |
+index 3a8bb53..fd7b356 100644 |
785 |
+--- a/drivers/usb/gadget/f_rndis.c |
786 |
++++ b/drivers/usb/gadget/f_rndis.c |
787 |
+@@ -437,7 +437,7 @@ invalid: |
788 |
+ DBG(cdev, "rndis req%02x.%02x v%04x i%04x l%d\n", |
789 |
+ ctrl->bRequestType, ctrl->bRequest, |
790 |
+ w_value, w_index, w_length); |
791 |
+- req->zero = 0; |
792 |
++ req->zero = (value < w_length); |
793 |
+ req->length = value; |
794 |
+ value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); |
795 |
+ if (value < 0) |
796 |
+diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c |
797 |
+index ecc9b66..01132ac 100644 |
798 |
+--- a/drivers/usb/host/ehci-q.c |
799 |
++++ b/drivers/usb/host/ehci-q.c |
800 |
+@@ -333,12 +333,40 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) |
801 |
+ token = hc32_to_cpu(ehci, qtd->hw_token); |
802 |
+ |
803 |
+ /* always clean up qtds the hc de-activated */ |
804 |
++ retry_xacterr: |
805 |
+ if ((token & QTD_STS_ACTIVE) == 0) { |
806 |
+ |
807 |
+ /* on STALL, error, and short reads this urb must |
808 |
+ * complete and all its qtds must be recycled. |
809 |
+ */ |
810 |
+ if ((token & QTD_STS_HALT) != 0) { |
811 |
++ |
812 |
++ /* retry transaction errors until we |
813 |
++ * reach the software xacterr limit |
814 |
++ */ |
815 |
++ if ((token & QTD_STS_XACT) && |
816 |
++ QTD_CERR(token) == 0 && |
817 |
++ --qh->xacterrs > 0 && |
818 |
++ !urb->unlinked) { |
819 |
++ ehci_dbg(ehci, |
820 |
++ "detected XactErr len %d/%d retry %d\n", |
821 |
++ qtd->length - QTD_LENGTH(token), qtd->length, |
822 |
++ QH_XACTERR_MAX - qh->xacterrs); |
823 |
++ |
824 |
++ /* reset the token in the qtd and the |
825 |
++ * qh overlay (which still contains |
826 |
++ * the qtd) so that we pick up from |
827 |
++ * where we left off |
828 |
++ */ |
829 |
++ token &= ~QTD_STS_HALT; |
830 |
++ token |= QTD_STS_ACTIVE | |
831 |
++ (EHCI_TUNE_CERR << 10); |
832 |
++ qtd->hw_token = cpu_to_hc32(ehci, |
833 |
++ token); |
834 |
++ wmb(); |
835 |
++ qh->hw_token = cpu_to_hc32(ehci, token); |
836 |
++ goto retry_xacterr; |
837 |
++ } |
838 |
+ stopped = 1; |
839 |
+ |
840 |
+ /* magic dummy for some short reads; qh won't advance. |
841 |
+@@ -421,6 +449,9 @@ halt: |
842 |
+ /* remove qtd; it's recycled after possible urb completion */ |
843 |
+ list_del (&qtd->qtd_list); |
844 |
+ last = qtd; |
845 |
++ |
846 |
++ /* reinit the xacterr counter for the next qtd */ |
847 |
++ qh->xacterrs = QH_XACTERR_MAX; |
848 |
+ } |
849 |
+ |
850 |
+ /* last urb's completion might still need calling */ |
851 |
+@@ -862,6 +893,7 @@ static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh) |
852 |
+ head->qh_next.qh = qh; |
853 |
+ head->hw_next = dma; |
854 |
+ |
855 |
++ qh->xacterrs = QH_XACTERR_MAX; |
856 |
+ qh->qh_state = QH_STATE_LINKED; |
857 |
+ /* qtd completions reported later by interrupt */ |
858 |
+ } |
859 |
+diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h |
860 |
+index 262b00c..c7385f2 100644 |
861 |
+--- a/drivers/usb/host/ehci.h |
862 |
++++ b/drivers/usb/host/ehci.h |
863 |
+@@ -376,6 +376,9 @@ struct ehci_qh { |
864 |
+ #define QH_STATE_UNLINK_WAIT 4 /* LINKED and on reclaim q */ |
865 |
+ #define QH_STATE_COMPLETING 5 /* don't touch token.HALT */ |
866 |
+ |
867 |
++ u8 xacterrs; /* XactErr retry counter */ |
868 |
++#define QH_XACTERR_MAX 32 /* XactErr retry limit */ |
869 |
++ |
870 |
+ /* periodic schedule info */ |
871 |
+ u8 usecs; /* intr bandwidth */ |
872 |
+ u8 gap_uf; /* uframes split/csplit gap */ |
873 |
+diff --git a/drivers/usb/storage/cypress_atacb.c b/drivers/usb/storage/cypress_atacb.c |
874 |
+index 898e67d..9466a99 100644 |
875 |
+--- a/drivers/usb/storage/cypress_atacb.c |
876 |
++++ b/drivers/usb/storage/cypress_atacb.c |
877 |
+@@ -133,19 +133,18 @@ void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) |
878 |
+ |
879 |
+ /* build the command for |
880 |
+ * reading the ATA registers */ |
881 |
+- scsi_eh_prep_cmnd(srb, &ses, NULL, 0, 0); |
882 |
+- srb->sdb.length = sizeof(regs); |
883 |
+- sg_init_one(&ses.sense_sgl, regs, srb->sdb.length); |
884 |
+- srb->sdb.table.sgl = &ses.sense_sgl; |
885 |
+- srb->sc_data_direction = DMA_FROM_DEVICE; |
886 |
+- srb->sdb.table.nents = 1; |
887 |
++ scsi_eh_prep_cmnd(srb, &ses, NULL, 0, sizeof(regs)); |
888 |
++ |
889 |
+ /* we use the same command as before, but we set |
890 |
+ * the read taskfile bit, for not executing atacb command, |
891 |
+ * but reading register selected in srb->cmnd[4] |
892 |
+ */ |
893 |
++ srb->cmd_len = 16; |
894 |
++ srb->cmnd = ses.cmnd; |
895 |
+ srb->cmnd[2] = 1; |
896 |
+ |
897 |
+ usb_stor_transparent_scsi_command(srb, us); |
898 |
++ memcpy(regs, srb->sense_buffer, sizeof(regs)); |
899 |
+ tmp_result = srb->result; |
900 |
+ scsi_eh_restore_cmnd(srb, &ses); |
901 |
+ /* we fail to get registers, report invalid command */ |
902 |
+@@ -162,8 +161,8 @@ void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) |
903 |
+ |
904 |
+ /* XXX we should generate sk, asc, ascq from status and error |
905 |
+ * regs |
906 |
+- * (see 11.1 Error translation ATA device error to SCSI error map) |
907 |
+- * and ata_to_sense_error from libata. |
908 |
++ * (see 11.1 Error translation ATA device error to SCSI error |
909 |
++ * map, and ata_to_sense_error from libata.) |
910 |
+ */ |
911 |
+ |
912 |
+ /* Sense data is current and format is descriptor. */ |
913 |
+diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c |
914 |
+index 727c506..ed710bc 100644 |
915 |
+--- a/drivers/usb/storage/scsiglue.c |
916 |
++++ b/drivers/usb/storage/scsiglue.c |
917 |
+@@ -135,6 +135,12 @@ static int slave_configure(struct scsi_device *sdev) |
918 |
+ if (sdev->request_queue->max_sectors > max_sectors) |
919 |
+ blk_queue_max_sectors(sdev->request_queue, |
920 |
+ max_sectors); |
921 |
++ } else if (sdev->type == TYPE_TAPE) { |
922 |
++ /* Tapes need much higher max_sector limits, so just |
923 |
++ * raise it to the maximum possible (4 GB / 512) and |
924 |
++ * let the queue segment size sort out the real limit. |
925 |
++ */ |
926 |
++ blk_queue_max_sectors(sdev->request_queue, 0x7FFFFF); |
927 |
+ } |
928 |
+ |
929 |
+ /* Some USB host controllers can't do DMA; they have to use PIO. |
930 |
+diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c |
931 |
+index 2552b9f..642c1d4 100644 |
932 |
+--- a/drivers/video/pxafb.c |
933 |
++++ b/drivers/video/pxafb.c |
934 |
+@@ -883,10 +883,21 @@ static void __devinit init_pxafb_overlay(struct pxafb_info *fbi, |
935 |
+ init_completion(&ofb->branch_done); |
936 |
+ } |
937 |
+ |
938 |
++static inline int pxafb_overlay_supported(void) |
939 |
++{ |
940 |
++ if (cpu_is_pxa27x() || cpu_is_pxa3xx()) |
941 |
++ return 1; |
942 |
++ |
943 |
++ return 0; |
944 |
++} |
945 |
++ |
946 |
+ static int __devinit pxafb_overlay_init(struct pxafb_info *fbi) |
947 |
+ { |
948 |
+ int i, ret; |
949 |
+ |
950 |
++ if (!pxafb_overlay_supported()) |
951 |
++ return 0; |
952 |
++ |
953 |
+ for (i = 0; i < 2; i++) { |
954 |
+ init_pxafb_overlay(fbi, &fbi->overlay[i], i); |
955 |
+ ret = register_framebuffer(&fbi->overlay[i].fb); |
956 |
+@@ -909,6 +920,9 @@ static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi) |
957 |
+ { |
958 |
+ int i; |
959 |
+ |
960 |
++ if (!pxafb_overlay_supported()) |
961 |
++ return; |
962 |
++ |
963 |
+ for (i = 0; i < 2; i++) |
964 |
+ unregister_framebuffer(&fbi->overlay[i].fb); |
965 |
+ } |
966 |
+diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES |
967 |
+index 851388f..6562eb0 100644 |
968 |
+--- a/fs/cifs/CHANGES |
969 |
++++ b/fs/cifs/CHANGES |
970 |
+@@ -7,6 +7,9 @@ are authenticated as guest, as reconnections, invalidating the earlier |
971 |
+ user's smb session. This fix allows cifs to mount multiple times to the |
972 |
+ same server with different userids without risking invalidating earlier |
973 |
+ established security contexts. |
974 |
++Fix "redzone overwritten" bug in cifs_put_tcon (CIFSTcon may allocate too |
975 |
++little memory for the "nativeFileSystem" field returned by the server |
976 |
++during mount). |
977 |
+ |
978 |
+ Version 1.56 |
979 |
+ ------------ |
980 |
+diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c |
981 |
+index 939e2f7..71ae000 100644 |
982 |
+--- a/fs/cifs/cifssmb.c |
983 |
++++ b/fs/cifs/cifssmb.c |
984 |
+@@ -2356,8 +2356,10 @@ winCreateHardLinkRetry: |
985 |
+ PATH_MAX, nls_codepage, remap); |
986 |
+ name_len++; /* trailing null */ |
987 |
+ name_len *= 2; |
988 |
+- pSMB->OldFileName[name_len] = 0; /* pad */ |
989 |
+- pSMB->OldFileName[name_len + 1] = 0x04; |
990 |
++ |
991 |
++ /* protocol specifies ASCII buffer format (0x04) for unicode */ |
992 |
++ pSMB->OldFileName[name_len] = 0x04; |
993 |
++ pSMB->OldFileName[name_len + 1] = 0x00; /* pad */ |
994 |
+ name_len2 = |
995 |
+ cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2], |
996 |
+ toName, PATH_MAX, nls_codepage, remap); |
997 |
+diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c |
998 |
+index da0f4ff..4b64f39 100644 |
999 |
+--- a/fs/cifs/connect.c |
1000 |
++++ b/fs/cifs/connect.c |
1001 |
+@@ -3667,7 +3667,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, |
1002 |
+ BCC(smb_buffer_response)) { |
1003 |
+ kfree(tcon->nativeFileSystem); |
1004 |
+ tcon->nativeFileSystem = |
1005 |
+- kzalloc(length + 2, GFP_KERNEL); |
1006 |
++ kzalloc(2*(length + 1), GFP_KERNEL); |
1007 |
+ if (tcon->nativeFileSystem) |
1008 |
+ cifs_strfromUCS_le( |
1009 |
+ tcon->nativeFileSystem, |
1010 |
+diff --git a/fs/fuse/file.c b/fs/fuse/file.c |
1011 |
+index d9fdb7c..821d10f 100644 |
1012 |
+--- a/fs/fuse/file.c |
1013 |
++++ b/fs/fuse/file.c |
1014 |
+@@ -1465,7 +1465,7 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin) |
1015 |
+ case SEEK_END: |
1016 |
+ retval = fuse_update_attributes(inode, NULL, file, NULL); |
1017 |
+ if (retval) |
1018 |
+- return retval; |
1019 |
++ goto exit; |
1020 |
+ offset += i_size_read(inode); |
1021 |
+ break; |
1022 |
+ case SEEK_CUR: |
1023 |
+@@ -1479,6 +1479,7 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin) |
1024 |
+ } |
1025 |
+ retval = offset; |
1026 |
+ } |
1027 |
++exit: |
1028 |
+ mutex_unlock(&inode->i_mutex); |
1029 |
+ return retval; |
1030 |
+ } |
1031 |
+diff --git a/include/linux/mm.h b/include/linux/mm.h |
1032 |
+index 065cdf8..3daa05f 100644 |
1033 |
+--- a/include/linux/mm.h |
1034 |
++++ b/include/linux/mm.h |
1035 |
+@@ -98,7 +98,7 @@ extern unsigned int kobjsize(const void *objp); |
1036 |
+ #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ |
1037 |
+ #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ |
1038 |
+ #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ |
1039 |
+-#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ |
1040 |
++#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it. Refer note in VM_PFNMAP_AT_MMAP below */ |
1041 |
+ #define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */ |
1042 |
+ |
1043 |
+ #define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */ |
1044 |
+@@ -127,6 +127,17 @@ extern unsigned int kobjsize(const void *objp); |
1045 |
+ #define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP) |
1046 |
+ |
1047 |
+ /* |
1048 |
++ * pfnmap vmas that are fully mapped at mmap time (not mapped on fault). |
1049 |
++ * Used by x86 PAT to identify such PFNMAP mappings and optimize their handling. |
1050 |
++ * Note VM_INSERTPAGE flag is overloaded here. i.e, |
1051 |
++ * VM_INSERTPAGE && !VM_PFNMAP implies |
1052 |
++ * The vma has had "vm_insert_page()" done on it |
1053 |
++ * VM_INSERTPAGE && VM_PFNMAP implies |
1054 |
++ * The vma is PFNMAP with full mapping at mmap time |
1055 |
++ */ |
1056 |
++#define VM_PFNMAP_AT_MMAP (VM_INSERTPAGE | VM_PFNMAP) |
1057 |
++ |
1058 |
++/* |
1059 |
+ * mapping from the currently active vm_flags protection bits (the |
1060 |
+ * low four bits) to a page protection mask.. |
1061 |
+ */ |
1062 |
+@@ -145,7 +156,7 @@ extern pgprot_t protection_map[16]; |
1063 |
+ */ |
1064 |
+ static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) |
1065 |
+ { |
1066 |
+- return ((vma->vm_flags & VM_PFNMAP) && vma->vm_pgoff); |
1067 |
++ return ((vma->vm_flags & VM_PFNMAP_AT_MMAP) == VM_PFNMAP_AT_MMAP); |
1068 |
+ } |
1069 |
+ |
1070 |
+ static inline int is_pfn_mapping(struct vm_area_struct *vma) |
1071 |
+diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h |
1072 |
+index 7f6c603..2526f3b 100644 |
1073 |
+--- a/include/linux/usb/quirks.h |
1074 |
++++ b/include/linux/usb/quirks.h |
1075 |
+@@ -16,4 +16,7 @@ |
1076 |
+ /* device can't handle Set-Interface requests */ |
1077 |
+ #define USB_QUIRK_NO_SET_INTF 0x00000004 |
1078 |
+ |
1079 |
++/* device can't handle its Configuration or Interface strings */ |
1080 |
++#define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 |
1081 |
++ |
1082 |
+ #endif /* __LINUX_USB_QUIRKS_H */ |
1083 |
+diff --git a/mm/memory.c b/mm/memory.c |
1084 |
+index baa999e..d7df5ba 100644 |
1085 |
+--- a/mm/memory.c |
1086 |
++++ b/mm/memory.c |
1087 |
+@@ -1665,9 +1665,10 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, |
1088 |
+ * behaviour that some programs depend on. We mark the "original" |
1089 |
+ * un-COW'ed pages by matching them up with "vma->vm_pgoff". |
1090 |
+ */ |
1091 |
+- if (addr == vma->vm_start && end == vma->vm_end) |
1092 |
++ if (addr == vma->vm_start && end == vma->vm_end) { |
1093 |
+ vma->vm_pgoff = pfn; |
1094 |
+- else if (is_cow_mapping(vma->vm_flags)) |
1095 |
++ vma->vm_flags |= VM_PFNMAP_AT_MMAP; |
1096 |
++ } else if (is_cow_mapping(vma->vm_flags)) |
1097 |
+ return -EINVAL; |
1098 |
+ |
1099 |
+ vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP; |
1100 |
+@@ -1679,6 +1680,7 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, |
1101 |
+ * needed from higher level routine calling unmap_vmas |
1102 |
+ */ |
1103 |
+ vma->vm_flags &= ~(VM_IO | VM_RESERVED | VM_PFNMAP); |
1104 |
++ vma->vm_flags &= ~VM_PFNMAP_AT_MMAP; |
1105 |
+ return -EINVAL; |
1106 |
+ } |
1107 |
+ |
1108 |
+diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c |
1109 |
+index 727c5c5..8a96672 100644 |
1110 |
+--- a/net/bridge/br_if.c |
1111 |
++++ b/net/bridge/br_if.c |
1112 |
+@@ -426,7 +426,6 @@ err2: |
1113 |
+ err1: |
1114 |
+ kobject_del(&p->kobj); |
1115 |
+ err0: |
1116 |
+- kobject_put(&p->kobj); |
1117 |
+ dev_set_promiscuity(dev, -1); |
1118 |
+ put_back: |
1119 |
+ dev_put(dev); |
1120 |
+diff --git a/net/core/dev.c b/net/core/dev.c |
1121 |
+index e3fe5c7..e438f54 100644 |
1122 |
+--- a/net/core/dev.c |
1123 |
++++ b/net/core/dev.c |
1124 |
+@@ -2588,18 +2588,15 @@ static int process_backlog(struct napi_struct *napi, int quota) |
1125 |
+ local_irq_disable(); |
1126 |
+ skb = __skb_dequeue(&queue->input_pkt_queue); |
1127 |
+ if (!skb) { |
1128 |
++ __napi_complete(napi); |
1129 |
+ local_irq_enable(); |
1130 |
+- napi_complete(napi); |
1131 |
+- goto out; |
1132 |
++ break; |
1133 |
+ } |
1134 |
+ local_irq_enable(); |
1135 |
+ |
1136 |
+- napi_gro_receive(napi, skb); |
1137 |
++ netif_receive_skb(skb); |
1138 |
+ } while (++work < quota && jiffies == start_time); |
1139 |
+ |
1140 |
+- napi_gro_flush(napi); |
1141 |
+- |
1142 |
+-out: |
1143 |
+ return work; |
1144 |
+ } |
1145 |
+ |
1146 |
+diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c |
1147 |
+index c47c989..c8bee18 100644 |
1148 |
+--- a/net/ipv4/udp.c |
1149 |
++++ b/net/ipv4/udp.c |
1150 |
+@@ -1614,7 +1614,8 @@ static struct sock *udp_get_next(struct seq_file *seq, struct sock *sk) |
1151 |
+ } while (sk && (!net_eq(sock_net(sk), net) || sk->sk_family != state->family)); |
1152 |
+ |
1153 |
+ if (!sk) { |
1154 |
+- spin_unlock_bh(&state->udp_table->hash[state->bucket].lock); |
1155 |
++ if (state->bucket < UDP_HTABLE_SIZE) |
1156 |
++ spin_unlock_bh(&state->udp_table->hash[state->bucket].lock); |
1157 |
+ return udp_get_first(seq, state->bucket + 1); |
1158 |
+ } |
1159 |
+ return sk; |
1160 |
+@@ -1632,6 +1633,9 @@ static struct sock *udp_get_idx(struct seq_file *seq, loff_t pos) |
1161 |
+ |
1162 |
+ static void *udp_seq_start(struct seq_file *seq, loff_t *pos) |
1163 |
+ { |
1164 |
++ struct udp_iter_state *state = seq->private; |
1165 |
++ state->bucket = UDP_HTABLE_SIZE; |
1166 |
++ |
1167 |
+ return *pos ? udp_get_idx(seq, *pos-1) : SEQ_START_TOKEN; |
1168 |
+ } |
1169 |
+ |
1170 |
+diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c |
1171 |
+index f171e8d..8f04bd9 100644 |
1172 |
+--- a/net/ipv6/ip6_input.c |
1173 |
++++ b/net/ipv6/ip6_input.c |
1174 |
+@@ -75,8 +75,7 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt |
1175 |
+ if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL || |
1176 |
+ !idev || unlikely(idev->cnf.disable_ipv6)) { |
1177 |
+ IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDISCARDS); |
1178 |
+- rcu_read_unlock(); |
1179 |
+- goto out; |
1180 |
++ goto drop; |
1181 |
+ } |
1182 |
+ |
1183 |
+ memset(IP6CB(skb), 0, sizeof(struct inet6_skb_parm)); |
1184 |
+@@ -147,7 +146,6 @@ err: |
1185 |
+ drop: |
1186 |
+ rcu_read_unlock(); |
1187 |
+ kfree_skb(skb); |
1188 |
+-out: |
1189 |
+ return 0; |
1190 |
+ } |
1191 |
+ |
1192 |
+diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c |
1193 |
+index f3fd154..56ac4ee 100644 |
1194 |
+--- a/net/netfilter/nf_conntrack_proto_tcp.c |
1195 |
++++ b/net/netfilter/nf_conntrack_proto_tcp.c |
1196 |
+@@ -15,6 +15,7 @@ |
1197 |
+ #include <linux/skbuff.h> |
1198 |
+ #include <linux/ipv6.h> |
1199 |
+ #include <net/ip6_checksum.h> |
1200 |
++#include <asm/unaligned.h> |
1201 |
+ |
1202 |
+ #include <net/tcp.h> |
1203 |
+ |
1204 |
+@@ -466,7 +467,7 @@ static void tcp_sack(const struct sk_buff *skb, unsigned int dataoff, |
1205 |
+ for (i = 0; |
1206 |
+ i < (opsize - TCPOLEN_SACK_BASE); |
1207 |
+ i += TCPOLEN_SACK_PERBLOCK) { |
1208 |
+- tmp = ntohl(*((__be32 *)(ptr+i)+1)); |
1209 |
++ tmp = get_unaligned_be32((__be32 *)(ptr+i)+1); |
1210 |
+ |
1211 |
+ if (after(tmp, *sack)) |
1212 |
+ *sack = tmp; |
1213 |
+diff --git a/net/wireless/reg.c b/net/wireless/reg.c |
1214 |
+index bd0a16c..4f9ff2a 100644 |
1215 |
+--- a/net/wireless/reg.c |
1216 |
++++ b/net/wireless/reg.c |
1217 |
+@@ -1083,6 +1083,8 @@ EXPORT_SYMBOL(regulatory_hint); |
1218 |
+ static bool reg_same_country_ie_hint(struct wiphy *wiphy, |
1219 |
+ u32 country_ie_checksum) |
1220 |
+ { |
1221 |
++ if (unlikely(last_request->initiator != REGDOM_SET_BY_COUNTRY_IE)) |
1222 |
++ return false; |
1223 |
+ if (!last_request->wiphy) |
1224 |
+ return false; |
1225 |
+ if (likely(last_request->wiphy != wiphy)) |
1226 |
+@@ -1133,7 +1135,9 @@ void regulatory_hint_11d(struct wiphy *wiphy, |
1227 |
+ /* We will run this for *every* beacon processed for the BSSID, so |
1228 |
+ * we optimize an early check to exit out early if we don't have to |
1229 |
+ * do anything */ |
1230 |
+- if (likely(last_request->wiphy)) { |
1231 |
++ if (likely(last_request->initiator == |
1232 |
++ REGDOM_SET_BY_COUNTRY_IE && |
1233 |
++ likely(last_request->wiphy))) { |
1234 |
+ struct cfg80211_registered_device *drv_last_ie; |
1235 |
+ |
1236 |
+ drv_last_ie = wiphy_to_dev(last_request->wiphy); |
1237 |
+@@ -1469,13 +1473,20 @@ int regulatory_init(void) |
1238 |
+ |
1239 |
+ printk(KERN_INFO "cfg80211: Using static regulatory domain info\n"); |
1240 |
+ print_regdomain_info(cfg80211_regdomain); |
1241 |
+- /* The old code still requests for a new regdomain and if |
1242 |
++ /* |
1243 |
++ * The old code still requests for a new regdomain and if |
1244 |
+ * you have CRDA you get it updated, otherwise you get |
1245 |
+ * stuck with the static values. We ignore "EU" code as |
1246 |
+- * that is not a valid ISO / IEC 3166 alpha2 */ |
1247 |
+- if (ieee80211_regdom[0] != 'E' || ieee80211_regdom[1] != 'U') |
1248 |
+- err = __regulatory_hint(NULL, REGDOM_SET_BY_CORE, |
1249 |
+- ieee80211_regdom, 0, ENVIRON_ANY); |
1250 |
++ * that is not a valid ISO / IEC 3166 alpha2 |
1251 |
++ * stuck with the static values. Since "EU" is not a valid |
1252 |
++ * ISO / IEC 3166 alpha2 code we can't expect userpace to |
1253 |
++ * give us a regulatory domain for it. We need last_request |
1254 |
++ * iniitalized though so lets just send a request which we |
1255 |
++ * know will be ignored... this crap will be removed once |
1256 |
++ * OLD_REG dies. |
1257 |
++ */ |
1258 |
++ err = __regulatory_hint(NULL, REGDOM_SET_BY_CORE, |
1259 |
++ ieee80211_regdom, 0, ENVIRON_ANY); |
1260 |
+ #else |
1261 |
+ cfg80211_regdomain = cfg80211_world_regdom; |
1262 |
+ |
1263 |
+diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c |
1264 |
+index 62a5425..8227172 100644 |
1265 |
+--- a/net/xfrm/xfrm_state.c |
1266 |
++++ b/net/xfrm/xfrm_state.c |
1267 |
+@@ -1615,7 +1615,7 @@ void xfrm_state_walk_done(struct xfrm_state_walk *walk) |
1268 |
+ |
1269 |
+ spin_lock_bh(&xfrm_state_lock); |
1270 |
+ list_del(&walk->all); |
1271 |
+- spin_lock_bh(&xfrm_state_lock); |
1272 |
++ spin_unlock_bh(&xfrm_state_lock); |
1273 |
+ } |
1274 |
+ EXPORT_SYMBOL(xfrm_state_walk_done); |
1275 |
+ |