1 |
Author: mpagano |
2 |
Date: 2014-02-24 23:55:00 +0000 (Mon, 24 Feb 2014) |
3 |
New Revision: 2698 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/3.10/1031_linux-3.10.32.patch |
7 |
Modified: |
8 |
genpatches-2.6/trunk/3.10/0000_README |
9 |
Log: |
10 |
Linux patch 3.10.32 |
11 |
|
12 |
Modified: genpatches-2.6/trunk/3.10/0000_README |
13 |
=================================================================== |
14 |
--- genpatches-2.6/trunk/3.10/0000_README 2014-02-24 23:42:49 UTC (rev 2697) |
15 |
+++ genpatches-2.6/trunk/3.10/0000_README 2014-02-24 23:55:00 UTC (rev 2698) |
16 |
@@ -166,6 +166,10 @@ |
17 |
From: http://www.kernel.org |
18 |
Desc: Linux 3.10.31 |
19 |
|
20 |
+Patch: 1031_linux-3.10.32.patch |
21 |
+From: http://www.kernel.org |
22 |
+Desc: Linux 3.10.32 |
23 |
+ |
24 |
Patch: 1500_XATTR_USER_PREFIX.patch |
25 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
26 |
Desc: Support for namespace user.pax.* on tmpfs. |
27 |
|
28 |
Added: genpatches-2.6/trunk/3.10/1031_linux-3.10.32.patch |
29 |
=================================================================== |
30 |
--- genpatches-2.6/trunk/3.10/1031_linux-3.10.32.patch (rev 0) |
31 |
+++ genpatches-2.6/trunk/3.10/1031_linux-3.10.32.patch 2014-02-24 23:55:00 UTC (rev 2698) |
32 |
@@ -0,0 +1,2000 @@ |
33 |
+diff --git a/Makefile b/Makefile |
34 |
+index 56b93edbbe4e..aab192446f50 100644 |
35 |
+--- a/Makefile |
36 |
++++ b/Makefile |
37 |
+@@ -1,6 +1,6 @@ |
38 |
+ VERSION = 3 |
39 |
+ PATCHLEVEL = 10 |
40 |
+-SUBLEVEL = 31 |
41 |
++SUBLEVEL = 32 |
42 |
+ EXTRAVERSION = |
43 |
+ NAME = TOSSUG Baby Fish |
44 |
+ |
45 |
+diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S |
46 |
+index b9e25ae2579c..d7c00507568a 100644 |
47 |
+--- a/arch/s390/kernel/head64.S |
48 |
++++ b/arch/s390/kernel/head64.S |
49 |
+@@ -59,7 +59,7 @@ ENTRY(startup_continue) |
50 |
+ .quad 0 # cr12: tracing off |
51 |
+ .quad 0 # cr13: home space segment table |
52 |
+ .quad 0xc0000000 # cr14: machine check handling off |
53 |
+- .quad 0 # cr15: linkage stack operations |
54 |
++ .quad .Llinkage_stack # cr15: linkage stack operations |
55 |
+ .Lpcmsk:.quad 0x0000000180000000 |
56 |
+ .L4malign:.quad 0xffffffffffc00000 |
57 |
+ .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 |
58 |
+@@ -67,12 +67,15 @@ ENTRY(startup_continue) |
59 |
+ .Lparmaddr: |
60 |
+ .quad PARMAREA |
61 |
+ .align 64 |
62 |
+-.Lduct: .long 0,0,0,0,.Lduald,0,0,0 |
63 |
++.Lduct: .long 0,.Laste,.Laste,0,.Lduald,0,0,0 |
64 |
+ .long 0,0,0,0,0,0,0,0 |
65 |
++.Laste: .quad 0,0xffffffffffffffff,0,0,0,0,0,0 |
66 |
+ .align 128 |
67 |
+ .Lduald:.rept 8 |
68 |
+ .long 0x80000000,0,0,0 # invalid access-list entries |
69 |
+ .endr |
70 |
++.Llinkage_stack: |
71 |
++ .long 0,0,0x89000000,0,0,0,0x8a000000,0 |
72 |
+ |
73 |
+ ENTRY(_ehead) |
74 |
+ |
75 |
+diff --git a/arch/s390/mm/page-states.c b/arch/s390/mm/page-states.c |
76 |
+index a90d45e9dfb0..27c50f4d90cb 100644 |
77 |
+--- a/arch/s390/mm/page-states.c |
78 |
++++ b/arch/s390/mm/page-states.c |
79 |
+@@ -12,6 +12,8 @@ |
80 |
+ #include <linux/mm.h> |
81 |
+ #include <linux/gfp.h> |
82 |
+ #include <linux/init.h> |
83 |
++#include <asm/setup.h> |
84 |
++#include <asm/ipl.h> |
85 |
+ |
86 |
+ #define ESSA_SET_STABLE 1 |
87 |
+ #define ESSA_SET_UNUSED 2 |
88 |
+@@ -41,6 +43,14 @@ void __init cmma_init(void) |
89 |
+ |
90 |
+ if (!cmma_flag) |
91 |
+ return; |
92 |
++ /* |
93 |
++ * Disable CMM for dump, otherwise the tprot based memory |
94 |
++ * detection can fail because of unstable pages. |
95 |
++ */ |
96 |
++ if (OLDMEM_BASE || ipl_info.type == IPL_TYPE_FCP_DUMP) { |
97 |
++ cmma_flag = 0; |
98 |
++ return; |
99 |
++ } |
100 |
+ asm volatile( |
101 |
+ " .insn rrf,0xb9ab0000,%1,%1,0,0\n" |
102 |
+ "0: la %0,0\n" |
103 |
+diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h |
104 |
+index 6aef9fbc09b7..b913915e8e63 100644 |
105 |
+--- a/arch/x86/include/asm/xen/page.h |
106 |
++++ b/arch/x86/include/asm/xen/page.h |
107 |
+@@ -79,30 +79,38 @@ static inline int phys_to_machine_mapping_valid(unsigned long pfn) |
108 |
+ return get_phys_to_machine(pfn) != INVALID_P2M_ENTRY; |
109 |
+ } |
110 |
+ |
111 |
+-static inline unsigned long mfn_to_pfn(unsigned long mfn) |
112 |
++static inline unsigned long mfn_to_pfn_no_overrides(unsigned long mfn) |
113 |
+ { |
114 |
+ unsigned long pfn; |
115 |
+- int ret = 0; |
116 |
++ int ret; |
117 |
+ |
118 |
+ if (xen_feature(XENFEAT_auto_translated_physmap)) |
119 |
+ return mfn; |
120 |
+ |
121 |
+- if (unlikely(mfn >= machine_to_phys_nr)) { |
122 |
+- pfn = ~0; |
123 |
+- goto try_override; |
124 |
+- } |
125 |
+- pfn = 0; |
126 |
++ if (unlikely(mfn >= machine_to_phys_nr)) |
127 |
++ return ~0; |
128 |
++ |
129 |
+ /* |
130 |
+ * The array access can fail (e.g., device space beyond end of RAM). |
131 |
+ * In such cases it doesn't matter what we return (we return garbage), |
132 |
+ * but we must handle the fault without crashing! |
133 |
+ */ |
134 |
+ ret = __get_user(pfn, &machine_to_phys_mapping[mfn]); |
135 |
+-try_override: |
136 |
+- /* ret might be < 0 if there are no entries in the m2p for mfn */ |
137 |
+ if (ret < 0) |
138 |
+- pfn = ~0; |
139 |
+- else if (get_phys_to_machine(pfn) != mfn) |
140 |
++ return ~0; |
141 |
++ |
142 |
++ return pfn; |
143 |
++} |
144 |
++ |
145 |
++static inline unsigned long mfn_to_pfn(unsigned long mfn) |
146 |
++{ |
147 |
++ unsigned long pfn; |
148 |
++ |
149 |
++ if (xen_feature(XENFEAT_auto_translated_physmap)) |
150 |
++ return mfn; |
151 |
++ |
152 |
++ pfn = mfn_to_pfn_no_overrides(mfn); |
153 |
++ if (get_phys_to_machine(pfn) != mfn) { |
154 |
+ /* |
155 |
+ * If this appears to be a foreign mfn (because the pfn |
156 |
+ * doesn't map back to the mfn), then check the local override |
157 |
+@@ -111,6 +119,7 @@ try_override: |
158 |
+ * m2p_find_override_pfn returns ~0 if it doesn't find anything. |
159 |
+ */ |
160 |
+ pfn = m2p_find_override_pfn(mfn, ~0); |
161 |
++ } |
162 |
+ |
163 |
+ /* |
164 |
+ * pfn is ~0 if there are no entries in the m2p for mfn or if the |
165 |
+diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c |
166 |
+index 22018f70a671..deeb48d9459b 100644 |
167 |
+--- a/arch/x86/kernel/cpu/common.c |
168 |
++++ b/arch/x86/kernel/cpu/common.c |
169 |
+@@ -284,8 +284,13 @@ static __always_inline void setup_smap(struct cpuinfo_x86 *c) |
170 |
+ raw_local_save_flags(eflags); |
171 |
+ BUG_ON(eflags & X86_EFLAGS_AC); |
172 |
+ |
173 |
+- if (cpu_has(c, X86_FEATURE_SMAP)) |
174 |
++ if (cpu_has(c, X86_FEATURE_SMAP)) { |
175 |
++#ifdef CONFIG_X86_SMAP |
176 |
+ set_in_cr4(X86_CR4_SMAP); |
177 |
++#else |
178 |
++ clear_in_cr4(X86_CR4_SMAP); |
179 |
++#endif |
180 |
++ } |
181 |
+ } |
182 |
+ |
183 |
+ /* |
184 |
+diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c |
185 |
+index d4bdd253fea7..e6253195a301 100644 |
186 |
+--- a/arch/x86/kernel/ftrace.c |
187 |
++++ b/arch/x86/kernel/ftrace.c |
188 |
+@@ -77,8 +77,7 @@ within(unsigned long addr, unsigned long start, unsigned long end) |
189 |
+ return addr >= start && addr < end; |
190 |
+ } |
191 |
+ |
192 |
+-static int |
193 |
+-do_ftrace_mod_code(unsigned long ip, const void *new_code) |
194 |
++static unsigned long text_ip_addr(unsigned long ip) |
195 |
+ { |
196 |
+ /* |
197 |
+ * On x86_64, kernel text mappings are mapped read-only with |
198 |
+@@ -91,7 +90,7 @@ do_ftrace_mod_code(unsigned long ip, const void *new_code) |
199 |
+ if (within(ip, (unsigned long)_text, (unsigned long)_etext)) |
200 |
+ ip = (unsigned long)__va(__pa_symbol(ip)); |
201 |
+ |
202 |
+- return probe_kernel_write((void *)ip, new_code, MCOUNT_INSN_SIZE); |
203 |
++ return ip; |
204 |
+ } |
205 |
+ |
206 |
+ static const unsigned char *ftrace_nop_replace(void) |
207 |
+@@ -123,8 +122,10 @@ ftrace_modify_code_direct(unsigned long ip, unsigned const char *old_code, |
208 |
+ if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0) |
209 |
+ return -EINVAL; |
210 |
+ |
211 |
++ ip = text_ip_addr(ip); |
212 |
++ |
213 |
+ /* replace the text with the new text */ |
214 |
+- if (do_ftrace_mod_code(ip, new_code)) |
215 |
++ if (probe_kernel_write((void *)ip, new_code, MCOUNT_INSN_SIZE)) |
216 |
+ return -EPERM; |
217 |
+ |
218 |
+ sync_core(); |
219 |
+@@ -221,37 +222,51 @@ int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr, |
220 |
+ return -EINVAL; |
221 |
+ } |
222 |
+ |
223 |
+-int ftrace_update_ftrace_func(ftrace_func_t func) |
224 |
++static unsigned long ftrace_update_func; |
225 |
++ |
226 |
++static int update_ftrace_func(unsigned long ip, void *new) |
227 |
+ { |
228 |
+- unsigned long ip = (unsigned long)(&ftrace_call); |
229 |
+- unsigned char old[MCOUNT_INSN_SIZE], *new; |
230 |
++ unsigned char old[MCOUNT_INSN_SIZE]; |
231 |
+ int ret; |
232 |
+ |
233 |
+- memcpy(old, &ftrace_call, MCOUNT_INSN_SIZE); |
234 |
+- new = ftrace_call_replace(ip, (unsigned long)func); |
235 |
++ memcpy(old, (void *)ip, MCOUNT_INSN_SIZE); |
236 |
++ |
237 |
++ ftrace_update_func = ip; |
238 |
++ /* Make sure the breakpoints see the ftrace_update_func update */ |
239 |
++ smp_wmb(); |
240 |
+ |
241 |
+ /* See comment above by declaration of modifying_ftrace_code */ |
242 |
+ atomic_inc(&modifying_ftrace_code); |
243 |
+ |
244 |
+ ret = ftrace_modify_code(ip, old, new); |
245 |
+ |
246 |
++ atomic_dec(&modifying_ftrace_code); |
247 |
++ |
248 |
++ return ret; |
249 |
++} |
250 |
++ |
251 |
++int ftrace_update_ftrace_func(ftrace_func_t func) |
252 |
++{ |
253 |
++ unsigned long ip = (unsigned long)(&ftrace_call); |
254 |
++ unsigned char *new; |
255 |
++ int ret; |
256 |
++ |
257 |
++ new = ftrace_call_replace(ip, (unsigned long)func); |
258 |
++ ret = update_ftrace_func(ip, new); |
259 |
++ |
260 |
+ /* Also update the regs callback function */ |
261 |
+ if (!ret) { |
262 |
+ ip = (unsigned long)(&ftrace_regs_call); |
263 |
+- memcpy(old, &ftrace_regs_call, MCOUNT_INSN_SIZE); |
264 |
+ new = ftrace_call_replace(ip, (unsigned long)func); |
265 |
+- ret = ftrace_modify_code(ip, old, new); |
266 |
++ ret = update_ftrace_func(ip, new); |
267 |
+ } |
268 |
+ |
269 |
+- atomic_dec(&modifying_ftrace_code); |
270 |
+- |
271 |
+ return ret; |
272 |
+ } |
273 |
+ |
274 |
+ static int is_ftrace_caller(unsigned long ip) |
275 |
+ { |
276 |
+- if (ip == (unsigned long)(&ftrace_call) || |
277 |
+- ip == (unsigned long)(&ftrace_regs_call)) |
278 |
++ if (ip == ftrace_update_func) |
279 |
+ return 1; |
280 |
+ |
281 |
+ return 0; |
282 |
+@@ -677,45 +692,41 @@ int __init ftrace_dyn_arch_init(void *data) |
283 |
+ #ifdef CONFIG_DYNAMIC_FTRACE |
284 |
+ extern void ftrace_graph_call(void); |
285 |
+ |
286 |
+-static int ftrace_mod_jmp(unsigned long ip, |
287 |
+- int old_offset, int new_offset) |
288 |
++static unsigned char *ftrace_jmp_replace(unsigned long ip, unsigned long addr) |
289 |
+ { |
290 |
+- unsigned char code[MCOUNT_INSN_SIZE]; |
291 |
++ static union ftrace_code_union calc; |
292 |
+ |
293 |
+- if (probe_kernel_read(code, (void *)ip, MCOUNT_INSN_SIZE)) |
294 |
+- return -EFAULT; |
295 |
++ /* Jmp not a call (ignore the .e8) */ |
296 |
++ calc.e8 = 0xe9; |
297 |
++ calc.offset = ftrace_calc_offset(ip + MCOUNT_INSN_SIZE, addr); |
298 |
+ |
299 |
+- if (code[0] != 0xe9 || old_offset != *(int *)(&code[1])) |
300 |
+- return -EINVAL; |
301 |
++ /* |
302 |
++ * ftrace external locks synchronize the access to the static variable. |
303 |
++ */ |
304 |
++ return calc.code; |
305 |
++} |
306 |
+ |
307 |
+- *(int *)(&code[1]) = new_offset; |
308 |
++static int ftrace_mod_jmp(unsigned long ip, void *func) |
309 |
++{ |
310 |
++ unsigned char *new; |
311 |
+ |
312 |
+- if (do_ftrace_mod_code(ip, &code)) |
313 |
+- return -EPERM; |
314 |
++ new = ftrace_jmp_replace(ip, (unsigned long)func); |
315 |
+ |
316 |
+- return 0; |
317 |
++ return update_ftrace_func(ip, new); |
318 |
+ } |
319 |
+ |
320 |
+ int ftrace_enable_ftrace_graph_caller(void) |
321 |
+ { |
322 |
+ unsigned long ip = (unsigned long)(&ftrace_graph_call); |
323 |
+- int old_offset, new_offset; |
324 |
+ |
325 |
+- old_offset = (unsigned long)(&ftrace_stub) - (ip + MCOUNT_INSN_SIZE); |
326 |
+- new_offset = (unsigned long)(&ftrace_graph_caller) - (ip + MCOUNT_INSN_SIZE); |
327 |
+- |
328 |
+- return ftrace_mod_jmp(ip, old_offset, new_offset); |
329 |
++ return ftrace_mod_jmp(ip, &ftrace_graph_caller); |
330 |
+ } |
331 |
+ |
332 |
+ int ftrace_disable_ftrace_graph_caller(void) |
333 |
+ { |
334 |
+ unsigned long ip = (unsigned long)(&ftrace_graph_call); |
335 |
+- int old_offset, new_offset; |
336 |
+- |
337 |
+- old_offset = (unsigned long)(&ftrace_graph_caller) - (ip + MCOUNT_INSN_SIZE); |
338 |
+- new_offset = (unsigned long)(&ftrace_stub) - (ip + MCOUNT_INSN_SIZE); |
339 |
+ |
340 |
+- return ftrace_mod_jmp(ip, old_offset, new_offset); |
341 |
++ return ftrace_mod_jmp(ip, &ftrace_stub); |
342 |
+ } |
343 |
+ |
344 |
+ #endif /* !CONFIG_DYNAMIC_FTRACE */ |
345 |
+diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c |
346 |
+index 654be4ae3047..c1e9e4cbbd76 100644 |
347 |
+--- a/arch/x86/mm/fault.c |
348 |
++++ b/arch/x86/mm/fault.c |
349 |
+@@ -989,6 +989,12 @@ static int fault_in_kernel_space(unsigned long address) |
350 |
+ |
351 |
+ static inline bool smap_violation(int error_code, struct pt_regs *regs) |
352 |
+ { |
353 |
++ if (!IS_ENABLED(CONFIG_X86_SMAP)) |
354 |
++ return false; |
355 |
++ |
356 |
++ if (!static_cpu_has(X86_FEATURE_SMAP)) |
357 |
++ return false; |
358 |
++ |
359 |
+ if (error_code & PF_USER) |
360 |
+ return false; |
361 |
+ |
362 |
+@@ -1091,11 +1097,9 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code) |
363 |
+ if (unlikely(error_code & PF_RSVD)) |
364 |
+ pgtable_bad(regs, error_code, address); |
365 |
+ |
366 |
+- if (static_cpu_has(X86_FEATURE_SMAP)) { |
367 |
+- if (unlikely(smap_violation(error_code, regs))) { |
368 |
+- bad_area_nosemaphore(regs, error_code, address); |
369 |
+- return; |
370 |
+- } |
371 |
++ if (unlikely(smap_violation(error_code, regs))) { |
372 |
++ bad_area_nosemaphore(regs, error_code, address); |
373 |
++ return; |
374 |
+ } |
375 |
+ |
376 |
+ perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); |
377 |
+diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c |
378 |
+index 95fb2aa5927e..156344448d19 100644 |
379 |
+--- a/arch/x86/xen/p2m.c |
380 |
++++ b/arch/x86/xen/p2m.c |
381 |
+@@ -878,7 +878,6 @@ int m2p_add_override(unsigned long mfn, struct page *page, |
382 |
+ unsigned long uninitialized_var(address); |
383 |
+ unsigned level; |
384 |
+ pte_t *ptep = NULL; |
385 |
+- int ret = 0; |
386 |
+ |
387 |
+ pfn = page_to_pfn(page); |
388 |
+ if (!PageHighMem(page)) { |
389 |
+@@ -925,8 +924,8 @@ int m2p_add_override(unsigned long mfn, struct page *page, |
390 |
+ * frontend pages while they are being shared with the backend, |
391 |
+ * because mfn_to_pfn (that ends up being called by GUPF) will |
392 |
+ * return the backend pfn rather than the frontend pfn. */ |
393 |
+- ret = __get_user(pfn, &machine_to_phys_mapping[mfn]); |
394 |
+- if (ret == 0 && get_phys_to_machine(pfn) == mfn) |
395 |
++ pfn = mfn_to_pfn_no_overrides(mfn); |
396 |
++ if (get_phys_to_machine(pfn) == mfn) |
397 |
+ set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)); |
398 |
+ |
399 |
+ return 0; |
400 |
+@@ -941,7 +940,6 @@ int m2p_remove_override(struct page *page, |
401 |
+ unsigned long uninitialized_var(address); |
402 |
+ unsigned level; |
403 |
+ pte_t *ptep = NULL; |
404 |
+- int ret = 0; |
405 |
+ |
406 |
+ pfn = page_to_pfn(page); |
407 |
+ mfn = get_phys_to_machine(pfn); |
408 |
+@@ -1019,8 +1017,8 @@ int m2p_remove_override(struct page *page, |
409 |
+ * the original pfn causes mfn_to_pfn(mfn) to return the frontend |
410 |
+ * pfn again. */ |
411 |
+ mfn &= ~FOREIGN_FRAME_BIT; |
412 |
+- ret = __get_user(pfn, &machine_to_phys_mapping[mfn]); |
413 |
+- if (ret == 0 && get_phys_to_machine(pfn) == FOREIGN_FRAME(mfn) && |
414 |
++ pfn = mfn_to_pfn_no_overrides(mfn); |
415 |
++ if (get_phys_to_machine(pfn) == FOREIGN_FRAME(mfn) && |
416 |
+ m2p_find_override(mfn) == NULL) |
417 |
+ set_phys_to_machine(pfn, mfn); |
418 |
+ |
419 |
+diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c |
420 |
+index a1e58e19d0cc..570c9a5c4d3f 100644 |
421 |
+--- a/arch/x86/xen/smp.c |
422 |
++++ b/arch/x86/xen/smp.c |
423 |
+@@ -245,6 +245,15 @@ static void __init xen_smp_prepare_boot_cpu(void) |
424 |
+ old memory can be recycled */ |
425 |
+ make_lowmem_page_readwrite(xen_initial_gdt); |
426 |
+ |
427 |
++#ifdef CONFIG_X86_32 |
428 |
++ /* |
429 |
++ * Xen starts us with XEN_FLAT_RING1_DS, but linux code |
430 |
++ * expects __USER_DS |
431 |
++ */ |
432 |
++ loadsegment(ds, __USER_DS); |
433 |
++ loadsegment(es, __USER_DS); |
434 |
++#endif |
435 |
++ |
436 |
+ xen_filter_cpu_maps(); |
437 |
+ xen_setup_vcpu_info_placement(); |
438 |
+ } |
439 |
+diff --git a/block/blk-lib.c b/block/blk-lib.c |
440 |
+index d6f50d572565..9a32f5868fb9 100644 |
441 |
+--- a/block/blk-lib.c |
442 |
++++ b/block/blk-lib.c |
443 |
+@@ -121,6 +121,14 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector, |
444 |
+ |
445 |
+ atomic_inc(&bb.done); |
446 |
+ submit_bio(type, bio); |
447 |
++ |
448 |
++ /* |
449 |
++ * We can loop for a long time in here, if someone does |
450 |
++ * full device discards (like mkfs). Be nice and allow |
451 |
++ * us to schedule out to avoid softlocking if preempt |
452 |
++ * is disabled. |
453 |
++ */ |
454 |
++ cond_resched(); |
455 |
+ } |
456 |
+ blk_finish_plug(&plug); |
457 |
+ |
458 |
+diff --git a/block/blk.h b/block/blk.h |
459 |
+index e837b8f619b7..b3bdeb36f361 100644 |
460 |
+--- a/block/blk.h |
461 |
++++ b/block/blk.h |
462 |
+@@ -96,7 +96,7 @@ static inline struct request *__elv_next_request(struct request_queue *q) |
463 |
+ q->flush_queue_delayed = 1; |
464 |
+ return NULL; |
465 |
+ } |
466 |
+- if (unlikely(blk_queue_dying(q)) || |
467 |
++ if (unlikely(blk_queue_bypass(q)) || |
468 |
+ !q->elevator->type->ops.elevator_dispatch_fn(q, 0)) |
469 |
+ return NULL; |
470 |
+ } |
471 |
+diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c |
472 |
+index 69b45fc97276..1735b0d17e29 100644 |
473 |
+--- a/drivers/block/xen-blkfront.c |
474 |
++++ b/drivers/block/xen-blkfront.c |
475 |
+@@ -1518,13 +1518,16 @@ static void blkback_changed(struct xenbus_device *dev, |
476 |
+ case XenbusStateReconfiguring: |
477 |
+ case XenbusStateReconfigured: |
478 |
+ case XenbusStateUnknown: |
479 |
+- case XenbusStateClosed: |
480 |
+ break; |
481 |
+ |
482 |
+ case XenbusStateConnected: |
483 |
+ blkfront_connect(info); |
484 |
+ break; |
485 |
+ |
486 |
++ case XenbusStateClosed: |
487 |
++ if (dev->state == XenbusStateClosed) |
488 |
++ break; |
489 |
++ /* Missed the backend's Closing state -- fallthrough */ |
490 |
+ case XenbusStateClosing: |
491 |
+ blkfront_closing(info); |
492 |
+ break; |
493 |
+diff --git a/drivers/char/raw.c b/drivers/char/raw.c |
494 |
+index f3223aac4df1..6e8d65e9b1d3 100644 |
495 |
+--- a/drivers/char/raw.c |
496 |
++++ b/drivers/char/raw.c |
497 |
+@@ -190,7 +190,7 @@ static int bind_get(int number, dev_t *dev) |
498 |
+ struct raw_device_data *rawdev; |
499 |
+ struct block_device *bdev; |
500 |
+ |
501 |
+- if (number <= 0 || number >= MAX_RAW_MINORS) |
502 |
++ if (number <= 0 || number >= max_raw_minors) |
503 |
+ return -EINVAL; |
504 |
+ |
505 |
+ rawdev = &raw_devices[number]; |
506 |
+diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c |
507 |
+index 89e109022d78..a9d98cdd11f4 100644 |
508 |
+--- a/drivers/edac/edac_mc.c |
509 |
++++ b/drivers/edac/edac_mc.c |
510 |
+@@ -559,7 +559,8 @@ static void edac_mc_workq_function(struct work_struct *work_req) |
511 |
+ * |
512 |
+ * called with the mem_ctls_mutex held |
513 |
+ */ |
514 |
+-static void edac_mc_workq_setup(struct mem_ctl_info *mci, unsigned msec) |
515 |
++static void edac_mc_workq_setup(struct mem_ctl_info *mci, unsigned msec, |
516 |
++ bool init) |
517 |
+ { |
518 |
+ edac_dbg(0, "\n"); |
519 |
+ |
520 |
+@@ -567,7 +568,9 @@ static void edac_mc_workq_setup(struct mem_ctl_info *mci, unsigned msec) |
521 |
+ if (mci->op_state != OP_RUNNING_POLL) |
522 |
+ return; |
523 |
+ |
524 |
+- INIT_DELAYED_WORK(&mci->work, edac_mc_workq_function); |
525 |
++ if (init) |
526 |
++ INIT_DELAYED_WORK(&mci->work, edac_mc_workq_function); |
527 |
++ |
528 |
+ mod_delayed_work(edac_workqueue, &mci->work, msecs_to_jiffies(msec)); |
529 |
+ } |
530 |
+ |
531 |
+@@ -601,7 +604,7 @@ static void edac_mc_workq_teardown(struct mem_ctl_info *mci) |
532 |
+ * user space has updated our poll period value, need to |
533 |
+ * reset our workq delays |
534 |
+ */ |
535 |
+-void edac_mc_reset_delay_period(int value) |
536 |
++void edac_mc_reset_delay_period(unsigned long value) |
537 |
+ { |
538 |
+ struct mem_ctl_info *mci; |
539 |
+ struct list_head *item; |
540 |
+@@ -611,7 +614,7 @@ void edac_mc_reset_delay_period(int value) |
541 |
+ list_for_each(item, &mc_devices) { |
542 |
+ mci = list_entry(item, struct mem_ctl_info, link); |
543 |
+ |
544 |
+- edac_mc_workq_setup(mci, (unsigned long) value); |
545 |
++ edac_mc_workq_setup(mci, value, false); |
546 |
+ } |
547 |
+ |
548 |
+ mutex_unlock(&mem_ctls_mutex); |
549 |
+@@ -782,7 +785,7 @@ int edac_mc_add_mc(struct mem_ctl_info *mci) |
550 |
+ /* This instance is NOW RUNNING */ |
551 |
+ mci->op_state = OP_RUNNING_POLL; |
552 |
+ |
553 |
+- edac_mc_workq_setup(mci, edac_mc_get_poll_msec()); |
554 |
++ edac_mc_workq_setup(mci, edac_mc_get_poll_msec(), true); |
555 |
+ } else { |
556 |
+ mci->op_state = OP_RUNNING_INTERRUPT; |
557 |
+ } |
558 |
+diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c |
559 |
+index c4d700a577d2..88cd940ece63 100644 |
560 |
+--- a/drivers/edac/edac_mc_sysfs.c |
561 |
++++ b/drivers/edac/edac_mc_sysfs.c |
562 |
+@@ -52,16 +52,20 @@ int edac_mc_get_poll_msec(void) |
563 |
+ |
564 |
+ static int edac_set_poll_msec(const char *val, struct kernel_param *kp) |
565 |
+ { |
566 |
+- long l; |
567 |
++ unsigned long l; |
568 |
+ int ret; |
569 |
+ |
570 |
+ if (!val) |
571 |
+ return -EINVAL; |
572 |
+ |
573 |
+- ret = strict_strtol(val, 0, &l); |
574 |
+- if (ret == -EINVAL || ((int)l != l)) |
575 |
++ ret = kstrtoul(val, 0, &l); |
576 |
++ if (ret) |
577 |
++ return ret; |
578 |
++ |
579 |
++ if (l < 1000) |
580 |
+ return -EINVAL; |
581 |
+- *((int *)kp->arg) = l; |
582 |
++ |
583 |
++ *((unsigned long *)kp->arg) = l; |
584 |
+ |
585 |
+ /* notify edac_mc engine to reset the poll period */ |
586 |
+ edac_mc_reset_delay_period(l); |
587 |
+diff --git a/drivers/edac/edac_module.h b/drivers/edac/edac_module.h |
588 |
+index 3d139c6e7fe3..f2118bfcf8df 100644 |
589 |
+--- a/drivers/edac/edac_module.h |
590 |
++++ b/drivers/edac/edac_module.h |
591 |
+@@ -52,7 +52,7 @@ extern void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev, |
592 |
+ extern void edac_device_workq_teardown(struct edac_device_ctl_info *edac_dev); |
593 |
+ extern void edac_device_reset_delay_period(struct edac_device_ctl_info |
594 |
+ *edac_dev, unsigned long value); |
595 |
+-extern void edac_mc_reset_delay_period(int value); |
596 |
++extern void edac_mc_reset_delay_period(unsigned long value); |
597 |
+ |
598 |
+ extern void *edac_align_ptr(void **p, unsigned size, int n_elems); |
599 |
+ |
600 |
+diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c |
601 |
+index 1b8c3707bf42..4cf21ec1abe3 100644 |
602 |
+--- a/drivers/gpu/drm/radeon/r600.c |
603 |
++++ b/drivers/gpu/drm/radeon/r600.c |
604 |
+@@ -4509,6 +4509,10 @@ restart_ih: |
605 |
+ break; |
606 |
+ } |
607 |
+ break; |
608 |
++ case 124: /* UVD */ |
609 |
++ DRM_DEBUG("IH: UVD int: 0x%08x\n", src_data); |
610 |
++ radeon_fence_process(rdev, R600_RING_TYPE_UVD_INDEX); |
611 |
++ break; |
612 |
+ case 176: /* CP_INT in ring buffer */ |
613 |
+ case 177: /* CP_INT in IB1 */ |
614 |
+ case 178: /* CP_INT in IB2 */ |
615 |
+diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c |
616 |
+index 3cf38ff09e70..03add5d5542e 100644 |
617 |
+--- a/drivers/gpu/drm/radeon/si.c |
618 |
++++ b/drivers/gpu/drm/radeon/si.c |
619 |
+@@ -5159,6 +5159,10 @@ restart_ih: |
620 |
+ break; |
621 |
+ } |
622 |
+ break; |
623 |
++ case 124: /* UVD */ |
624 |
++ DRM_DEBUG("IH: UVD int: 0x%08x\n", src_data); |
625 |
++ radeon_fence_process(rdev, R600_RING_TYPE_UVD_INDEX); |
626 |
++ break; |
627 |
+ case 146: |
628 |
+ case 147: |
629 |
+ dev_err(rdev->dev, "GPU fault detected: %d 0x%08x\n", src_id, src_data); |
630 |
+diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c |
631 |
+index 253a74ba245c..d4fac934b220 100644 |
632 |
+--- a/drivers/hv/connection.c |
633 |
++++ b/drivers/hv/connection.c |
634 |
+@@ -67,7 +67,6 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, |
635 |
+ int ret = 0; |
636 |
+ struct vmbus_channel_initiate_contact *msg; |
637 |
+ unsigned long flags; |
638 |
+- int t; |
639 |
+ |
640 |
+ init_completion(&msginfo->waitevent); |
641 |
+ |
642 |
+@@ -102,15 +101,7 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, |
643 |
+ } |
644 |
+ |
645 |
+ /* Wait for the connection response */ |
646 |
+- t = wait_for_completion_timeout(&msginfo->waitevent, 5*HZ); |
647 |
+- if (t == 0) { |
648 |
+- spin_lock_irqsave(&vmbus_connection.channelmsg_lock, |
649 |
+- flags); |
650 |
+- list_del(&msginfo->msglistentry); |
651 |
+- spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, |
652 |
+- flags); |
653 |
+- return -ETIMEDOUT; |
654 |
+- } |
655 |
++ wait_for_completion(&msginfo->waitevent); |
656 |
+ |
657 |
+ spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); |
658 |
+ list_del(&msginfo->msglistentry); |
659 |
+diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c |
660 |
+index d6d640a733d5..9297164a23a5 100644 |
661 |
+--- a/drivers/hwmon/ntc_thermistor.c |
662 |
++++ b/drivers/hwmon/ntc_thermistor.c |
663 |
+@@ -145,7 +145,7 @@ struct ntc_data { |
664 |
+ static int ntc_adc_iio_read(struct ntc_thermistor_platform_data *pdata) |
665 |
+ { |
666 |
+ struct iio_channel *channel = pdata->chan; |
667 |
+- unsigned int result; |
668 |
++ s64 result; |
669 |
+ int val, ret; |
670 |
+ |
671 |
+ ret = iio_read_channel_raw(channel, &val); |
672 |
+@@ -155,10 +155,10 @@ static int ntc_adc_iio_read(struct ntc_thermistor_platform_data *pdata) |
673 |
+ } |
674 |
+ |
675 |
+ /* unit: mV */ |
676 |
+- result = pdata->pullup_uv * val; |
677 |
++ result = pdata->pullup_uv * (s64) val; |
678 |
+ result >>= 12; |
679 |
+ |
680 |
+- return result; |
681 |
++ return (int)result; |
682 |
+ } |
683 |
+ |
684 |
+ static const struct of_device_id ntc_match[] = { |
685 |
+diff --git a/drivers/iio/imu/adis16400.h b/drivers/iio/imu/adis16400.h |
686 |
+index 2f8f9d632386..0916bf6b6c31 100644 |
687 |
+--- a/drivers/iio/imu/adis16400.h |
688 |
++++ b/drivers/iio/imu/adis16400.h |
689 |
+@@ -189,6 +189,7 @@ enum { |
690 |
+ ADIS16300_SCAN_INCLI_X, |
691 |
+ ADIS16300_SCAN_INCLI_Y, |
692 |
+ ADIS16400_SCAN_ADC, |
693 |
++ ADIS16400_SCAN_TIMESTAMP, |
694 |
+ }; |
695 |
+ |
696 |
+ #ifdef CONFIG_IIO_BUFFER |
697 |
+diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c |
698 |
+index e58c529aacdf..d6ece2d17dec 100644 |
699 |
+--- a/drivers/iio/imu/adis16400_core.c |
700 |
++++ b/drivers/iio/imu/adis16400_core.c |
701 |
+@@ -632,7 +632,7 @@ static const struct iio_chan_spec adis16400_channels[] = { |
702 |
+ ADIS16400_MAGN_CHAN(Z, ADIS16400_ZMAGN_OUT, 14), |
703 |
+ ADIS16400_TEMP_CHAN(ADIS16400_TEMP_OUT, 12), |
704 |
+ ADIS16400_AUX_ADC_CHAN(ADIS16400_AUX_ADC, 12), |
705 |
+- IIO_CHAN_SOFT_TIMESTAMP(12) |
706 |
++ IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP), |
707 |
+ }; |
708 |
+ |
709 |
+ static const struct iio_chan_spec adis16448_channels[] = { |
710 |
+@@ -659,7 +659,7 @@ static const struct iio_chan_spec adis16448_channels[] = { |
711 |
+ }, |
712 |
+ }, |
713 |
+ ADIS16400_TEMP_CHAN(ADIS16448_TEMP_OUT, 12), |
714 |
+- IIO_CHAN_SOFT_TIMESTAMP(11) |
715 |
++ IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP), |
716 |
+ }; |
717 |
+ |
718 |
+ static const struct iio_chan_spec adis16350_channels[] = { |
719 |
+@@ -677,7 +677,7 @@ static const struct iio_chan_spec adis16350_channels[] = { |
720 |
+ ADIS16400_MOD_TEMP_CHAN(X, ADIS16350_XTEMP_OUT, 12), |
721 |
+ ADIS16400_MOD_TEMP_CHAN(Y, ADIS16350_YTEMP_OUT, 12), |
722 |
+ ADIS16400_MOD_TEMP_CHAN(Z, ADIS16350_ZTEMP_OUT, 12), |
723 |
+- IIO_CHAN_SOFT_TIMESTAMP(11) |
724 |
++ IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP), |
725 |
+ }; |
726 |
+ |
727 |
+ static const struct iio_chan_spec adis16300_channels[] = { |
728 |
+@@ -690,7 +690,7 @@ static const struct iio_chan_spec adis16300_channels[] = { |
729 |
+ ADIS16400_AUX_ADC_CHAN(ADIS16300_AUX_ADC, 12), |
730 |
+ ADIS16400_INCLI_CHAN(X, ADIS16300_PITCH_OUT, 13), |
731 |
+ ADIS16400_INCLI_CHAN(Y, ADIS16300_ROLL_OUT, 13), |
732 |
+- IIO_CHAN_SOFT_TIMESTAMP(14) |
733 |
++ IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP), |
734 |
+ }; |
735 |
+ |
736 |
+ static const struct iio_chan_spec adis16334_channels[] = { |
737 |
+@@ -701,7 +701,7 @@ static const struct iio_chan_spec adis16334_channels[] = { |
738 |
+ ADIS16400_ACCEL_CHAN(Y, ADIS16400_YACCL_OUT, 14), |
739 |
+ ADIS16400_ACCEL_CHAN(Z, ADIS16400_ZACCL_OUT, 14), |
740 |
+ ADIS16400_TEMP_CHAN(ADIS16350_XTEMP_OUT, 12), |
741 |
+- IIO_CHAN_SOFT_TIMESTAMP(8) |
742 |
++ IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP), |
743 |
+ }; |
744 |
+ |
745 |
+ static struct attribute *adis16400_attributes[] = { |
746 |
+diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c |
747 |
+index bd8cb0f89ef1..14103ffb4839 100644 |
748 |
+--- a/drivers/infiniband/hw/qib/qib_iba7322.c |
749 |
++++ b/drivers/infiniband/hw/qib/qib_iba7322.c |
750 |
+@@ -2287,6 +2287,11 @@ static int qib_7322_bringup_serdes(struct qib_pportdata *ppd) |
751 |
+ qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); |
752 |
+ qib_write_kreg(dd, kr_scratch, 0ULL); |
753 |
+ |
754 |
++ /* ensure previous Tx parameters are not still forced */ |
755 |
++ qib_write_kreg_port(ppd, krp_tx_deemph_override, |
756 |
++ SYM_MASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0, |
757 |
++ reset_tx_deemphasis_override)); |
758 |
++ |
759 |
+ if (qib_compat_ddr_negotiate) { |
760 |
+ ppd->cpspec->ibdeltainprog = 1; |
761 |
+ ppd->cpspec->ibsymsnap = read_7322_creg32_port(ppd, |
762 |
+diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c |
763 |
+index afaa5d425e9a..e73740b55aea 100644 |
764 |
+--- a/drivers/md/raid1.c |
765 |
++++ b/drivers/md/raid1.c |
766 |
+@@ -1854,11 +1854,15 @@ static int process_checks(struct r1bio *r1_bio) |
767 |
+ for (i = 0; i < conf->raid_disks * 2; i++) { |
768 |
+ int j; |
769 |
+ int size; |
770 |
++ int uptodate; |
771 |
+ struct bio *b = r1_bio->bios[i]; |
772 |
+ if (b->bi_end_io != end_sync_read) |
773 |
+ continue; |
774 |
+- /* fixup the bio for reuse */ |
775 |
++ /* fixup the bio for reuse, but preserve BIO_UPTODATE */ |
776 |
++ uptodate = test_bit(BIO_UPTODATE, &b->bi_flags); |
777 |
+ bio_reset(b); |
778 |
++ if (!uptodate) |
779 |
++ clear_bit(BIO_UPTODATE, &b->bi_flags); |
780 |
+ b->bi_vcnt = vcnt; |
781 |
+ b->bi_size = r1_bio->sectors << 9; |
782 |
+ b->bi_sector = r1_bio->sector + |
783 |
+@@ -1891,11 +1895,14 @@ static int process_checks(struct r1bio *r1_bio) |
784 |
+ int j; |
785 |
+ struct bio *pbio = r1_bio->bios[primary]; |
786 |
+ struct bio *sbio = r1_bio->bios[i]; |
787 |
++ int uptodate = test_bit(BIO_UPTODATE, &sbio->bi_flags); |
788 |
+ |
789 |
+ if (sbio->bi_end_io != end_sync_read) |
790 |
+ continue; |
791 |
++ /* Now we can 'fixup' the BIO_UPTODATE flag */ |
792 |
++ set_bit(BIO_UPTODATE, &sbio->bi_flags); |
793 |
+ |
794 |
+- if (test_bit(BIO_UPTODATE, &sbio->bi_flags)) { |
795 |
++ if (uptodate) { |
796 |
+ for (j = vcnt; j-- ; ) { |
797 |
+ struct page *p, *s; |
798 |
+ p = pbio->bi_io_vec[j].bv_page; |
799 |
+@@ -1910,7 +1917,7 @@ static int process_checks(struct r1bio *r1_bio) |
800 |
+ if (j >= 0) |
801 |
+ atomic64_add(r1_bio->sectors, &mddev->resync_mismatches); |
802 |
+ if (j < 0 || (test_bit(MD_RECOVERY_CHECK, &mddev->recovery) |
803 |
+- && test_bit(BIO_UPTODATE, &sbio->bi_flags))) { |
804 |
++ && uptodate)) { |
805 |
+ /* No need to write to this device. */ |
806 |
+ sbio->bi_end_io = NULL; |
807 |
+ rdev_dec_pending(conf->mirrors[i].rdev, mddev); |
808 |
+diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c |
809 |
+index 740e3f42bef8..5e3c25d4562c 100644 |
810 |
+--- a/drivers/md/raid5.c |
811 |
++++ b/drivers/md/raid5.c |
812 |
+@@ -5037,23 +5037,43 @@ raid5_size(struct mddev *mddev, sector_t sectors, int raid_disks) |
813 |
+ return sectors * (raid_disks - conf->max_degraded); |
814 |
+ } |
815 |
+ |
816 |
++static void free_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu) |
817 |
++{ |
818 |
++ safe_put_page(percpu->spare_page); |
819 |
++ kfree(percpu->scribble); |
820 |
++ percpu->spare_page = NULL; |
821 |
++ percpu->scribble = NULL; |
822 |
++} |
823 |
++ |
824 |
++static int alloc_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu) |
825 |
++{ |
826 |
++ if (conf->level == 6 && !percpu->spare_page) |
827 |
++ percpu->spare_page = alloc_page(GFP_KERNEL); |
828 |
++ if (!percpu->scribble) |
829 |
++ percpu->scribble = kmalloc(conf->scribble_len, GFP_KERNEL); |
830 |
++ |
831 |
++ if (!percpu->scribble || (conf->level == 6 && !percpu->spare_page)) { |
832 |
++ free_scratch_buffer(conf, percpu); |
833 |
++ return -ENOMEM; |
834 |
++ } |
835 |
++ |
836 |
++ return 0; |
837 |
++} |
838 |
++ |
839 |
+ static void raid5_free_percpu(struct r5conf *conf) |
840 |
+ { |
841 |
+- struct raid5_percpu *percpu; |
842 |
+ unsigned long cpu; |
843 |
+ |
844 |
+ if (!conf->percpu) |
845 |
+ return; |
846 |
+ |
847 |
+- get_online_cpus(); |
848 |
+- for_each_possible_cpu(cpu) { |
849 |
+- percpu = per_cpu_ptr(conf->percpu, cpu); |
850 |
+- safe_put_page(percpu->spare_page); |
851 |
+- kfree(percpu->scribble); |
852 |
+- } |
853 |
+ #ifdef CONFIG_HOTPLUG_CPU |
854 |
+ unregister_cpu_notifier(&conf->cpu_notify); |
855 |
+ #endif |
856 |
++ |
857 |
++ get_online_cpus(); |
858 |
++ for_each_possible_cpu(cpu) |
859 |
++ free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); |
860 |
+ put_online_cpus(); |
861 |
+ |
862 |
+ free_percpu(conf->percpu); |
863 |
+@@ -5079,15 +5099,7 @@ static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action, |
864 |
+ switch (action) { |
865 |
+ case CPU_UP_PREPARE: |
866 |
+ case CPU_UP_PREPARE_FROZEN: |
867 |
+- if (conf->level == 6 && !percpu->spare_page) |
868 |
+- percpu->spare_page = alloc_page(GFP_KERNEL); |
869 |
+- if (!percpu->scribble) |
870 |
+- percpu->scribble = kmalloc(conf->scribble_len, GFP_KERNEL); |
871 |
+- |
872 |
+- if (!percpu->scribble || |
873 |
+- (conf->level == 6 && !percpu->spare_page)) { |
874 |
+- safe_put_page(percpu->spare_page); |
875 |
+- kfree(percpu->scribble); |
876 |
++ if (alloc_scratch_buffer(conf, percpu)) { |
877 |
+ pr_err("%s: failed memory allocation for cpu%ld\n", |
878 |
+ __func__, cpu); |
879 |
+ return notifier_from_errno(-ENOMEM); |
880 |
+@@ -5095,10 +5107,7 @@ static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action, |
881 |
+ break; |
882 |
+ case CPU_DEAD: |
883 |
+ case CPU_DEAD_FROZEN: |
884 |
+- safe_put_page(percpu->spare_page); |
885 |
+- kfree(percpu->scribble); |
886 |
+- percpu->spare_page = NULL; |
887 |
+- percpu->scribble = NULL; |
888 |
++ free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); |
889 |
+ break; |
890 |
+ default: |
891 |
+ break; |
892 |
+@@ -5110,40 +5119,29 @@ static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action, |
893 |
+ static int raid5_alloc_percpu(struct r5conf *conf) |
894 |
+ { |
895 |
+ unsigned long cpu; |
896 |
+- struct page *spare_page; |
897 |
+- struct raid5_percpu __percpu *allcpus; |
898 |
+- void *scribble; |
899 |
+- int err; |
900 |
++ int err = 0; |
901 |
+ |
902 |
+- allcpus = alloc_percpu(struct raid5_percpu); |
903 |
+- if (!allcpus) |
904 |
++ conf->percpu = alloc_percpu(struct raid5_percpu); |
905 |
++ if (!conf->percpu) |
906 |
+ return -ENOMEM; |
907 |
+- conf->percpu = allcpus; |
908 |
++ |
909 |
++#ifdef CONFIG_HOTPLUG_CPU |
910 |
++ conf->cpu_notify.notifier_call = raid456_cpu_notify; |
911 |
++ conf->cpu_notify.priority = 0; |
912 |
++ err = register_cpu_notifier(&conf->cpu_notify); |
913 |
++ if (err) |
914 |
++ return err; |
915 |
++#endif |
916 |
+ |
917 |
+ get_online_cpus(); |
918 |
+- err = 0; |
919 |
+ for_each_present_cpu(cpu) { |
920 |
+- if (conf->level == 6) { |
921 |
+- spare_page = alloc_page(GFP_KERNEL); |
922 |
+- if (!spare_page) { |
923 |
+- err = -ENOMEM; |
924 |
+- break; |
925 |
+- } |
926 |
+- per_cpu_ptr(conf->percpu, cpu)->spare_page = spare_page; |
927 |
+- } |
928 |
+- scribble = kmalloc(conf->scribble_len, GFP_KERNEL); |
929 |
+- if (!scribble) { |
930 |
+- err = -ENOMEM; |
931 |
++ err = alloc_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); |
932 |
++ if (err) { |
933 |
++ pr_err("%s: failed memory allocation for cpu%ld\n", |
934 |
++ __func__, cpu); |
935 |
+ break; |
936 |
+ } |
937 |
+- per_cpu_ptr(conf->percpu, cpu)->scribble = scribble; |
938 |
+ } |
939 |
+-#ifdef CONFIG_HOTPLUG_CPU |
940 |
+- conf->cpu_notify.notifier_call = raid456_cpu_notify; |
941 |
+- conf->cpu_notify.priority = 0; |
942 |
+- if (err == 0) |
943 |
+- err = register_cpu_notifier(&conf->cpu_notify); |
944 |
+-#endif |
945 |
+ put_online_cpus(); |
946 |
+ |
947 |
+ return err; |
948 |
+diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c |
949 |
+index e310ca6ed1a3..957fb36c7eb3 100644 |
950 |
+--- a/drivers/misc/mei/client.c |
951 |
++++ b/drivers/misc/mei/client.c |
952 |
+@@ -799,7 +799,6 @@ void mei_cl_all_disconnect(struct mei_device *dev) |
953 |
+ list_for_each_entry_safe(cl, next, &dev->file_list, link) { |
954 |
+ cl->state = MEI_FILE_DISCONNECTED; |
955 |
+ cl->mei_flow_ctrl_creds = 0; |
956 |
+- cl->read_cb = NULL; |
957 |
+ cl->timer_count = 0; |
958 |
+ } |
959 |
+ } |
960 |
+@@ -829,8 +828,16 @@ void mei_cl_all_read_wakeup(struct mei_device *dev) |
961 |
+ void mei_cl_all_write_clear(struct mei_device *dev) |
962 |
+ { |
963 |
+ struct mei_cl_cb *cb, *next; |
964 |
++ struct list_head *list; |
965 |
+ |
966 |
+- list_for_each_entry_safe(cb, next, &dev->write_list.list, list) { |
967 |
++ list = &dev->write_list.list; |
968 |
++ list_for_each_entry_safe(cb, next, list, list) { |
969 |
++ list_del(&cb->list); |
970 |
++ mei_io_cb_free(cb); |
971 |
++ } |
972 |
++ |
973 |
++ list = &dev->write_waiting_list.list; |
974 |
++ list_for_each_entry_safe(cb, next, list, list) { |
975 |
+ list_del(&cb->list); |
976 |
+ mei_io_cb_free(cb); |
977 |
+ } |
978 |
+diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c |
979 |
+index 17d7fece35d2..57fc06e0f434 100644 |
980 |
+--- a/drivers/net/wireless/ath/ar5523/ar5523.c |
981 |
++++ b/drivers/net/wireless/ath/ar5523/ar5523.c |
982 |
+@@ -1764,7 +1764,7 @@ static struct usb_device_id ar5523_id_table[] = { |
983 |
+ AR5523_DEVICE_UX(0x2001, 0x3a04), /* Dlink / DWLAG122 */ |
984 |
+ AR5523_DEVICE_UG(0x1690, 0x0712), /* Gigaset / AR5523 */ |
985 |
+ AR5523_DEVICE_UG(0x1690, 0x0710), /* Gigaset / SMCWUSBTG */ |
986 |
+- AR5523_DEVICE_UG(0x129b, 0x160c), /* Gigaset / USB stick 108 |
987 |
++ AR5523_DEVICE_UG(0x129b, 0x160b), /* Gigaset / USB stick 108 |
988 |
+ (CyberTAN Technology) */ |
989 |
+ AR5523_DEVICE_UG(0x16ab, 0x7801), /* Globalsun / AR5523_1 */ |
990 |
+ AR5523_DEVICE_UX(0x16ab, 0x7811), /* Globalsun / AR5523_2 */ |
991 |
+diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c |
992 |
+index 21e7edc7207c..04b3822ef93a 100644 |
993 |
+--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c |
994 |
++++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c |
995 |
+@@ -1331,21 +1331,22 @@ static void ath9k_htc_sta_rc_update(struct ieee80211_hw *hw, |
996 |
+ struct ath_common *common = ath9k_hw_common(priv->ah); |
997 |
+ struct ath9k_htc_target_rate trate; |
998 |
+ |
999 |
++ if (!(changed & IEEE80211_RC_SUPP_RATES_CHANGED)) |
1000 |
++ return; |
1001 |
++ |
1002 |
+ mutex_lock(&priv->mutex); |
1003 |
+ ath9k_htc_ps_wakeup(priv); |
1004 |
+ |
1005 |
+- if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) { |
1006 |
+- memset(&trate, 0, sizeof(struct ath9k_htc_target_rate)); |
1007 |
+- ath9k_htc_setup_rate(priv, sta, &trate); |
1008 |
+- if (!ath9k_htc_send_rate_cmd(priv, &trate)) |
1009 |
+- ath_dbg(common, CONFIG, |
1010 |
+- "Supported rates for sta: %pM updated, rate caps: 0x%X\n", |
1011 |
+- sta->addr, be32_to_cpu(trate.capflags)); |
1012 |
+- else |
1013 |
+- ath_dbg(common, CONFIG, |
1014 |
+- "Unable to update supported rates for sta: %pM\n", |
1015 |
+- sta->addr); |
1016 |
+- } |
1017 |
++ memset(&trate, 0, sizeof(struct ath9k_htc_target_rate)); |
1018 |
++ ath9k_htc_setup_rate(priv, sta, &trate); |
1019 |
++ if (!ath9k_htc_send_rate_cmd(priv, &trate)) |
1020 |
++ ath_dbg(common, CONFIG, |
1021 |
++ "Supported rates for sta: %pM updated, rate caps: 0x%X\n", |
1022 |
++ sta->addr, be32_to_cpu(trate.capflags)); |
1023 |
++ else |
1024 |
++ ath_dbg(common, CONFIG, |
1025 |
++ "Unable to update supported rates for sta: %pM\n", |
1026 |
++ sta->addr); |
1027 |
+ |
1028 |
+ ath9k_htc_ps_restore(priv); |
1029 |
+ mutex_unlock(&priv->mutex); |
1030 |
+diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c |
1031 |
+index 6199a0a597a6..a7cf535216c9 100644 |
1032 |
+--- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c |
1033 |
++++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c |
1034 |
+@@ -180,6 +180,11 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, |
1035 |
+ |
1036 |
+ for (ch_idx = 0; ch_idx < IWL_NUM_CHANNELS; ch_idx++) { |
1037 |
+ ch_flags = __le16_to_cpup(nvm_ch_flags + ch_idx); |
1038 |
++ |
1039 |
++ if (ch_idx >= NUM_2GHZ_CHANNELS && |
1040 |
++ !data->sku_cap_band_52GHz_enable) |
1041 |
++ ch_flags &= ~NVM_CHANNEL_VALID; |
1042 |
++ |
1043 |
+ if (!(ch_flags & NVM_CHANNEL_VALID)) { |
1044 |
+ IWL_DEBUG_EEPROM(dev, |
1045 |
+ "Ch. %d Flags %x [%sGHz] - No traffic\n", |
1046 |
+diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c |
1047 |
+index 8e1f6c095a9e..b987dfb879df 100644 |
1048 |
+--- a/drivers/net/wireless/iwlwifi/mvm/scan.c |
1049 |
++++ b/drivers/net/wireless/iwlwifi/mvm/scan.c |
1050 |
+@@ -313,7 +313,8 @@ int iwl_mvm_scan_request(struct iwl_mvm *mvm, |
1051 |
+ |
1052 |
+ iwl_mvm_scan_fill_ssids(cmd, req); |
1053 |
+ |
1054 |
+- cmd->tx_cmd.tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL); |
1055 |
++ cmd->tx_cmd.tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | |
1056 |
++ TX_CMD_FLG_BT_DIS); |
1057 |
+ cmd->tx_cmd.sta_id = mvm->aux_sta.sta_id; |
1058 |
+ cmd->tx_cmd.life_time = cpu_to_le32(TX_CMD_LIFE_TIME_INFINITE); |
1059 |
+ cmd->tx_cmd.rate_n_flags = |
1060 |
+diff --git a/drivers/net/wireless/iwlwifi/mvm/utils.c b/drivers/net/wireless/iwlwifi/mvm/utils.c |
1061 |
+index 687b34e387ac..0d9e08160fec 100644 |
1062 |
+--- a/drivers/net/wireless/iwlwifi/mvm/utils.c |
1063 |
++++ b/drivers/net/wireless/iwlwifi/mvm/utils.c |
1064 |
+@@ -401,6 +401,8 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm) |
1065 |
+ mvm->status, table.valid); |
1066 |
+ } |
1067 |
+ |
1068 |
++ IWL_ERR(mvm, "Loaded firmware version: %s\n", mvm->fw->fw_version); |
1069 |
++ |
1070 |
+ trace_iwlwifi_dev_ucode_error(trans->dev, table.error_id, table.tsf_low, |
1071 |
+ table.data1, table.data2, table.data3, |
1072 |
+ table.blink1, table.blink2, table.ilink1, |
1073 |
+diff --git a/drivers/of/address.c b/drivers/of/address.c |
1074 |
+index 9e69b4f0d204..00bc55cc821c 100644 |
1075 |
+--- a/drivers/of/address.c |
1076 |
++++ b/drivers/of/address.c |
1077 |
+@@ -99,11 +99,12 @@ static unsigned int of_bus_default_get_flags(const __be32 *addr) |
1078 |
+ static int of_bus_pci_match(struct device_node *np) |
1079 |
+ { |
1080 |
+ /* |
1081 |
++ * "pciex" is PCI Express |
1082 |
+ * "vci" is for the /chaos bridge on 1st-gen PCI powermacs |
1083 |
+ * "ht" is hypertransport |
1084 |
+ */ |
1085 |
+- return !strcmp(np->type, "pci") || !strcmp(np->type, "vci") || |
1086 |
+- !strcmp(np->type, "ht"); |
1087 |
++ return !strcmp(np->type, "pci") || !strcmp(np->type, "pciex") || |
1088 |
++ !strcmp(np->type, "vci") || !strcmp(np->type, "ht"); |
1089 |
+ } |
1090 |
+ |
1091 |
+ static void of_bus_pci_count_cells(struct device_node *np, |
1092 |
+diff --git a/drivers/power/max17040_battery.c b/drivers/power/max17040_battery.c |
1093 |
+index c7ff6d67f158..0fbac861080d 100644 |
1094 |
+--- a/drivers/power/max17040_battery.c |
1095 |
++++ b/drivers/power/max17040_battery.c |
1096 |
+@@ -148,7 +148,7 @@ static void max17040_get_online(struct i2c_client *client) |
1097 |
+ { |
1098 |
+ struct max17040_chip *chip = i2c_get_clientdata(client); |
1099 |
+ |
1100 |
+- if (chip->pdata->battery_online) |
1101 |
++ if (chip->pdata && chip->pdata->battery_online) |
1102 |
+ chip->online = chip->pdata->battery_online(); |
1103 |
+ else |
1104 |
+ chip->online = 1; |
1105 |
+@@ -158,7 +158,8 @@ static void max17040_get_status(struct i2c_client *client) |
1106 |
+ { |
1107 |
+ struct max17040_chip *chip = i2c_get_clientdata(client); |
1108 |
+ |
1109 |
+- if (!chip->pdata->charger_online || !chip->pdata->charger_enable) { |
1110 |
++ if (!chip->pdata || !chip->pdata->charger_online |
1111 |
++ || !chip->pdata->charger_enable) { |
1112 |
+ chip->status = POWER_SUPPLY_STATUS_UNKNOWN; |
1113 |
+ return; |
1114 |
+ } |
1115 |
+diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c |
1116 |
+index ca99ac9295cf..32b7bb111eb6 100644 |
1117 |
+--- a/drivers/spi/spi.c |
1118 |
++++ b/drivers/spi/spi.c |
1119 |
+@@ -584,9 +584,7 @@ static void spi_pump_messages(struct kthread_work *work) |
1120 |
+ ret = master->transfer_one_message(master, master->cur_msg); |
1121 |
+ if (ret) { |
1122 |
+ dev_err(&master->dev, |
1123 |
+- "failed to transfer one message from queue: %d\n", ret); |
1124 |
+- master->cur_msg->status = ret; |
1125 |
+- spi_finalize_current_message(master); |
1126 |
++ "failed to transfer one message from queue\n"); |
1127 |
+ return; |
1128 |
+ } |
1129 |
+ } |
1130 |
+diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c |
1131 |
+index f847bbc175e7..acb66a9513cf 100644 |
1132 |
+--- a/drivers/staging/comedi/drivers/adv_pci1710.c |
1133 |
++++ b/drivers/staging/comedi/drivers/adv_pci1710.c |
1134 |
+@@ -489,6 +489,7 @@ static int pci171x_insn_write_ao(struct comedi_device *dev, |
1135 |
+ struct comedi_insn *insn, unsigned int *data) |
1136 |
+ { |
1137 |
+ struct pci1710_private *devpriv = dev->private; |
1138 |
++ unsigned int val; |
1139 |
+ int n, chan, range, ofs; |
1140 |
+ |
1141 |
+ chan = CR_CHAN(insn->chanspec); |
1142 |
+@@ -504,11 +505,14 @@ static int pci171x_insn_write_ao(struct comedi_device *dev, |
1143 |
+ outw(devpriv->da_ranges, dev->iobase + PCI171x_DAREF); |
1144 |
+ ofs = PCI171x_DA1; |
1145 |
+ } |
1146 |
++ val = devpriv->ao_data[chan]; |
1147 |
+ |
1148 |
+- for (n = 0; n < insn->n; n++) |
1149 |
+- outw(data[n], dev->iobase + ofs); |
1150 |
++ for (n = 0; n < insn->n; n++) { |
1151 |
++ val = data[n]; |
1152 |
++ outw(val, dev->iobase + ofs); |
1153 |
++ } |
1154 |
+ |
1155 |
+- devpriv->ao_data[chan] = data[n]; |
1156 |
++ devpriv->ao_data[chan] = val; |
1157 |
+ |
1158 |
+ return n; |
1159 |
+ |
1160 |
+@@ -678,6 +682,7 @@ static int pci1720_insn_write_ao(struct comedi_device *dev, |
1161 |
+ struct comedi_insn *insn, unsigned int *data) |
1162 |
+ { |
1163 |
+ struct pci1710_private *devpriv = dev->private; |
1164 |
++ unsigned int val; |
1165 |
+ int n, rangereg, chan; |
1166 |
+ |
1167 |
+ chan = CR_CHAN(insn->chanspec); |
1168 |
+@@ -687,13 +692,15 @@ static int pci1720_insn_write_ao(struct comedi_device *dev, |
1169 |
+ outb(rangereg, dev->iobase + PCI1720_RANGE); |
1170 |
+ devpriv->da_ranges = rangereg; |
1171 |
+ } |
1172 |
++ val = devpriv->ao_data[chan]; |
1173 |
+ |
1174 |
+ for (n = 0; n < insn->n; n++) { |
1175 |
+- outw(data[n], dev->iobase + PCI1720_DA0 + (chan << 1)); |
1176 |
++ val = data[n]; |
1177 |
++ outw(val, dev->iobase + PCI1720_DA0 + (chan << 1)); |
1178 |
+ outb(0, dev->iobase + PCI1720_SYNCOUT); /* update outputs */ |
1179 |
+ } |
1180 |
+ |
1181 |
+- devpriv->ao_data[chan] = data[n]; |
1182 |
++ devpriv->ao_data[chan] = val; |
1183 |
+ |
1184 |
+ return n; |
1185 |
+ } |
1186 |
+diff --git a/drivers/staging/iio/adc/ad799x_core.c b/drivers/staging/iio/adc/ad799x_core.c |
1187 |
+index 8dc97b36e05a..b0cb2de93050 100644 |
1188 |
+--- a/drivers/staging/iio/adc/ad799x_core.c |
1189 |
++++ b/drivers/staging/iio/adc/ad799x_core.c |
1190 |
+@@ -644,7 +644,8 @@ static int ad799x_probe(struct i2c_client *client, |
1191 |
+ return 0; |
1192 |
+ |
1193 |
+ error_free_irq: |
1194 |
+- free_irq(client->irq, indio_dev); |
1195 |
++ if (client->irq > 0) |
1196 |
++ free_irq(client->irq, indio_dev); |
1197 |
+ error_cleanup_ring: |
1198 |
+ ad799x_ring_cleanup(indio_dev); |
1199 |
+ error_disable_reg: |
1200 |
+diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c |
1201 |
+index 642239015b46..3ee7217e25b2 100644 |
1202 |
+--- a/drivers/tty/n_gsm.c |
1203 |
++++ b/drivers/tty/n_gsm.c |
1204 |
+@@ -1089,6 +1089,7 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen) |
1205 |
+ { |
1206 |
+ unsigned int addr = 0; |
1207 |
+ unsigned int modem = 0; |
1208 |
++ unsigned int brk = 0; |
1209 |
+ struct gsm_dlci *dlci; |
1210 |
+ int len = clen; |
1211 |
+ u8 *dp = data; |
1212 |
+@@ -1115,6 +1116,16 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen) |
1213 |
+ if (len == 0) |
1214 |
+ return; |
1215 |
+ } |
1216 |
++ len--; |
1217 |
++ if (len > 0) { |
1218 |
++ while (gsm_read_ea(&brk, *dp++) == 0) { |
1219 |
++ len--; |
1220 |
++ if (len == 0) |
1221 |
++ return; |
1222 |
++ } |
1223 |
++ modem <<= 7; |
1224 |
++ modem |= (brk & 0x7f); |
1225 |
++ } |
1226 |
+ tty = tty_port_tty_get(&dlci->port); |
1227 |
+ gsm_process_modem(tty, dlci, modem, clen); |
1228 |
+ if (tty) { |
1229 |
+diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c |
1230 |
+index 740202d8a5c4..0d1b3757cfb6 100644 |
1231 |
+--- a/drivers/tty/vt/vt.c |
1232 |
++++ b/drivers/tty/vt/vt.c |
1233 |
+@@ -1164,6 +1164,8 @@ static void csi_J(struct vc_data *vc, int vpar) |
1234 |
+ scr_memsetw(vc->vc_screenbuf, vc->vc_video_erase_char, |
1235 |
+ vc->vc_screenbuf_size >> 1); |
1236 |
+ set_origin(vc); |
1237 |
++ if (CON_IS_VISIBLE(vc)) |
1238 |
++ update_screen(vc); |
1239 |
+ /* fall through */ |
1240 |
+ case 2: /* erase whole display */ |
1241 |
+ count = vc->vc_cols * vc->vc_rows; |
1242 |
+diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c |
1243 |
+index d3aa353908aa..d53547d2e4c7 100644 |
1244 |
+--- a/drivers/usb/core/hcd.c |
1245 |
++++ b/drivers/usb/core/hcd.c |
1246 |
+@@ -1010,7 +1010,6 @@ static int register_root_hub(struct usb_hcd *hcd) |
1247 |
+ dev_name(&usb_dev->dev), retval); |
1248 |
+ return retval; |
1249 |
+ } |
1250 |
+- usb_dev->lpm_capable = usb_device_supports_lpm(usb_dev); |
1251 |
+ } |
1252 |
+ |
1253 |
+ retval = usb_new_device (usb_dev); |
1254 |
+diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c |
1255 |
+index e604645a1290..3a2eb4cc8959 100644 |
1256 |
+--- a/drivers/usb/core/hub.c |
1257 |
++++ b/drivers/usb/core/hub.c |
1258 |
+@@ -135,7 +135,7 @@ struct usb_hub *usb_hub_to_struct_hub(struct usb_device *hdev) |
1259 |
+ return usb_get_intfdata(hdev->actconfig->interface[0]); |
1260 |
+ } |
1261 |
+ |
1262 |
+-int usb_device_supports_lpm(struct usb_device *udev) |
1263 |
++static int usb_device_supports_lpm(struct usb_device *udev) |
1264 |
+ { |
1265 |
+ /* USB 2.1 (and greater) devices indicate LPM support through |
1266 |
+ * their USB 2.0 Extended Capabilities BOS descriptor. |
1267 |
+@@ -156,11 +156,6 @@ int usb_device_supports_lpm(struct usb_device *udev) |
1268 |
+ "Power management will be impacted.\n"); |
1269 |
+ return 0; |
1270 |
+ } |
1271 |
+- |
1272 |
+- /* udev is root hub */ |
1273 |
+- if (!udev->parent) |
1274 |
+- return 1; |
1275 |
+- |
1276 |
+ if (udev->parent->lpm_capable) |
1277 |
+ return 1; |
1278 |
+ |
1279 |
+diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h |
1280 |
+index c49383669cd8..823857767a16 100644 |
1281 |
+--- a/drivers/usb/core/usb.h |
1282 |
++++ b/drivers/usb/core/usb.h |
1283 |
+@@ -35,7 +35,6 @@ extern int usb_get_device_descriptor(struct usb_device *dev, |
1284 |
+ unsigned int size); |
1285 |
+ extern int usb_get_bos_descriptor(struct usb_device *dev); |
1286 |
+ extern void usb_release_bos_descriptor(struct usb_device *dev); |
1287 |
+-extern int usb_device_supports_lpm(struct usb_device *udev); |
1288 |
+ extern char *usb_cache_string(struct usb_device *udev, int index); |
1289 |
+ extern int usb_set_configuration(struct usb_device *dev, int configuration); |
1290 |
+ extern int usb_choose_configuration(struct usb_device *udev); |
1291 |
+diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c |
1292 |
+index 089248c1d597..b7446a69d2a9 100644 |
1293 |
+--- a/drivers/usb/serial/ftdi_sio.c |
1294 |
++++ b/drivers/usb/serial/ftdi_sio.c |
1295 |
+@@ -155,6 +155,7 @@ static struct usb_device_id id_table_combined [] = { |
1296 |
+ { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, |
1297 |
+ { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, |
1298 |
+ { USB_DEVICE(FTDI_VID, FTDI_NXTCAM_PID) }, |
1299 |
++ { USB_DEVICE(FTDI_VID, FTDI_EV3CON_PID) }, |
1300 |
+ { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) }, |
1301 |
+ { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) }, |
1302 |
+ { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) }, |
1303 |
+@@ -194,6 +195,8 @@ static struct usb_device_id id_table_combined [] = { |
1304 |
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, |
1305 |
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, |
1306 |
+ { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) }, |
1307 |
++ { USB_DEVICE(FTDI_VID, FTDI_TAGSYS_LP101_PID) }, |
1308 |
++ { USB_DEVICE(FTDI_VID, FTDI_TAGSYS_P200X_PID) }, |
1309 |
+ { USB_DEVICE(FTDI_VID, FTDI_LENZ_LIUSB_PID) }, |
1310 |
+ { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) }, |
1311 |
+ { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) }, |
1312 |
+diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h |
1313 |
+index a7019d1e3058..1e2d369df86e 100644 |
1314 |
+--- a/drivers/usb/serial/ftdi_sio_ids.h |
1315 |
++++ b/drivers/usb/serial/ftdi_sio_ids.h |
1316 |
+@@ -50,6 +50,7 @@ |
1317 |
+ #define TI_XDS100V2_PID 0xa6d0 |
1318 |
+ |
1319 |
+ #define FTDI_NXTCAM_PID 0xABB8 /* NXTCam for Mindstorms NXT */ |
1320 |
++#define FTDI_EV3CON_PID 0xABB9 /* Mindstorms EV3 Console Adapter */ |
1321 |
+ |
1322 |
+ /* US Interface Navigator (http://www.usinterface.com/) */ |
1323 |
+ #define FTDI_USINT_CAT_PID 0xb810 /* Navigator CAT and 2nd PTT lines */ |
1324 |
+@@ -363,6 +364,12 @@ |
1325 |
+ /* Sprog II (Andrew Crosland's SprogII DCC interface) */ |
1326 |
+ #define FTDI_SPROG_II 0xF0C8 |
1327 |
+ |
1328 |
++/* |
1329 |
++ * Two of the Tagsys RFID Readers |
1330 |
++ */ |
1331 |
++#define FTDI_TAGSYS_LP101_PID 0xF0E9 /* Tagsys L-P101 RFID*/ |
1332 |
++#define FTDI_TAGSYS_P200X_PID 0xF0EE /* Tagsys Medio P200x RFID*/ |
1333 |
++ |
1334 |
+ /* an infrared receiver for user access control with IR tags */ |
1335 |
+ #define FTDI_PIEGROUP_PID 0xF208 /* Product Id */ |
1336 |
+ |
1337 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
1338 |
+index 5c86f57e4afa..216d20affba8 100644 |
1339 |
+--- a/drivers/usb/serial/option.c |
1340 |
++++ b/drivers/usb/serial/option.c |
1341 |
+@@ -1362,7 +1362,8 @@ static const struct usb_device_id option_ids[] = { |
1342 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1267, 0xff, 0xff, 0xff) }, |
1343 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1268, 0xff, 0xff, 0xff) }, |
1344 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1269, 0xff, 0xff, 0xff) }, |
1345 |
+- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1270, 0xff, 0xff, 0xff) }, |
1346 |
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1270, 0xff, 0xff, 0xff), |
1347 |
++ .driver_info = (kernel_ulong_t)&net_intf5_blacklist }, |
1348 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1271, 0xff, 0xff, 0xff) }, |
1349 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1272, 0xff, 0xff, 0xff) }, |
1350 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1273, 0xff, 0xff, 0xff) }, |
1351 |
+diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c |
1352 |
+index c65437cfd4a2..968a40201e5f 100644 |
1353 |
+--- a/drivers/usb/serial/qcserial.c |
1354 |
++++ b/drivers/usb/serial/qcserial.c |
1355 |
+@@ -139,6 +139,9 @@ static const struct usb_device_id id_table[] = { |
1356 |
+ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 0)}, /* Sierra Wireless EM7700 Device Management */ |
1357 |
+ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 2)}, /* Sierra Wireless EM7700 NMEA */ |
1358 |
+ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 3)}, /* Sierra Wireless EM7700 Modem */ |
1359 |
++ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 0)}, /* Netgear AirCard 340U Device Management */ |
1360 |
++ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 2)}, /* Netgear AirCard 340U NMEA */ |
1361 |
++ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 3)}, /* Netgear AirCard 340U Modem */ |
1362 |
+ |
1363 |
+ { } /* Terminating entry */ |
1364 |
+ }; |
1365 |
+diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig |
1366 |
+index 8470e1b114f2..1dd0604d1911 100644 |
1367 |
+--- a/drivers/usb/storage/Kconfig |
1368 |
++++ b/drivers/usb/storage/Kconfig |
1369 |
+@@ -18,7 +18,9 @@ config USB_STORAGE |
1370 |
+ |
1371 |
+ This option depends on 'SCSI' support being enabled, but you |
1372 |
+ probably also need 'SCSI device support: SCSI disk support' |
1373 |
+- (BLK_DEV_SD) for most USB storage devices. |
1374 |
++ (BLK_DEV_SD) for most USB storage devices. Some devices also |
1375 |
++ will require 'Probe all LUNs on each SCSI device' |
1376 |
++ (SCSI_MULTI_LUN). |
1377 |
+ |
1378 |
+ To compile this driver as a module, choose M here: the |
1379 |
+ module will be called usb-storage. |
1380 |
+diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c |
1381 |
+index 5db153260827..bb7bf198caab 100644 |
1382 |
+--- a/drivers/usb/storage/scsiglue.c |
1383 |
++++ b/drivers/usb/storage/scsiglue.c |
1384 |
+@@ -78,6 +78,8 @@ static const char* host_info(struct Scsi_Host *host) |
1385 |
+ |
1386 |
+ static int slave_alloc (struct scsi_device *sdev) |
1387 |
+ { |
1388 |
++ struct us_data *us = host_to_us(sdev->host); |
1389 |
++ |
1390 |
+ /* |
1391 |
+ * Set the INQUIRY transfer length to 36. We don't use any of |
1392 |
+ * the extra data and many devices choke if asked for more or |
1393 |
+@@ -102,6 +104,10 @@ static int slave_alloc (struct scsi_device *sdev) |
1394 |
+ */ |
1395 |
+ blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1)); |
1396 |
+ |
1397 |
++ /* Tell the SCSI layer if we know there is more than one LUN */ |
1398 |
++ if (us->protocol == USB_PR_BULK && us->max_lun > 0) |
1399 |
++ sdev->sdev_bflags |= BLIST_FORCELUN; |
1400 |
++ |
1401 |
+ return 0; |
1402 |
+ } |
1403 |
+ |
1404 |
+diff --git a/drivers/usb/storage/unusual_cypress.h b/drivers/usb/storage/unusual_cypress.h |
1405 |
+index 65a6a75066a8..82e8ed0324e3 100644 |
1406 |
+--- a/drivers/usb/storage/unusual_cypress.h |
1407 |
++++ b/drivers/usb/storage/unusual_cypress.h |
1408 |
+@@ -31,7 +31,7 @@ UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999, |
1409 |
+ "Cypress ISD-300LP", |
1410 |
+ USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0), |
1411 |
+ |
1412 |
+-UNUSUAL_DEV( 0x14cd, 0x6116, 0x0000, 0x0219, |
1413 |
++UNUSUAL_DEV( 0x14cd, 0x6116, 0x0160, 0x0160, |
1414 |
+ "Super Top", |
1415 |
+ "USB 2.0 SATA BRIDGE", |
1416 |
+ USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0), |
1417 |
+diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h |
1418 |
+index ad06255c2ade..adbeb255616a 100644 |
1419 |
+--- a/drivers/usb/storage/unusual_devs.h |
1420 |
++++ b/drivers/usb/storage/unusual_devs.h |
1421 |
+@@ -1455,6 +1455,13 @@ UNUSUAL_DEV( 0x0f88, 0x042e, 0x0100, 0x0100, |
1422 |
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1423 |
+ US_FL_FIX_CAPACITY ), |
1424 |
+ |
1425 |
++/* Reported by Moritz Moeller-Herrmann <moritz-kernel@××××××××××××××××.de> */ |
1426 |
++UNUSUAL_DEV( 0x0fca, 0x8004, 0x0201, 0x0201, |
1427 |
++ "Research In Motion", |
1428 |
++ "BlackBerry Bold 9000", |
1429 |
++ USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1430 |
++ US_FL_MAX_SECTORS_64 ), |
1431 |
++ |
1432 |
+ /* Reported by Michael Stattmann <michael@×××××××××.com> */ |
1433 |
+ UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, |
1434 |
+ "Sony Ericsson", |
1435 |
+diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c |
1436 |
+index 64bfea314429..8ca1030675a6 100644 |
1437 |
+--- a/drivers/vme/bridges/vme_ca91cx42.c |
1438 |
++++ b/drivers/vme/bridges/vme_ca91cx42.c |
1439 |
+@@ -880,7 +880,7 @@ static ssize_t ca91cx42_master_read(struct vme_master_resource *image, |
1440 |
+ if (done == count) |
1441 |
+ goto out; |
1442 |
+ } |
1443 |
+- if ((uintptr_t)addr & 0x2) { |
1444 |
++ if ((uintptr_t)(addr + done) & 0x2) { |
1445 |
+ if ((count - done) < 2) { |
1446 |
+ *(u8 *)(buf + done) = ioread8(addr + done); |
1447 |
+ done += 1; |
1448 |
+@@ -934,7 +934,7 @@ static ssize_t ca91cx42_master_write(struct vme_master_resource *image, |
1449 |
+ if (done == count) |
1450 |
+ goto out; |
1451 |
+ } |
1452 |
+- if ((uintptr_t)addr & 0x2) { |
1453 |
++ if ((uintptr_t)(addr + done) & 0x2) { |
1454 |
+ if ((count - done) < 2) { |
1455 |
+ iowrite8(*(u8 *)(buf + done), addr + done); |
1456 |
+ done += 1; |
1457 |
+diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c |
1458 |
+index 9c1aa4dc39c9..63424060b04f 100644 |
1459 |
+--- a/drivers/vme/bridges/vme_tsi148.c |
1460 |
++++ b/drivers/vme/bridges/vme_tsi148.c |
1461 |
+@@ -1283,7 +1283,7 @@ static ssize_t tsi148_master_read(struct vme_master_resource *image, void *buf, |
1462 |
+ if (done == count) |
1463 |
+ goto out; |
1464 |
+ } |
1465 |
+- if ((uintptr_t)addr & 0x2) { |
1466 |
++ if ((uintptr_t)(addr + done) & 0x2) { |
1467 |
+ if ((count - done) < 2) { |
1468 |
+ *(u8 *)(buf + done) = ioread8(addr + done); |
1469 |
+ done += 1; |
1470 |
+@@ -1365,7 +1365,7 @@ static ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf, |
1471 |
+ if (done == count) |
1472 |
+ goto out; |
1473 |
+ } |
1474 |
+- if ((uintptr_t)addr & 0x2) { |
1475 |
++ if ((uintptr_t)(addr + done) & 0x2) { |
1476 |
+ if ((count - done) < 2) { |
1477 |
+ iowrite8(*(u8 *)(buf + done), addr + done); |
1478 |
+ done += 1; |
1479 |
+diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c |
1480 |
+index 45e944fe52a6..8dccf73025b3 100644 |
1481 |
+--- a/fs/bio-integrity.c |
1482 |
++++ b/fs/bio-integrity.c |
1483 |
+@@ -114,6 +114,14 @@ void bio_integrity_free(struct bio *bio) |
1484 |
+ } |
1485 |
+ EXPORT_SYMBOL(bio_integrity_free); |
1486 |
+ |
1487 |
++static inline unsigned int bip_integrity_vecs(struct bio_integrity_payload *bip) |
1488 |
++{ |
1489 |
++ if (bip->bip_slab == BIO_POOL_NONE) |
1490 |
++ return BIP_INLINE_VECS; |
1491 |
++ |
1492 |
++ return bvec_nr_vecs(bip->bip_slab); |
1493 |
++} |
1494 |
++ |
1495 |
+ /** |
1496 |
+ * bio_integrity_add_page - Attach integrity metadata |
1497 |
+ * @bio: bio to update |
1498 |
+@@ -129,7 +137,7 @@ int bio_integrity_add_page(struct bio *bio, struct page *page, |
1499 |
+ struct bio_integrity_payload *bip = bio->bi_integrity; |
1500 |
+ struct bio_vec *iv; |
1501 |
+ |
1502 |
+- if (bip->bip_vcnt >= bvec_nr_vecs(bip->bip_slab)) { |
1503 |
++ if (bip->bip_vcnt >= bip_integrity_vecs(bip)) { |
1504 |
+ printk(KERN_ERR "%s: bip_vec full\n", __func__); |
1505 |
+ return 0; |
1506 |
+ } |
1507 |
+diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c |
1508 |
+index 51f5e0ee7237..494b68349667 100644 |
1509 |
+--- a/fs/cifs/cifsacl.c |
1510 |
++++ b/fs/cifs/cifsacl.c |
1511 |
+@@ -1027,15 +1027,30 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 nmode, |
1512 |
+ __u32 secdesclen = 0; |
1513 |
+ struct cifs_ntsd *pntsd = NULL; /* acl obtained from server */ |
1514 |
+ struct cifs_ntsd *pnntsd = NULL; /* modified acl to be sent to server */ |
1515 |
++ struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
1516 |
++ struct tcon_link *tlink = cifs_sb_tlink(cifs_sb); |
1517 |
++ struct cifs_tcon *tcon; |
1518 |
++ |
1519 |
++ if (IS_ERR(tlink)) |
1520 |
++ return PTR_ERR(tlink); |
1521 |
++ tcon = tlink_tcon(tlink); |
1522 |
+ |
1523 |
+ cifs_dbg(NOISY, "set ACL from mode for %s\n", path); |
1524 |
+ |
1525 |
+ /* Get the security descriptor */ |
1526 |
+- pntsd = get_cifs_acl(CIFS_SB(inode->i_sb), inode, path, &secdesclen); |
1527 |
++ |
1528 |
++ if (tcon->ses->server->ops->get_acl == NULL) { |
1529 |
++ cifs_put_tlink(tlink); |
1530 |
++ return -EOPNOTSUPP; |
1531 |
++ } |
1532 |
++ |
1533 |
++ pntsd = tcon->ses->server->ops->get_acl(cifs_sb, inode, path, |
1534 |
++ &secdesclen); |
1535 |
+ if (IS_ERR(pntsd)) { |
1536 |
+ rc = PTR_ERR(pntsd); |
1537 |
+ cifs_dbg(VFS, "%s: error %d getting sec desc\n", __func__, rc); |
1538 |
+- goto out; |
1539 |
++ cifs_put_tlink(tlink); |
1540 |
++ return rc; |
1541 |
+ } |
1542 |
+ |
1543 |
+ /* |
1544 |
+@@ -1048,6 +1063,7 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 nmode, |
1545 |
+ pnntsd = kmalloc(secdesclen, GFP_KERNEL); |
1546 |
+ if (!pnntsd) { |
1547 |
+ kfree(pntsd); |
1548 |
++ cifs_put_tlink(tlink); |
1549 |
+ return -ENOMEM; |
1550 |
+ } |
1551 |
+ |
1552 |
+@@ -1056,14 +1072,18 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 nmode, |
1553 |
+ |
1554 |
+ cifs_dbg(NOISY, "build_sec_desc rc: %d\n", rc); |
1555 |
+ |
1556 |
++ if (tcon->ses->server->ops->set_acl == NULL) |
1557 |
++ rc = -EOPNOTSUPP; |
1558 |
++ |
1559 |
+ if (!rc) { |
1560 |
+ /* Set the security descriptor */ |
1561 |
+- rc = set_cifs_acl(pnntsd, secdesclen, inode, path, aclflag); |
1562 |
++ rc = tcon->ses->server->ops->set_acl(pnntsd, secdesclen, inode, |
1563 |
++ path, aclflag); |
1564 |
+ cifs_dbg(NOISY, "set_cifs_acl rc: %d\n", rc); |
1565 |
+ } |
1566 |
++ cifs_put_tlink(tlink); |
1567 |
+ |
1568 |
+ kfree(pnntsd); |
1569 |
+ kfree(pntsd); |
1570 |
+-out: |
1571 |
+ return rc; |
1572 |
+ } |
1573 |
+diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h |
1574 |
+index ea3a0b3018a5..e2c2d96491fa 100644 |
1575 |
+--- a/fs/cifs/cifsglob.h |
1576 |
++++ b/fs/cifs/cifsglob.h |
1577 |
+@@ -370,6 +370,16 @@ struct smb_version_operations { |
1578 |
+ void (*new_lease_key)(struct cifs_fid *fid); |
1579 |
+ int (*calc_signature)(struct smb_rqst *rqst, |
1580 |
+ struct TCP_Server_Info *server); |
1581 |
++ ssize_t (*query_all_EAs)(const unsigned int, struct cifs_tcon *, |
1582 |
++ const unsigned char *, const unsigned char *, char *, |
1583 |
++ size_t, const struct nls_table *, int); |
1584 |
++ int (*set_EA)(const unsigned int, struct cifs_tcon *, const char *, |
1585 |
++ const char *, const void *, const __u16, |
1586 |
++ const struct nls_table *, int); |
1587 |
++ struct cifs_ntsd * (*get_acl)(struct cifs_sb_info *, struct inode *, |
1588 |
++ const char *, u32 *); |
1589 |
++ int (*set_acl)(struct cifs_ntsd *, __u32, struct inode *, const char *, |
1590 |
++ int); |
1591 |
+ }; |
1592 |
+ |
1593 |
+ struct smb_version_values { |
1594 |
+diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c |
1595 |
+index 449b6cf09b09..9d463501348f 100644 |
1596 |
+--- a/fs/cifs/inode.c |
1597 |
++++ b/fs/cifs/inode.c |
1598 |
+@@ -490,10 +490,15 @@ static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path, |
1599 |
+ return PTR_ERR(tlink); |
1600 |
+ tcon = tlink_tcon(tlink); |
1601 |
+ |
1602 |
+- rc = CIFSSMBQAllEAs(xid, tcon, path, "SETFILEBITS", |
1603 |
+- ea_value, 4 /* size of buf */, cifs_sb->local_nls, |
1604 |
+- cifs_sb->mnt_cifs_flags & |
1605 |
+- CIFS_MOUNT_MAP_SPECIAL_CHR); |
1606 |
++ if (tcon->ses->server->ops->query_all_EAs == NULL) { |
1607 |
++ cifs_put_tlink(tlink); |
1608 |
++ return -EOPNOTSUPP; |
1609 |
++ } |
1610 |
++ |
1611 |
++ rc = tcon->ses->server->ops->query_all_EAs(xid, tcon, path, |
1612 |
++ "SETFILEBITS", ea_value, 4 /* size of buf */, |
1613 |
++ cifs_sb->local_nls, |
1614 |
++ cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
1615 |
+ cifs_put_tlink(tlink); |
1616 |
+ if (rc < 0) |
1617 |
+ return (int)rc; |
1618 |
+diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c |
1619 |
+index 3efdb9d5c0b8..4885a40f3210 100644 |
1620 |
+--- a/fs/cifs/smb1ops.c |
1621 |
++++ b/fs/cifs/smb1ops.c |
1622 |
+@@ -948,6 +948,14 @@ struct smb_version_operations smb1_operations = { |
1623 |
+ .mand_lock = cifs_mand_lock, |
1624 |
+ .mand_unlock_range = cifs_unlock_range, |
1625 |
+ .push_mand_locks = cifs_push_mandatory_locks, |
1626 |
++#ifdef CONFIG_CIFS_XATTR |
1627 |
++ .query_all_EAs = CIFSSMBQAllEAs, |
1628 |
++ .set_EA = CIFSSMBSetEA, |
1629 |
++#endif /* CIFS_XATTR */ |
1630 |
++#ifdef CONFIG_CIFS_ACL |
1631 |
++ .get_acl = get_cifs_acl, |
1632 |
++ .set_acl = set_cifs_acl, |
1633 |
++#endif /* CIFS_ACL */ |
1634 |
+ }; |
1635 |
+ |
1636 |
+ struct smb_version_values smb1_values = { |
1637 |
+diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c |
1638 |
+index 09afda4cc58e..5ac836a86b18 100644 |
1639 |
+--- a/fs/cifs/xattr.c |
1640 |
++++ b/fs/cifs/xattr.c |
1641 |
+@@ -82,9 +82,11 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name) |
1642 |
+ goto remove_ea_exit; |
1643 |
+ |
1644 |
+ ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */ |
1645 |
+- rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, NULL, |
1646 |
+- (__u16)0, cifs_sb->local_nls, |
1647 |
+- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
1648 |
++ if (pTcon->ses->server->ops->set_EA) |
1649 |
++ rc = pTcon->ses->server->ops->set_EA(xid, pTcon, |
1650 |
++ full_path, ea_name, NULL, (__u16)0, |
1651 |
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & |
1652 |
++ CIFS_MOUNT_MAP_SPECIAL_CHR); |
1653 |
+ } |
1654 |
+ remove_ea_exit: |
1655 |
+ kfree(full_path); |
1656 |
+@@ -149,18 +151,22 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, |
1657 |
+ cifs_dbg(FYI, "attempt to set cifs inode metadata\n"); |
1658 |
+ |
1659 |
+ ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */ |
1660 |
+- rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value, |
1661 |
+- (__u16)value_size, cifs_sb->local_nls, |
1662 |
+- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
1663 |
++ if (pTcon->ses->server->ops->set_EA) |
1664 |
++ rc = pTcon->ses->server->ops->set_EA(xid, pTcon, |
1665 |
++ full_path, ea_name, ea_value, (__u16)value_size, |
1666 |
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & |
1667 |
++ CIFS_MOUNT_MAP_SPECIAL_CHR); |
1668 |
+ } else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) |
1669 |
+ == 0) { |
1670 |
+ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
1671 |
+ goto set_ea_exit; |
1672 |
+ |
1673 |
+ ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */ |
1674 |
+- rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value, |
1675 |
+- (__u16)value_size, cifs_sb->local_nls, |
1676 |
+- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
1677 |
++ if (pTcon->ses->server->ops->set_EA) |
1678 |
++ rc = pTcon->ses->server->ops->set_EA(xid, pTcon, |
1679 |
++ full_path, ea_name, ea_value, (__u16)value_size, |
1680 |
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & |
1681 |
++ CIFS_MOUNT_MAP_SPECIAL_CHR); |
1682 |
+ } else if (strncmp(ea_name, CIFS_XATTR_CIFS_ACL, |
1683 |
+ strlen(CIFS_XATTR_CIFS_ACL)) == 0) { |
1684 |
+ #ifdef CONFIG_CIFS_ACL |
1685 |
+@@ -170,8 +176,12 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, |
1686 |
+ rc = -ENOMEM; |
1687 |
+ } else { |
1688 |
+ memcpy(pacl, ea_value, value_size); |
1689 |
+- rc = set_cifs_acl(pacl, value_size, |
1690 |
+- direntry->d_inode, full_path, CIFS_ACL_DACL); |
1691 |
++ if (pTcon->ses->server->ops->set_acl) |
1692 |
++ rc = pTcon->ses->server->ops->set_acl(pacl, |
1693 |
++ value_size, direntry->d_inode, |
1694 |
++ full_path, CIFS_ACL_DACL); |
1695 |
++ else |
1696 |
++ rc = -EOPNOTSUPP; |
1697 |
+ if (rc == 0) /* force revalidate of the inode */ |
1698 |
+ CIFS_I(direntry->d_inode)->time = 0; |
1699 |
+ kfree(pacl); |
1700 |
+@@ -272,17 +282,21 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, |
1701 |
+ /* revalidate/getattr then populate from inode */ |
1702 |
+ } /* BB add else when above is implemented */ |
1703 |
+ ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */ |
1704 |
+- rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value, |
1705 |
+- buf_size, cifs_sb->local_nls, |
1706 |
+- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
1707 |
++ if (pTcon->ses->server->ops->query_all_EAs) |
1708 |
++ rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon, |
1709 |
++ full_path, ea_name, ea_value, buf_size, |
1710 |
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & |
1711 |
++ CIFS_MOUNT_MAP_SPECIAL_CHR); |
1712 |
+ } else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) == 0) { |
1713 |
+ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
1714 |
+ goto get_ea_exit; |
1715 |
+ |
1716 |
+ ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */ |
1717 |
+- rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value, |
1718 |
+- buf_size, cifs_sb->local_nls, |
1719 |
+- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
1720 |
++ if (pTcon->ses->server->ops->query_all_EAs) |
1721 |
++ rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon, |
1722 |
++ full_path, ea_name, ea_value, buf_size, |
1723 |
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & |
1724 |
++ CIFS_MOUNT_MAP_SPECIAL_CHR); |
1725 |
+ } else if (strncmp(ea_name, POSIX_ACL_XATTR_ACCESS, |
1726 |
+ strlen(POSIX_ACL_XATTR_ACCESS)) == 0) { |
1727 |
+ #ifdef CONFIG_CIFS_POSIX |
1728 |
+@@ -313,8 +327,11 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, |
1729 |
+ u32 acllen; |
1730 |
+ struct cifs_ntsd *pacl; |
1731 |
+ |
1732 |
+- pacl = get_cifs_acl(cifs_sb, direntry->d_inode, |
1733 |
+- full_path, &acllen); |
1734 |
++ if (pTcon->ses->server->ops->get_acl == NULL) |
1735 |
++ goto get_ea_exit; /* rc already EOPNOTSUPP */ |
1736 |
++ |
1737 |
++ pacl = pTcon->ses->server->ops->get_acl(cifs_sb, |
1738 |
++ direntry->d_inode, full_path, &acllen); |
1739 |
+ if (IS_ERR(pacl)) { |
1740 |
+ rc = PTR_ERR(pacl); |
1741 |
+ cifs_dbg(VFS, "%s: error %zd getting sec desc\n", |
1742 |
+@@ -400,11 +417,12 @@ ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size) |
1743 |
+ /* if proc/fs/cifs/streamstoxattr is set then |
1744 |
+ search server for EAs or streams to |
1745 |
+ returns as xattrs */ |
1746 |
+- rc = CIFSSMBQAllEAs(xid, pTcon, full_path, NULL, data, |
1747 |
+- buf_size, cifs_sb->local_nls, |
1748 |
+- cifs_sb->mnt_cifs_flags & |
1749 |
+- CIFS_MOUNT_MAP_SPECIAL_CHR); |
1750 |
+ |
1751 |
++ if (pTcon->ses->server->ops->query_all_EAs) |
1752 |
++ rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon, |
1753 |
++ full_path, NULL, data, buf_size, |
1754 |
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & |
1755 |
++ CIFS_MOUNT_MAP_SPECIAL_CHR); |
1756 |
+ list_ea_exit: |
1757 |
+ kfree(full_path); |
1758 |
+ free_xid(xid); |
1759 |
+diff --git a/fs/file.c b/fs/file.c |
1760 |
+index 4a78f981557a..9de20265a78c 100644 |
1761 |
+--- a/fs/file.c |
1762 |
++++ b/fs/file.c |
1763 |
+@@ -34,7 +34,7 @@ static void *alloc_fdmem(size_t size) |
1764 |
+ * vmalloc() if the allocation size will be considered "large" by the VM. |
1765 |
+ */ |
1766 |
+ if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) { |
1767 |
+- void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN); |
1768 |
++ void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY); |
1769 |
+ if (data != NULL) |
1770 |
+ return data; |
1771 |
+ } |
1772 |
+diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c |
1773 |
+index 8ebd3f551e0c..ffc4045fc62e 100644 |
1774 |
+--- a/fs/lockd/svclock.c |
1775 |
++++ b/fs/lockd/svclock.c |
1776 |
+@@ -767,6 +767,7 @@ nlmsvc_grant_blocked(struct nlm_block *block) |
1777 |
+ struct nlm_file *file = block->b_file; |
1778 |
+ struct nlm_lock *lock = &block->b_call->a_args.lock; |
1779 |
+ int error; |
1780 |
++ loff_t fl_start, fl_end; |
1781 |
+ |
1782 |
+ dprintk("lockd: grant blocked lock %p\n", block); |
1783 |
+ |
1784 |
+@@ -784,9 +785,16 @@ nlmsvc_grant_blocked(struct nlm_block *block) |
1785 |
+ } |
1786 |
+ |
1787 |
+ /* Try the lock operation again */ |
1788 |
++ /* vfs_lock_file() can mangle fl_start and fl_end, but we need |
1789 |
++ * them unchanged for the GRANT_MSG |
1790 |
++ */ |
1791 |
+ lock->fl.fl_flags |= FL_SLEEP; |
1792 |
++ fl_start = lock->fl.fl_start; |
1793 |
++ fl_end = lock->fl.fl_end; |
1794 |
+ error = vfs_lock_file(file->f_file, F_SETLK, &lock->fl, NULL); |
1795 |
+ lock->fl.fl_flags &= ~FL_SLEEP; |
1796 |
++ lock->fl.fl_start = fl_start; |
1797 |
++ lock->fl.fl_end = fl_end; |
1798 |
+ |
1799 |
+ switch (error) { |
1800 |
+ case 0: |
1801 |
+diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h |
1802 |
+index ded429966c1f..2507fd2a1eb4 100644 |
1803 |
+--- a/include/linux/compiler-gcc4.h |
1804 |
++++ b/include/linux/compiler-gcc4.h |
1805 |
+@@ -75,11 +75,7 @@ |
1806 |
+ * |
1807 |
+ * (asm goto is automatically volatile - the naming reflects this.) |
1808 |
+ */ |
1809 |
+-#if GCC_VERSION <= 40801 |
1810 |
+-# define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) |
1811 |
+-#else |
1812 |
+-# define asm_volatile_goto(x...) do { asm goto(x); } while (0) |
1813 |
+-#endif |
1814 |
++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) |
1815 |
+ |
1816 |
+ #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP |
1817 |
+ #if GCC_VERSION >= 40400 |
1818 |
+diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c |
1819 |
+index 192a302d6cfd..8ab8e9390297 100644 |
1820 |
+--- a/kernel/irq/irqdesc.c |
1821 |
++++ b/kernel/irq/irqdesc.c |
1822 |
+@@ -274,6 +274,7 @@ struct irq_desc *irq_to_desc(unsigned int irq) |
1823 |
+ { |
1824 |
+ return (irq < NR_IRQS) ? irq_desc + irq : NULL; |
1825 |
+ } |
1826 |
++EXPORT_SYMBOL(irq_to_desc); |
1827 |
+ |
1828 |
+ static void free_desc(unsigned int irq) |
1829 |
+ { |
1830 |
+diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c |
1831 |
+index 7a925ba456fb..a6a5bf53e86d 100644 |
1832 |
+--- a/kernel/time/jiffies.c |
1833 |
++++ b/kernel/time/jiffies.c |
1834 |
+@@ -51,7 +51,13 @@ |
1835 |
+ * HZ shrinks, so values greater than 8 overflow 32bits when |
1836 |
+ * HZ=100. |
1837 |
+ */ |
1838 |
++#if HZ < 34 |
1839 |
++#define JIFFIES_SHIFT 6 |
1840 |
++#elif HZ < 67 |
1841 |
++#define JIFFIES_SHIFT 7 |
1842 |
++#else |
1843 |
+ #define JIFFIES_SHIFT 8 |
1844 |
++#endif |
1845 |
+ |
1846 |
+ static cycle_t jiffies_read(struct clocksource *cs) |
1847 |
+ { |
1848 |
+diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c |
1849 |
+index 52d4827cf2d4..f681da32a2ff 100644 |
1850 |
+--- a/kernel/time/tick-broadcast.c |
1851 |
++++ b/kernel/time/tick-broadcast.c |
1852 |
+@@ -745,6 +745,7 @@ out: |
1853 |
+ static void tick_broadcast_clear_oneshot(int cpu) |
1854 |
+ { |
1855 |
+ cpumask_clear_cpu(cpu, tick_broadcast_oneshot_mask); |
1856 |
++ cpumask_clear_cpu(cpu, tick_broadcast_pending_mask); |
1857 |
+ } |
1858 |
+ |
1859 |
+ static void tick_broadcast_init_next_event(struct cpumask *mask, |
1860 |
+diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c |
1861 |
+index e444ff88f0a4..fd12cc56371f 100644 |
1862 |
+--- a/kernel/trace/ring_buffer.c |
1863 |
++++ b/kernel/trace/ring_buffer.c |
1864 |
+@@ -2396,6 +2396,13 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, |
1865 |
+ write &= RB_WRITE_MASK; |
1866 |
+ tail = write - length; |
1867 |
+ |
1868 |
++ /* |
1869 |
++ * If this is the first commit on the page, then it has the same |
1870 |
++ * timestamp as the page itself. |
1871 |
++ */ |
1872 |
++ if (!tail) |
1873 |
++ delta = 0; |
1874 |
++ |
1875 |
+ /* See if we shot pass the end of this buffer page */ |
1876 |
+ if (unlikely(write > BUF_PAGE_SIZE)) |
1877 |
+ return rb_move_tail(cpu_buffer, length, tail, |
1878 |
+diff --git a/mm/memory-failure.c b/mm/memory-failure.c |
1879 |
+index f2a591d87d00..e386beefc994 100644 |
1880 |
+--- a/mm/memory-failure.c |
1881 |
++++ b/mm/memory-failure.c |
1882 |
+@@ -943,8 +943,10 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, |
1883 |
+ * to it. Similarly, page lock is shifted. |
1884 |
+ */ |
1885 |
+ if (hpage != p) { |
1886 |
+- put_page(hpage); |
1887 |
+- get_page(p); |
1888 |
++ if (!(flags & MF_COUNT_INCREASED)) { |
1889 |
++ put_page(hpage); |
1890 |
++ get_page(p); |
1891 |
++ } |
1892 |
+ lock_page(p); |
1893 |
+ unlock_page(hpage); |
1894 |
+ *hpagep = p; |
1895 |
+diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c |
1896 |
+index 18687f1fca75..e922bf3f422c 100644 |
1897 |
+--- a/net/mac80211/cfg.c |
1898 |
++++ b/net/mac80211/cfg.c |
1899 |
+@@ -975,8 +975,10 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, |
1900 |
+ IEEE80211_P2P_OPPPS_ENABLE_BIT; |
1901 |
+ |
1902 |
+ err = ieee80211_assign_beacon(sdata, ¶ms->beacon); |
1903 |
+- if (err < 0) |
1904 |
++ if (err < 0) { |
1905 |
++ ieee80211_vif_release_channel(sdata); |
1906 |
+ return err; |
1907 |
++ } |
1908 |
+ changed |= err; |
1909 |
+ |
1910 |
+ err = drv_start_ap(sdata->local, sdata); |
1911 |
+@@ -985,6 +987,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, |
1912 |
+ if (old) |
1913 |
+ kfree_rcu(old, rcu_head); |
1914 |
+ RCU_INIT_POINTER(sdata->u.ap.beacon, NULL); |
1915 |
++ ieee80211_vif_release_channel(sdata); |
1916 |
+ return err; |
1917 |
+ } |
1918 |
+ |
1919 |
+@@ -2476,6 +2479,24 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local, |
1920 |
+ INIT_DELAYED_WORK(&roc->work, ieee80211_sw_roc_work); |
1921 |
+ INIT_LIST_HEAD(&roc->dependents); |
1922 |
+ |
1923 |
++ /* |
1924 |
++ * cookie is either the roc cookie (for normal roc) |
1925 |
++ * or the SKB (for mgmt TX) |
1926 |
++ */ |
1927 |
++ if (!txskb) { |
1928 |
++ /* local->mtx protects this */ |
1929 |
++ local->roc_cookie_counter++; |
1930 |
++ roc->cookie = local->roc_cookie_counter; |
1931 |
++ /* wow, you wrapped 64 bits ... more likely a bug */ |
1932 |
++ if (WARN_ON(roc->cookie == 0)) { |
1933 |
++ roc->cookie = 1; |
1934 |
++ local->roc_cookie_counter++; |
1935 |
++ } |
1936 |
++ *cookie = roc->cookie; |
1937 |
++ } else { |
1938 |
++ *cookie = (unsigned long)txskb; |
1939 |
++ } |
1940 |
++ |
1941 |
+ /* if there's one pending or we're scanning, queue this one */ |
1942 |
+ if (!list_empty(&local->roc_list) || |
1943 |
+ local->scanning || local->radar_detect_enabled) |
1944 |
+@@ -2610,24 +2631,6 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local, |
1945 |
+ if (!queued) |
1946 |
+ list_add_tail(&roc->list, &local->roc_list); |
1947 |
+ |
1948 |
+- /* |
1949 |
+- * cookie is either the roc cookie (for normal roc) |
1950 |
+- * or the SKB (for mgmt TX) |
1951 |
+- */ |
1952 |
+- if (!txskb) { |
1953 |
+- /* local->mtx protects this */ |
1954 |
+- local->roc_cookie_counter++; |
1955 |
+- roc->cookie = local->roc_cookie_counter; |
1956 |
+- /* wow, you wrapped 64 bits ... more likely a bug */ |
1957 |
+- if (WARN_ON(roc->cookie == 0)) { |
1958 |
+- roc->cookie = 1; |
1959 |
+- local->roc_cookie_counter++; |
1960 |
+- } |
1961 |
+- *cookie = roc->cookie; |
1962 |
+- } else { |
1963 |
+- *cookie = (unsigned long)txskb; |
1964 |
+- } |
1965 |
+- |
1966 |
+ return 0; |
1967 |
+ } |
1968 |
+ |
1969 |
+diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c |
1970 |
+index cc65cdddb047..fe9d6e7b904b 100644 |
1971 |
+--- a/net/mac80211/tx.c |
1972 |
++++ b/net/mac80211/tx.c |
1973 |
+@@ -854,7 +854,7 @@ static int ieee80211_fragment(struct ieee80211_tx_data *tx, |
1974 |
+ } |
1975 |
+ |
1976 |
+ /* adjust first fragment's length */ |
1977 |
+- skb->len = hdrlen + per_fragm; |
1978 |
++ skb_trim(skb, hdrlen + per_fragm); |
1979 |
+ return 0; |
1980 |
+ } |
1981 |
+ |
1982 |
+diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c |
1983 |
+index 45f9a3377dcd..4319a3824727 100644 |
1984 |
+--- a/scripts/mod/file2alias.c |
1985 |
++++ b/scripts/mod/file2alias.c |
1986 |
+@@ -208,8 +208,8 @@ static void do_usb_entry(void *symval, |
1987 |
+ range_lo < 0x9 ? "[%X-9" : "[%X", |
1988 |
+ range_lo); |
1989 |
+ sprintf(alias + strlen(alias), |
1990 |
+- range_hi > 0xA ? "a-%X]" : "%X]", |
1991 |
+- range_lo); |
1992 |
++ range_hi > 0xA ? "A-%X]" : "%X]", |
1993 |
++ range_hi); |
1994 |
+ } |
1995 |
+ } |
1996 |
+ if (bcdDevice_initial_digits < (sizeof(bcdDevice_lo) * 2 - 1)) |
1997 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
1998 |
+index 87a03aca1b2e..e0bdcb3ecf0e 100644 |
1999 |
+--- a/sound/pci/hda/patch_realtek.c |
2000 |
++++ b/sound/pci/hda/patch_realtek.c |
2001 |
+@@ -3700,6 +3700,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
2002 |
+ SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), |
2003 |
+ SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), |
2004 |
+ SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101), |
2005 |
++ SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), |
2006 |
+ SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), |
2007 |
+ SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), |
2008 |
+ SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
2009 |
+diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c |
2010 |
+index 88b2fe3ddf42..00d86427af0f 100644 |
2011 |
+--- a/virt/kvm/coalesced_mmio.c |
2012 |
++++ b/virt/kvm/coalesced_mmio.c |
2013 |
+@@ -154,17 +154,13 @@ int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm, |
2014 |
+ list_add_tail(&dev->list, &kvm->coalesced_zones); |
2015 |
+ mutex_unlock(&kvm->slots_lock); |
2016 |
+ |
2017 |
+- return ret; |
2018 |
++ return 0; |
2019 |
+ |
2020 |
+ out_free_dev: |
2021 |
+ mutex_unlock(&kvm->slots_lock); |
2022 |
+- |
2023 |
+ kfree(dev); |
2024 |
+ |
2025 |
+- if (dev == NULL) |
2026 |
+- return -ENXIO; |
2027 |
+- |
2028 |
+- return 0; |
2029 |
++ return ret; |
2030 |
+ } |
2031 |
+ |
2032 |
+ int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, |