1 |
commit: a7ca0939dc7e39edf65eba8207bab7dafe56fa3b |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 31 23:48:49 2016 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 23:48:49 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a7ca0939 |
7 |
|
8 |
Linux patch 3.12.53 |
9 |
|
10 |
0000_README | 4 + |
11 |
1052_linux-3.12.53.patch | 1128 ++++++++++++++++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 1132 insertions(+) |
13 |
|
14 |
diff --git a/0000_README b/0000_README |
15 |
index 6e9c22c..d9d82c3 100644 |
16 |
--- a/0000_README |
17 |
+++ b/0000_README |
18 |
@@ -250,6 +250,10 @@ Patch: 1051_linux-3.12.52.patch |
19 |
From: http://www.kernel.org |
20 |
Desc: Linux 3.12.52 |
21 |
|
22 |
+Patch: 1052_linux-3.12.53.patch |
23 |
+From: http://www.kernel.org |
24 |
+Desc: Linux 3.12.53 |
25 |
+ |
26 |
Patch: 1500_XATTR_USER_PREFIX.patch |
27 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
28 |
Desc: Support for namespace user.pax.* on tmpfs. |
29 |
|
30 |
diff --git a/1052_linux-3.12.53.patch b/1052_linux-3.12.53.patch |
31 |
new file mode 100644 |
32 |
index 0000000..3eefc18 |
33 |
--- /dev/null |
34 |
+++ b/1052_linux-3.12.53.patch |
35 |
@@ -0,0 +1,1128 @@ |
36 |
+diff --git a/MAINTAINERS b/MAINTAINERS |
37 |
+index ffcaf975bed7..44881abcfb06 100644 |
38 |
+--- a/MAINTAINERS |
39 |
++++ b/MAINTAINERS |
40 |
+@@ -8151,6 +8151,7 @@ F: include/linux/swiotlb.h |
41 |
+ |
42 |
+ SYNOPSYS ARC ARCHITECTURE |
43 |
+ M: Vineet Gupta <vgupta@××××××××.com> |
44 |
++L: linux-snps-arc@×××××××××××××××.org |
45 |
+ S: Supported |
46 |
+ F: arch/arc/ |
47 |
+ F: Documentation/devicetree/bindings/arc/ |
48 |
+diff --git a/Makefile b/Makefile |
49 |
+index 0314ac5a52ca..3a572ff5b8e3 100644 |
50 |
+--- a/Makefile |
51 |
++++ b/Makefile |
52 |
+@@ -1,6 +1,6 @@ |
53 |
+ VERSION = 3 |
54 |
+ PATCHLEVEL = 12 |
55 |
+-SUBLEVEL = 52 |
56 |
++SUBLEVEL = 53 |
57 |
+ EXTRAVERSION = |
58 |
+ NAME = One Giant Leap for Frogkind |
59 |
+ |
60 |
+diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c |
61 |
+index 87bfe549ad3f..92273fa6804a 100644 |
62 |
+--- a/arch/blackfin/mach-common/pm.c |
63 |
++++ b/arch/blackfin/mach-common/pm.c |
64 |
+@@ -144,7 +144,7 @@ int bfin_pm_suspend_mem_enter(void) |
65 |
+ |
66 |
+ unsigned char *memptr = kmalloc(L1_CODE_LENGTH + L1_DATA_A_LENGTH |
67 |
+ + L1_DATA_B_LENGTH + L1_SCRATCH_LENGTH, |
68 |
+- GFP_KERNEL); |
69 |
++ GFP_ATOMIC); |
70 |
+ |
71 |
+ if (memptr == NULL) { |
72 |
+ panic("bf53x_suspend_l1_mem malloc failed"); |
73 |
+diff --git a/arch/m32r/include/asm/pgalloc.h b/arch/m32r/include/asm/pgalloc.h |
74 |
+index 0fc736198979..ac4208bcc5ad 100644 |
75 |
+--- a/arch/m32r/include/asm/pgalloc.h |
76 |
++++ b/arch/m32r/include/asm/pgalloc.h |
77 |
+@@ -43,6 +43,8 @@ static __inline__ pgtable_t pte_alloc_one(struct mm_struct *mm, |
78 |
+ { |
79 |
+ struct page *pte = alloc_page(GFP_KERNEL|__GFP_ZERO); |
80 |
+ |
81 |
++ if (!pte) |
82 |
++ return NULL; |
83 |
+ pgtable_page_ctor(pte); |
84 |
+ return pte; |
85 |
+ } |
86 |
+diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S |
87 |
+index ac85f16534af..4180f8b20374 100644 |
88 |
+--- a/arch/m68k/kernel/head.S |
89 |
++++ b/arch/m68k/kernel/head.S |
90 |
+@@ -2909,7 +2909,9 @@ func_start serial_init,%d0/%d1/%a0/%a1 |
91 |
+ |
92 |
+ #if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B) |
93 |
+ movel %pc@(L(mac_sccbase)),%a0 |
94 |
+- /* Reset SCC device */ |
95 |
++ /* Reset SCC register pointer */ |
96 |
++ moveb %a0@(mac_scc_cha_a_ctrl_offset),%d0 |
97 |
++ /* Reset SCC device: write register pointer then register value */ |
98 |
+ moveb #9,%a0@(mac_scc_cha_a_ctrl_offset) |
99 |
+ moveb #0xc0,%a0@(mac_scc_cha_a_ctrl_offset) |
100 |
+ /* Wait for 5 PCLK cycles, which is about 68 CPU cycles */ |
101 |
+diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c |
102 |
+index f0eef0491f77..97136b5e47e0 100644 |
103 |
+--- a/arch/m68k/mm/fault.c |
104 |
++++ b/arch/m68k/mm/fault.c |
105 |
+@@ -77,8 +77,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address, |
106 |
+ |
107 |
+ #ifdef DEBUG |
108 |
+ printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n", |
109 |
+- regs->sr, regs->pc, address, error_code, |
110 |
+- current->mm->pgd); |
111 |
++ regs->sr, regs->pc, address, error_code, mm ? mm->pgd : NULL); |
112 |
+ #endif |
113 |
+ |
114 |
+ /* |
115 |
+diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c |
116 |
+index 211974a386d6..ed6e0be80b3b 100644 |
117 |
+--- a/arch/powerpc/kvm/book3s_hv.c |
118 |
++++ b/arch/powerpc/kvm/book3s_hv.c |
119 |
+@@ -160,6 +160,12 @@ void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu) |
120 |
+ |
121 |
+ void kvmppc_set_msr(struct kvm_vcpu *vcpu, u64 msr) |
122 |
+ { |
123 |
++ /* |
124 |
++ * Check for illegal transactional state bit combination |
125 |
++ * and if we find it, force the TS field to a safe state. |
126 |
++ */ |
127 |
++ if ((msr & MSR_TS_MASK) == MSR_TS_MASK) |
128 |
++ msr &= ~MSR_TS_MASK; |
129 |
+ vcpu->arch.shregs.msr = msr; |
130 |
+ kvmppc_end_cede(vcpu); |
131 |
+ } |
132 |
+diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h |
133 |
+index 4fa687a47a62..6b8d6e8cd449 100644 |
134 |
+--- a/arch/x86/include/asm/boot.h |
135 |
++++ b/arch/x86/include/asm/boot.h |
136 |
+@@ -27,7 +27,7 @@ |
137 |
+ #define BOOT_HEAP_SIZE 0x400000 |
138 |
+ #else /* !CONFIG_KERNEL_BZIP2 */ |
139 |
+ |
140 |
+-#define BOOT_HEAP_SIZE 0x8000 |
141 |
++#define BOOT_HEAP_SIZE 0x10000 |
142 |
+ |
143 |
+ #endif /* !CONFIG_KERNEL_BZIP2 */ |
144 |
+ |
145 |
+diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c |
146 |
+index cb74a04c56c8..8134735f98e4 100644 |
147 |
+--- a/arch/x86/kernel/reboot.c |
148 |
++++ b/arch/x86/kernel/reboot.c |
149 |
+@@ -180,6 +180,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { |
150 |
+ DMI_MATCH(DMI_PRODUCT_NAME, "iMac9,1"), |
151 |
+ }, |
152 |
+ }, |
153 |
++ { /* Handle problems with rebooting on the iMac10,1. */ |
154 |
++ .callback = set_pci_reboot, |
155 |
++ .ident = "Apple iMac10,1", |
156 |
++ .matches = { |
157 |
++ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), |
158 |
++ DMI_MATCH(DMI_PRODUCT_NAME, "iMac10,1"), |
159 |
++ }, |
160 |
++ }, |
161 |
+ |
162 |
+ /* ASRock */ |
163 |
+ { /* Handle problems with rebooting on ASRock Q1900DC-ITX */ |
164 |
+diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c |
165 |
+index b88fc86309bc..5d3e60156683 100644 |
166 |
+--- a/arch/x86/kernel/signal.c |
167 |
++++ b/arch/x86/kernel/signal.c |
168 |
+@@ -682,12 +682,15 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs) |
169 |
+ signal_setup_done(failed, ksig, test_thread_flag(TIF_SINGLESTEP)); |
170 |
+ } |
171 |
+ |
172 |
+-#ifdef CONFIG_X86_32 |
173 |
+-#define NR_restart_syscall __NR_restart_syscall |
174 |
+-#else /* !CONFIG_X86_32 */ |
175 |
+-#define NR_restart_syscall \ |
176 |
+- test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : __NR_restart_syscall |
177 |
+-#endif /* CONFIG_X86_32 */ |
178 |
++static inline unsigned long get_nr_restart_syscall(const struct pt_regs *regs) |
179 |
++{ |
180 |
++#if defined(CONFIG_X86_32) || !defined(CONFIG_X86_64) |
181 |
++ return __NR_restart_syscall; |
182 |
++#else /* !CONFIG_X86_32 && CONFIG_X86_64 */ |
183 |
++ return test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : |
184 |
++ __NR_restart_syscall | (regs->orig_ax & __X32_SYSCALL_BIT); |
185 |
++#endif /* CONFIG_X86_32 || !CONFIG_X86_64 */ |
186 |
++} |
187 |
+ |
188 |
+ /* |
189 |
+ * Note that 'init' is a special process: it doesn't get signals it doesn't |
190 |
+@@ -716,7 +719,7 @@ static void do_signal(struct pt_regs *regs) |
191 |
+ break; |
192 |
+ |
193 |
+ case -ERESTART_RESTARTBLOCK: |
194 |
+- regs->ax = NR_restart_syscall; |
195 |
++ regs->ax = get_nr_restart_syscall(regs); |
196 |
+ regs->ip -= 2; |
197 |
+ break; |
198 |
+ } |
199 |
+diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c |
200 |
+index f19284d87dfe..9167de031e47 100644 |
201 |
+--- a/arch/x86/platform/efi/efi.c |
202 |
++++ b/arch/x86/platform/efi/efi.c |
203 |
+@@ -250,12 +250,19 @@ static efi_status_t __init phys_efi_set_virtual_address_map( |
204 |
+ efi_memory_desc_t *virtual_map) |
205 |
+ { |
206 |
+ efi_status_t status; |
207 |
++ unsigned long flags; |
208 |
+ |
209 |
+ efi_call_phys_prelog(); |
210 |
++ |
211 |
++ /* Disable interrupts around EFI calls: */ |
212 |
++ local_irq_save(flags); |
213 |
+ status = efi_call_phys4(efi_phys.set_virtual_address_map, |
214 |
+ memory_map_size, descriptor_size, |
215 |
+ descriptor_version, virtual_map); |
216 |
++ local_irq_restore(flags); |
217 |
++ |
218 |
+ efi_call_phys_epilog(); |
219 |
++ |
220 |
+ return status; |
221 |
+ } |
222 |
+ |
223 |
+diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c |
224 |
+index 40e446941dd7..bebbee05e331 100644 |
225 |
+--- a/arch/x86/platform/efi/efi_32.c |
226 |
++++ b/arch/x86/platform/efi/efi_32.c |
227 |
+@@ -33,19 +33,16 @@ |
228 |
+ |
229 |
+ /* |
230 |
+ * To make EFI call EFI runtime service in physical addressing mode we need |
231 |
+- * prelog/epilog before/after the invocation to disable interrupt, to |
232 |
+- * claim EFI runtime service handler exclusively and to duplicate a memory in |
233 |
+- * low memory space say 0 - 3G. |
234 |
++ * prolog/epilog before/after the invocation to claim the EFI runtime service |
235 |
++ * handler exclusively and to duplicate a memory mapping in low memory space, |
236 |
++ * say 0 - 3G. |
237 |
+ */ |
238 |
+ |
239 |
+-static unsigned long efi_rt_eflags; |
240 |
+ |
241 |
+ void efi_call_phys_prelog(void) |
242 |
+ { |
243 |
+ struct desc_ptr gdt_descr; |
244 |
+ |
245 |
+- local_irq_save(efi_rt_eflags); |
246 |
+- |
247 |
+ load_cr3(initial_page_table); |
248 |
+ __flush_tlb_all(); |
249 |
+ |
250 |
+@@ -64,6 +61,4 @@ void efi_call_phys_epilog(void) |
251 |
+ |
252 |
+ load_cr3(swapper_pg_dir); |
253 |
+ __flush_tlb_all(); |
254 |
+- |
255 |
+- local_irq_restore(efi_rt_eflags); |
256 |
+ } |
257 |
+diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c |
258 |
+index 39a0e7f1f0a3..2f6c1a9734c8 100644 |
259 |
+--- a/arch/x86/platform/efi/efi_64.c |
260 |
++++ b/arch/x86/platform/efi/efi_64.c |
261 |
+@@ -40,7 +40,6 @@ |
262 |
+ #include <asm/fixmap.h> |
263 |
+ |
264 |
+ static pgd_t *save_pgd __initdata; |
265 |
+-static unsigned long efi_flags __initdata; |
266 |
+ |
267 |
+ static void __init early_code_mapping_set_exec(int executable) |
268 |
+ { |
269 |
+@@ -66,7 +65,6 @@ void __init efi_call_phys_prelog(void) |
270 |
+ int n_pgds; |
271 |
+ |
272 |
+ early_code_mapping_set_exec(1); |
273 |
+- local_irq_save(efi_flags); |
274 |
+ |
275 |
+ n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT), PGDIR_SIZE); |
276 |
+ save_pgd = kmalloc(n_pgds * sizeof(pgd_t), GFP_KERNEL); |
277 |
+@@ -90,7 +88,6 @@ void __init efi_call_phys_epilog(void) |
278 |
+ set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), save_pgd[pgd]); |
279 |
+ kfree(save_pgd); |
280 |
+ __flush_tlb_all(); |
281 |
+- local_irq_restore(efi_flags); |
282 |
+ early_code_mapping_set_exec(0); |
283 |
+ } |
284 |
+ |
285 |
+diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c |
286 |
+index 45329c8c226e..39e12c10b931 100644 |
287 |
+--- a/arch/x86/xen/suspend.c |
288 |
++++ b/arch/x86/xen/suspend.c |
289 |
+@@ -30,7 +30,8 @@ void xen_arch_hvm_post_suspend(int suspend_cancelled) |
290 |
+ { |
291 |
+ #ifdef CONFIG_XEN_PVHVM |
292 |
+ int cpu; |
293 |
+- xen_hvm_init_shared_info(); |
294 |
++ if (!suspend_cancelled) |
295 |
++ xen_hvm_init_shared_info(); |
296 |
+ xen_callback_vector(); |
297 |
+ xen_unplug_emulated_devices(); |
298 |
+ if (xen_feature(XENFEAT_hvm_safe_pvclock)) { |
299 |
+diff --git a/block/blk-core.c b/block/blk-core.c |
300 |
+index bf214ae98937..de352508333f 100644 |
301 |
+--- a/block/blk-core.c |
302 |
++++ b/block/blk-core.c |
303 |
+@@ -1893,7 +1893,8 @@ void submit_bio(int rw, struct bio *bio) |
304 |
+ EXPORT_SYMBOL(submit_bio); |
305 |
+ |
306 |
+ /** |
307 |
+- * blk_rq_check_limits - Helper function to check a request for the queue limit |
308 |
++ * blk_cloned_rq_check_limits - Helper function to check a cloned request |
309 |
++ * for new the queue limits |
310 |
+ * @q: the queue |
311 |
+ * @rq: the request being checked |
312 |
+ * |
313 |
+@@ -1904,20 +1905,13 @@ EXPORT_SYMBOL(submit_bio); |
314 |
+ * after it is inserted to @q, it should be checked against @q before |
315 |
+ * the insertion using this generic function. |
316 |
+ * |
317 |
+- * This function should also be useful for request stacking drivers |
318 |
+- * in some cases below, so export this function. |
319 |
+ * Request stacking drivers like request-based dm may change the queue |
320 |
+- * limits while requests are in the queue (e.g. dm's table swapping). |
321 |
+- * Such request stacking drivers should check those requests agaist |
322 |
+- * the new queue limits again when they dispatch those requests, |
323 |
+- * although such checkings are also done against the old queue limits |
324 |
+- * when submitting requests. |
325 |
++ * limits when retrying requests on other queues. Those requests need |
326 |
++ * to be checked against the new queue limits again during dispatch. |
327 |
+ */ |
328 |
+-int blk_rq_check_limits(struct request_queue *q, struct request *rq) |
329 |
++static int blk_cloned_rq_check_limits(struct request_queue *q, |
330 |
++ struct request *rq) |
331 |
+ { |
332 |
+- if (!rq_mergeable(rq)) |
333 |
+- return 0; |
334 |
+- |
335 |
+ if (blk_rq_sectors(rq) > blk_queue_get_max_sectors(q, rq->cmd_flags)) { |
336 |
+ printk(KERN_ERR "%s: over max size limit.\n", __func__); |
337 |
+ return -EIO; |
338 |
+@@ -1937,7 +1931,6 @@ int blk_rq_check_limits(struct request_queue *q, struct request *rq) |
339 |
+ |
340 |
+ return 0; |
341 |
+ } |
342 |
+-EXPORT_SYMBOL_GPL(blk_rq_check_limits); |
343 |
+ |
344 |
+ /** |
345 |
+ * blk_insert_cloned_request - Helper for stacking drivers to submit a request |
346 |
+@@ -1949,7 +1942,7 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq) |
347 |
+ unsigned long flags; |
348 |
+ int where = ELEVATOR_INSERT_BACK; |
349 |
+ |
350 |
+- if (blk_rq_check_limits(q, rq)) |
351 |
++ if (blk_cloned_rq_check_limits(q, rq)) |
352 |
+ return -EIO; |
353 |
+ |
354 |
+ if (rq->rq_disk && |
355 |
+diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c |
356 |
+index 25ed69ffd8dd..c16fd35bd640 100644 |
357 |
+--- a/drivers/char/ipmi/ipmi_si_intf.c |
358 |
++++ b/drivers/char/ipmi/ipmi_si_intf.c |
359 |
+@@ -1152,14 +1152,14 @@ static int smi_start_processing(void *send_info, |
360 |
+ |
361 |
+ new_smi->intf = intf; |
362 |
+ |
363 |
+- /* Try to claim any interrupts. */ |
364 |
+- if (new_smi->irq_setup) |
365 |
+- new_smi->irq_setup(new_smi); |
366 |
+- |
367 |
+ /* Set up the timer that drives the interface. */ |
368 |
+ setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi); |
369 |
+ smi_mod_timer(new_smi, jiffies + SI_TIMEOUT_JIFFIES); |
370 |
+ |
371 |
++ /* Try to claim any interrupts. */ |
372 |
++ if (new_smi->irq_setup) |
373 |
++ new_smi->irq_setup(new_smi); |
374 |
++ |
375 |
+ /* |
376 |
+ * Check if the user forcefully enabled the daemon. |
377 |
+ */ |
378 |
+diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c |
379 |
+index 4e51ce2bbb85..83780190cdd7 100644 |
380 |
+--- a/drivers/gpu/drm/i915/intel_ringbuffer.c |
381 |
++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c |
382 |
+@@ -1125,7 +1125,7 @@ i830_dispatch_execbuffer(struct intel_ring_buffer *ring, |
383 |
+ */ |
384 |
+ intel_ring_emit(ring, SRC_COPY_BLT_CMD | BLT_WRITE_RGBA); |
385 |
+ intel_ring_emit(ring, BLT_DEPTH_32 | BLT_ROP_SRC_COPY | 4096); |
386 |
+- intel_ring_emit(ring, DIV_ROUND_UP(len, 4096) << 16 | 1024); |
387 |
++ intel_ring_emit(ring, DIV_ROUND_UP(len, 4096) << 16 | 4096); |
388 |
+ intel_ring_emit(ring, cs_offset); |
389 |
+ intel_ring_emit(ring, 4096); |
390 |
+ intel_ring_emit(ring, offset); |
391 |
+diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c |
392 |
+index ee83c3904ee8..fcf9aa1eb167 100644 |
393 |
+--- a/drivers/input/tablet/aiptek.c |
394 |
++++ b/drivers/input/tablet/aiptek.c |
395 |
+@@ -1820,6 +1820,14 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) |
396 |
+ input_set_abs_params(inputdev, ABS_TILT_Y, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); |
397 |
+ input_set_abs_params(inputdev, ABS_WHEEL, AIPTEK_WHEEL_MIN, AIPTEK_WHEEL_MAX - 1, 0, 0); |
398 |
+ |
399 |
++ /* Verify that a device really has an endpoint */ |
400 |
++ if (intf->altsetting[0].desc.bNumEndpoints < 1) { |
401 |
++ dev_err(&intf->dev, |
402 |
++ "interface has %d endpoints, but must have minimum 1\n", |
403 |
++ intf->altsetting[0].desc.bNumEndpoints); |
404 |
++ err = -EINVAL; |
405 |
++ goto fail3; |
406 |
++ } |
407 |
+ endpoint = &intf->altsetting[0].endpoint[0].desc; |
408 |
+ |
409 |
+ /* Go set up our URB, which is called when the tablet receives |
410 |
+@@ -1862,6 +1870,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) |
411 |
+ if (i == ARRAY_SIZE(speeds)) { |
412 |
+ dev_info(&intf->dev, |
413 |
+ "Aiptek tried all speeds, no sane response\n"); |
414 |
++ err = -EINVAL; |
415 |
+ goto fail3; |
416 |
+ } |
417 |
+ |
418 |
+diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c |
419 |
+index 38ceac5053a0..0ed6731396ef 100644 |
420 |
+--- a/drivers/isdn/i4l/isdn_ppp.c |
421 |
++++ b/drivers/isdn/i4l/isdn_ppp.c |
422 |
+@@ -301,6 +301,8 @@ isdn_ppp_open(int min, struct file *file) |
423 |
+ is->compflags = 0; |
424 |
+ |
425 |
+ is->reset = isdn_ppp_ccp_reset_alloc(is); |
426 |
++ if (!is->reset) |
427 |
++ return -ENOMEM; |
428 |
+ |
429 |
+ is->lp = NULL; |
430 |
+ is->mp_seqno = 0; /* MP sequence number */ |
431 |
+@@ -320,6 +322,10 @@ isdn_ppp_open(int min, struct file *file) |
432 |
+ * VJ header compression init |
433 |
+ */ |
434 |
+ is->slcomp = slhc_init(16, 16); /* not necessary for 2. link in bundle */ |
435 |
++ if (IS_ERR(is->slcomp)) { |
436 |
++ isdn_ppp_ccp_reset_free(is); |
437 |
++ return PTR_ERR(is->slcomp); |
438 |
++ } |
439 |
+ #endif |
440 |
+ #ifdef CONFIG_IPPP_FILTER |
441 |
+ is->pass_filter = NULL; |
442 |
+@@ -568,10 +574,8 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg) |
443 |
+ is->maxcid = val; |
444 |
+ #ifdef CONFIG_ISDN_PPP_VJ |
445 |
+ sltmp = slhc_init(16, val); |
446 |
+- if (!sltmp) { |
447 |
+- printk(KERN_ERR "ippp, can't realloc slhc struct\n"); |
448 |
+- return -ENOMEM; |
449 |
+- } |
450 |
++ if (IS_ERR(sltmp)) |
451 |
++ return PTR_ERR(sltmp); |
452 |
+ if (is->slcomp) |
453 |
+ slhc_free(is->slcomp); |
454 |
+ is->slcomp = sltmp; |
455 |
+diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c |
456 |
+index 5a1897d86e94..a2d7d5f066f1 100644 |
457 |
+--- a/drivers/net/ppp/ppp_generic.c |
458 |
++++ b/drivers/net/ppp/ppp_generic.c |
459 |
+@@ -716,10 +716,8 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
460 |
+ val &= 0xffff; |
461 |
+ } |
462 |
+ vj = slhc_init(val2+1, val+1); |
463 |
+- if (!vj) { |
464 |
+- netdev_err(ppp->dev, |
465 |
+- "PPP: no memory (VJ compressor)\n"); |
466 |
+- err = -ENOMEM; |
467 |
++ if (IS_ERR(vj)) { |
468 |
++ err = PTR_ERR(vj); |
469 |
+ break; |
470 |
+ } |
471 |
+ ppp_lock(ppp); |
472 |
+diff --git a/drivers/net/slip/slhc.c b/drivers/net/slip/slhc.c |
473 |
+index 1252d9c726a7..b52eabc168a0 100644 |
474 |
+--- a/drivers/net/slip/slhc.c |
475 |
++++ b/drivers/net/slip/slhc.c |
476 |
+@@ -84,8 +84,9 @@ static long decode(unsigned char **cpp); |
477 |
+ static unsigned char * put16(unsigned char *cp, unsigned short x); |
478 |
+ static unsigned short pull16(unsigned char **cpp); |
479 |
+ |
480 |
+-/* Initialize compression data structure |
481 |
++/* Allocate compression data structure |
482 |
+ * slots must be in range 0 to 255 (zero meaning no compression) |
483 |
++ * Returns pointer to structure or ERR_PTR() on error. |
484 |
+ */ |
485 |
+ struct slcompress * |
486 |
+ slhc_init(int rslots, int tslots) |
487 |
+@@ -94,11 +95,14 @@ slhc_init(int rslots, int tslots) |
488 |
+ register struct cstate *ts; |
489 |
+ struct slcompress *comp; |
490 |
+ |
491 |
++ if (rslots < 0 || rslots > 255 || tslots < 0 || tslots > 255) |
492 |
++ return ERR_PTR(-EINVAL); |
493 |
++ |
494 |
+ comp = kzalloc(sizeof(struct slcompress), GFP_KERNEL); |
495 |
+ if (! comp) |
496 |
+ goto out_fail; |
497 |
+ |
498 |
+- if ( rslots > 0 && rslots < 256 ) { |
499 |
++ if (rslots > 0) { |
500 |
+ size_t rsize = rslots * sizeof(struct cstate); |
501 |
+ comp->rstate = kzalloc(rsize, GFP_KERNEL); |
502 |
+ if (! comp->rstate) |
503 |
+@@ -106,7 +110,7 @@ slhc_init(int rslots, int tslots) |
504 |
+ comp->rslot_limit = rslots - 1; |
505 |
+ } |
506 |
+ |
507 |
+- if ( tslots > 0 && tslots < 256 ) { |
508 |
++ if (tslots > 0) { |
509 |
+ size_t tsize = tslots * sizeof(struct cstate); |
510 |
+ comp->tstate = kzalloc(tsize, GFP_KERNEL); |
511 |
+ if (! comp->tstate) |
512 |
+@@ -141,7 +145,7 @@ out_free2: |
513 |
+ out_free: |
514 |
+ kfree(comp); |
515 |
+ out_fail: |
516 |
+- return NULL; |
517 |
++ return ERR_PTR(-ENOMEM); |
518 |
+ } |
519 |
+ |
520 |
+ |
521 |
+diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c |
522 |
+index 87526443841f..0641fccdc954 100644 |
523 |
+--- a/drivers/net/slip/slip.c |
524 |
++++ b/drivers/net/slip/slip.c |
525 |
+@@ -164,7 +164,7 @@ static int sl_alloc_bufs(struct slip *sl, int mtu) |
526 |
+ if (cbuff == NULL) |
527 |
+ goto err_exit; |
528 |
+ slcomp = slhc_init(16, 16); |
529 |
+- if (slcomp == NULL) |
530 |
++ if (IS_ERR(slcomp)) |
531 |
+ goto err_exit; |
532 |
+ #endif |
533 |
+ spin_lock_bh(&sl->lock); |
534 |
+diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c |
535 |
+index 2d163544fa51..1e480a898d28 100644 |
536 |
+--- a/drivers/pci/pci.c |
537 |
++++ b/drivers/pci/pci.c |
538 |
+@@ -2871,7 +2871,7 @@ void __weak pcibios_set_master(struct pci_dev *dev) |
539 |
+ lat = pcibios_max_latency; |
540 |
+ else |
541 |
+ return; |
542 |
+- dev_printk(KERN_DEBUG, &dev->dev, "setting latency timer to %d\n", lat); |
543 |
++ |
544 |
+ pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat); |
545 |
+ } |
546 |
+ |
547 |
+diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c |
548 |
+index ed7759980c47..1d01ed6f8dd2 100644 |
549 |
+--- a/drivers/scsi/lpfc/lpfc_scsi.c |
550 |
++++ b/drivers/scsi/lpfc/lpfc_scsi.c |
551 |
+@@ -5264,7 +5264,15 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd) |
552 |
+ if (status == FAILED) { |
553 |
+ lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
554 |
+ "0722 Target Reset rport failure: rdata x%p\n", rdata); |
555 |
+- return FAILED; |
556 |
++ if (pnode) { |
557 |
++ spin_lock_irq(shost->host_lock); |
558 |
++ pnode->nlp_flag &= ~NLP_NPR_ADISC; |
559 |
++ pnode->nlp_fcp_info &= ~NLP_FCP_2_DEVICE; |
560 |
++ spin_unlock_irq(shost->host_lock); |
561 |
++ } |
562 |
++ lpfc_reset_flush_io_context(vport, tgt_id, lun_id, |
563 |
++ LPFC_CTX_TGT); |
564 |
++ return FAST_IO_FAIL; |
565 |
+ } |
566 |
+ |
567 |
+ scsi_event.event_type = FC_REG_SCSI_EVENT; |
568 |
+diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c |
569 |
+index 03f715e7591e..df67a0649410 100644 |
570 |
+--- a/drivers/scsi/qla2xxx/qla_init.c |
571 |
++++ b/drivers/scsi/qla2xxx/qla_init.c |
572 |
+@@ -2725,6 +2725,7 @@ qla2x00_rport_del(void *data) |
573 |
+ struct fc_rport *rport; |
574 |
+ scsi_qla_host_t *vha = fcport->vha; |
575 |
+ unsigned long flags; |
576 |
++ unsigned long vha_flags; |
577 |
+ |
578 |
+ spin_lock_irqsave(fcport->vha->host->host_lock, flags); |
579 |
+ rport = fcport->drport ? fcport->drport: fcport->rport; |
580 |
+@@ -2736,7 +2737,9 @@ qla2x00_rport_del(void *data) |
581 |
+ * Release the target mode FC NEXUS in qla_target.c code |
582 |
+ * if target mod is enabled. |
583 |
+ */ |
584 |
++ spin_lock_irqsave(&vha->hw->hardware_lock, vha_flags); |
585 |
+ qlt_fc_port_deleted(vha, fcport); |
586 |
++ spin_unlock_irqrestore(&vha->hw->hardware_lock, vha_flags); |
587 |
+ } |
588 |
+ } |
589 |
+ |
590 |
+@@ -3106,6 +3109,7 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport) |
591 |
+ * Create target mode FC NEXUS in qla_target.c if target mode is |
592 |
+ * enabled.. |
593 |
+ */ |
594 |
++ |
595 |
+ qlt_fc_port_added(vha, fcport); |
596 |
+ |
597 |
+ spin_lock_irqsave(fcport->vha->host->host_lock, flags); |
598 |
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c |
599 |
+index 30788321ac2b..16a4cf8654a8 100644 |
600 |
+--- a/drivers/scsi/qla2xxx/qla_target.c |
601 |
++++ b/drivers/scsi/qla2xxx/qla_target.c |
602 |
+@@ -741,7 +741,6 @@ void qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport) |
603 |
+ struct qla_hw_data *ha = vha->hw; |
604 |
+ struct qla_tgt *tgt = ha->tgt.qla_tgt; |
605 |
+ struct qla_tgt_sess *sess; |
606 |
+- unsigned long flags; |
607 |
+ |
608 |
+ if (!vha->hw->tgt.tgt_ops) |
609 |
+ return; |
610 |
+@@ -749,14 +748,11 @@ void qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport) |
611 |
+ if (!tgt || (fcport->port_type != FCT_INITIATOR)) |
612 |
+ return; |
613 |
+ |
614 |
+- spin_lock_irqsave(&ha->hardware_lock, flags); |
615 |
+ if (tgt->tgt_stop) { |
616 |
+- spin_unlock_irqrestore(&ha->hardware_lock, flags); |
617 |
+ return; |
618 |
+ } |
619 |
+ sess = qlt_find_sess_by_port_name(tgt, fcport->port_name); |
620 |
+ if (!sess) { |
621 |
+- spin_unlock_irqrestore(&ha->hardware_lock, flags); |
622 |
+ return; |
623 |
+ } |
624 |
+ |
625 |
+@@ -764,7 +760,6 @@ void qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport) |
626 |
+ |
627 |
+ sess->local = 1; |
628 |
+ qlt_schedule_sess_for_deletion(sess, false); |
629 |
+- spin_unlock_irqrestore(&ha->hardware_lock, flags); |
630 |
+ } |
631 |
+ |
632 |
+ static inline int test_tgt_sess_count(struct qla_tgt *tgt) |
633 |
+diff --git a/drivers/staging/dgnc/dgnc_mgmt.c b/drivers/staging/dgnc/dgnc_mgmt.c |
634 |
+index c4629d7c80b2..d885bbb7de60 100644 |
635 |
+--- a/drivers/staging/dgnc/dgnc_mgmt.c |
636 |
++++ b/drivers/staging/dgnc/dgnc_mgmt.c |
637 |
+@@ -145,6 +145,7 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
638 |
+ |
639 |
+ DGNC_LOCK(dgnc_global_lock, lock_flags); |
640 |
+ |
641 |
++ memset(&ddi, 0, sizeof(ddi)); |
642 |
+ ddi.dinfo_nboards = dgnc_NumBoards; |
643 |
+ sprintf(ddi.dinfo_version, "%s", DG_PART); |
644 |
+ |
645 |
+diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c |
646 |
+index a6956cd27334..9596d4f3e71a 100644 |
647 |
+--- a/drivers/usb/core/quirks.c |
648 |
++++ b/drivers/usb/core/quirks.c |
649 |
+@@ -125,6 +125,9 @@ static const struct usb_device_id usb_quirk_list[] = { |
650 |
+ { USB_DEVICE(0x04f3, 0x016f), .driver_info = |
651 |
+ USB_QUIRK_DEVICE_QUALIFIER }, |
652 |
+ |
653 |
++ { USB_DEVICE(0x04f3, 0x21b8), .driver_info = |
654 |
++ USB_QUIRK_DEVICE_QUALIFIER }, |
655 |
++ |
656 |
+ /* Roland SC-8820 */ |
657 |
+ { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME }, |
658 |
+ |
659 |
+diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c |
660 |
+index 0b5806995718..27accc4cc999 100644 |
661 |
+--- a/drivers/xen/gntdev.c |
662 |
++++ b/drivers/xen/gntdev.c |
663 |
+@@ -763,7 +763,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) |
664 |
+ |
665 |
+ vma->vm_ops = &gntdev_vmops; |
666 |
+ |
667 |
+- vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
668 |
++ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP | VM_IO; |
669 |
+ |
670 |
+ if (use_ptemod) |
671 |
+ vma->vm_flags |= VM_DONTCOPY; |
672 |
+diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c |
673 |
+index f704458ea5f5..a6d999418de4 100644 |
674 |
+--- a/fs/dlm/plock.c |
675 |
++++ b/fs/dlm/plock.c |
676 |
+@@ -145,7 +145,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file, |
677 |
+ send_op(op); |
678 |
+ |
679 |
+ if (xop->callback == NULL) { |
680 |
+- rv = wait_event_killable(recv_wq, (op->done != 0)); |
681 |
++ rv = wait_event_interruptible(recv_wq, (op->done != 0)); |
682 |
+ if (rv == -ERESTARTSYS) { |
683 |
+ log_debug(ls, "dlm_posix_lock: wait killed %llx", |
684 |
+ (unsigned long long)number); |
685 |
+diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h |
686 |
+index b1056783c105..e66eba43d702 100644 |
687 |
+--- a/include/linux/blkdev.h |
688 |
++++ b/include/linux/blkdev.h |
689 |
+@@ -740,7 +740,6 @@ extern struct request *blk_make_request(struct request_queue *, struct bio *, |
690 |
+ extern void blk_requeue_request(struct request_queue *, struct request *); |
691 |
+ extern void blk_add_request_payload(struct request *rq, struct page *page, |
692 |
+ unsigned int len); |
693 |
+-extern int blk_rq_check_limits(struct request_queue *q, struct request *rq); |
694 |
+ extern int blk_lld_busy(struct request_queue *q); |
695 |
+ extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, |
696 |
+ struct bio_set *bs, gfp_t gfp_mask, |
697 |
+diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h |
698 |
+index e2d28b026a8c..3c77bf9b1efd 100644 |
699 |
+--- a/include/linux/isapnp.h |
700 |
++++ b/include/linux/isapnp.h |
701 |
+@@ -56,10 +56,6 @@ |
702 |
+ #define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \ |
703 |
+ { .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) } |
704 |
+ |
705 |
+-/* export used IDs outside module */ |
706 |
+-#define ISAPNP_CARD_TABLE(name) \ |
707 |
+- MODULE_GENERIC_TABLE(isapnp_card, name) |
708 |
+- |
709 |
+ struct isapnp_card_id { |
710 |
+ unsigned long driver_data; /* data private to the driver */ |
711 |
+ unsigned short card_vendor, card_device; |
712 |
+diff --git a/include/linux/module.h b/include/linux/module.h |
713 |
+index 54aef1b38463..73c8c06c25bf 100644 |
714 |
+--- a/include/linux/module.h |
715 |
++++ b/include/linux/module.h |
716 |
+@@ -83,15 +83,6 @@ void sort_extable(struct exception_table_entry *start, |
717 |
+ void sort_main_extable(void); |
718 |
+ void trim_init_extable(struct module *m); |
719 |
+ |
720 |
+-#ifdef MODULE |
721 |
+-#define MODULE_GENERIC_TABLE(gtype,name) \ |
722 |
+-extern const struct gtype##_id __mod_##gtype##_table \ |
723 |
+- __attribute__ ((unused, alias(__stringify(name)))) |
724 |
+- |
725 |
+-#else /* !MODULE */ |
726 |
+-#define MODULE_GENERIC_TABLE(gtype,name) |
727 |
+-#endif |
728 |
+- |
729 |
+ /* Generic info of form tag = "info" */ |
730 |
+ #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) |
731 |
+ |
732 |
+@@ -142,8 +133,14 @@ extern const struct gtype##_id __mod_##gtype##_table \ |
733 |
+ /* What your module does. */ |
734 |
+ #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) |
735 |
+ |
736 |
+-#define MODULE_DEVICE_TABLE(type,name) \ |
737 |
+- MODULE_GENERIC_TABLE(type##__##name##_device, name) |
738 |
++#ifdef MODULE |
739 |
++/* Creates an alias so file2alias.c can find device table. */ |
740 |
++#define MODULE_DEVICE_TABLE(type, name) \ |
741 |
++ extern const struct type##_device_id __mod_##type##__##name##_device_table \ |
742 |
++ __attribute__ ((unused, alias(__stringify(name)))) |
743 |
++#else /* !MODULE */ |
744 |
++#define MODULE_DEVICE_TABLE(type, name) |
745 |
++#endif |
746 |
+ |
747 |
+ /* Version of form [<epoch>:]<version>[-<extra-version>]. |
748 |
+ Or for CVS/RCS ID version, everything but the number is stripped. |
749 |
+diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h |
750 |
+index d51d16c7afd8..3646fa31ade9 100644 |
751 |
+--- a/include/trace/events/sunrpc.h |
752 |
++++ b/include/trace/events/sunrpc.h |
753 |
+@@ -83,7 +83,7 @@ DECLARE_EVENT_CLASS(rpc_task_running, |
754 |
+ ), |
755 |
+ |
756 |
+ TP_fast_assign( |
757 |
+- __entry->client_id = clnt->cl_clid; |
758 |
++ __entry->client_id = clnt ? clnt->cl_clid : -1; |
759 |
+ __entry->task_id = task->tk_pid; |
760 |
+ __entry->action = action; |
761 |
+ __entry->runstate = task->tk_runstate; |
762 |
+@@ -91,7 +91,7 @@ DECLARE_EVENT_CLASS(rpc_task_running, |
763 |
+ __entry->flags = task->tk_flags; |
764 |
+ ), |
765 |
+ |
766 |
+- TP_printk("task:%u@%u flags=%4.4x state=%4.4lx status=%d action=%pf", |
767 |
++ TP_printk("task:%u@%d flags=%4.4x state=%4.4lx status=%d action=%pf", |
768 |
+ __entry->task_id, __entry->client_id, |
769 |
+ __entry->flags, |
770 |
+ __entry->runstate, |
771 |
+diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c |
772 |
+index 469af802d14e..d6b35d3a232c 100644 |
773 |
+--- a/kernel/trace/ring_buffer.c |
774 |
++++ b/kernel/trace/ring_buffer.c |
775 |
+@@ -1700,22 +1700,14 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size, |
776 |
+ if (!cpu_buffer->nr_pages_to_update) |
777 |
+ continue; |
778 |
+ |
779 |
+- /* The update must run on the CPU that is being updated. */ |
780 |
+- preempt_disable(); |
781 |
+- if (cpu == smp_processor_id() || !cpu_online(cpu)) { |
782 |
++ /* Can't run something on an offline CPU. */ |
783 |
++ if (!cpu_online(cpu)) { |
784 |
+ rb_update_pages(cpu_buffer); |
785 |
+ cpu_buffer->nr_pages_to_update = 0; |
786 |
+ } else { |
787 |
+- /* |
788 |
+- * Can not disable preemption for schedule_work_on() |
789 |
+- * on PREEMPT_RT. |
790 |
+- */ |
791 |
+- preempt_enable(); |
792 |
+ schedule_work_on(cpu, |
793 |
+ &cpu_buffer->update_pages_work); |
794 |
+- preempt_disable(); |
795 |
+ } |
796 |
+- preempt_enable(); |
797 |
+ } |
798 |
+ |
799 |
+ /* wait for all the updates to complete */ |
800 |
+@@ -1753,22 +1745,14 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size, |
801 |
+ |
802 |
+ get_online_cpus(); |
803 |
+ |
804 |
+- preempt_disable(); |
805 |
+- /* The update must run on the CPU that is being updated. */ |
806 |
+- if (cpu_id == smp_processor_id() || !cpu_online(cpu_id)) |
807 |
++ /* Can't run something on an offline CPU. */ |
808 |
++ if (!cpu_online(cpu_id)) |
809 |
+ rb_update_pages(cpu_buffer); |
810 |
+ else { |
811 |
+- /* |
812 |
+- * Can not disable preemption for schedule_work_on() |
813 |
+- * on PREEMPT_RT. |
814 |
+- */ |
815 |
+- preempt_enable(); |
816 |
+ schedule_work_on(cpu_id, |
817 |
+ &cpu_buffer->update_pages_work); |
818 |
+ wait_for_completion(&cpu_buffer->update_done); |
819 |
+- preempt_disable(); |
820 |
+ } |
821 |
+- preempt_enable(); |
822 |
+ |
823 |
+ cpu_buffer->nr_pages_to_update = 0; |
824 |
+ put_online_cpus(); |
825 |
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c |
826 |
+index bd5f3461d1ce..54874e4767de 100644 |
827 |
+--- a/net/ipv4/route.c |
828 |
++++ b/net/ipv4/route.c |
829 |
+@@ -985,7 +985,7 @@ static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu) |
830 |
+ if (dst_metric_locked(dst, RTAX_MTU)) |
831 |
+ return; |
832 |
+ |
833 |
+- if (dst->dev->mtu < mtu) |
834 |
++ if (ipv4_mtu(dst) < mtu) |
835 |
+ return; |
836 |
+ |
837 |
+ if (mtu < ip_rt_min_pmtu) |
838 |
+diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c |
839 |
+index 4908eaa1cdec..f8e304667108 100644 |
840 |
+--- a/net/ipv4/udp.c |
841 |
++++ b/net/ipv4/udp.c |
842 |
+@@ -1210,6 +1210,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, |
843 |
+ int peeked, off = 0; |
844 |
+ int err; |
845 |
+ int is_udplite = IS_UDPLITE(sk); |
846 |
++ bool checksum_valid = false; |
847 |
+ bool slow; |
848 |
+ |
849 |
+ if (flags & MSG_ERRQUEUE) |
850 |
+@@ -1235,11 +1236,12 @@ try_again: |
851 |
+ */ |
852 |
+ |
853 |
+ if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) { |
854 |
+- if (udp_lib_checksum_complete(skb)) |
855 |
++ checksum_valid = !udp_lib_checksum_complete(skb); |
856 |
++ if (!checksum_valid) |
857 |
+ goto csum_copy_err; |
858 |
+ } |
859 |
+ |
860 |
+- if (skb_csum_unnecessary(skb)) |
861 |
++ if (checksum_valid || skb_csum_unnecessary(skb)) |
862 |
+ err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr), |
863 |
+ msg->msg_iov, copied); |
864 |
+ else { |
865 |
+diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c |
866 |
+index a6c5ef5225ef..94ca4172b38e 100644 |
867 |
+--- a/net/ipv6/udp.c |
868 |
++++ b/net/ipv6/udp.c |
869 |
+@@ -371,6 +371,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, |
870 |
+ int peeked, off = 0; |
871 |
+ int err; |
872 |
+ int is_udplite = IS_UDPLITE(sk); |
873 |
++ bool checksum_valid = false; |
874 |
+ int is_udp4; |
875 |
+ bool slow; |
876 |
+ |
877 |
+@@ -402,11 +403,12 @@ try_again: |
878 |
+ */ |
879 |
+ |
880 |
+ if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) { |
881 |
+- if (udp_lib_checksum_complete(skb)) |
882 |
++ checksum_valid = !udp_lib_checksum_complete(skb); |
883 |
++ if (!checksum_valid) |
884 |
+ goto csum_copy_err; |
885 |
+ } |
886 |
+ |
887 |
+- if (skb_csum_unnecessary(skb)) |
888 |
++ if (checksum_valid || skb_csum_unnecessary(skb)) |
889 |
+ err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr), |
890 |
+ msg->msg_iov, copied); |
891 |
+ else { |
892 |
+diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c |
893 |
+index 1a6eef39ab2f..ae66c9fe7c55 100644 |
894 |
+--- a/net/sctp/sm_sideeffect.c |
895 |
++++ b/net/sctp/sm_sideeffect.c |
896 |
+@@ -245,12 +245,13 @@ void sctp_generate_t3_rtx_event(unsigned long peer) |
897 |
+ int error; |
898 |
+ struct sctp_transport *transport = (struct sctp_transport *) peer; |
899 |
+ struct sctp_association *asoc = transport->asoc; |
900 |
+- struct net *net = sock_net(asoc->base.sk); |
901 |
++ struct sock *sk = asoc->base.sk; |
902 |
++ struct net *net = sock_net(sk); |
903 |
+ |
904 |
+ /* Check whether a task is in the sock. */ |
905 |
+ |
906 |
+- sctp_bh_lock_sock(asoc->base.sk); |
907 |
+- if (sock_owned_by_user(asoc->base.sk)) { |
908 |
++ sctp_bh_lock_sock(sk); |
909 |
++ if (sock_owned_by_user(sk)) { |
910 |
+ pr_debug("%s: sock is busy\n", __func__); |
911 |
+ |
912 |
+ /* Try again later. */ |
913 |
+@@ -273,10 +274,10 @@ void sctp_generate_t3_rtx_event(unsigned long peer) |
914 |
+ transport, GFP_ATOMIC); |
915 |
+ |
916 |
+ if (error) |
917 |
+- asoc->base.sk->sk_err = -error; |
918 |
++ sk->sk_err = -error; |
919 |
+ |
920 |
+ out_unlock: |
921 |
+- sctp_bh_unlock_sock(asoc->base.sk); |
922 |
++ sctp_bh_unlock_sock(sk); |
923 |
+ sctp_transport_put(transport); |
924 |
+ } |
925 |
+ |
926 |
+@@ -286,11 +287,12 @@ out_unlock: |
927 |
+ static void sctp_generate_timeout_event(struct sctp_association *asoc, |
928 |
+ sctp_event_timeout_t timeout_type) |
929 |
+ { |
930 |
+- struct net *net = sock_net(asoc->base.sk); |
931 |
++ struct sock *sk = asoc->base.sk; |
932 |
++ struct net *net = sock_net(sk); |
933 |
+ int error = 0; |
934 |
+ |
935 |
+- sctp_bh_lock_sock(asoc->base.sk); |
936 |
+- if (sock_owned_by_user(asoc->base.sk)) { |
937 |
++ sctp_bh_lock_sock(sk); |
938 |
++ if (sock_owned_by_user(sk)) { |
939 |
+ pr_debug("%s: sock is busy: timer %d\n", __func__, |
940 |
+ timeout_type); |
941 |
+ |
942 |
+@@ -313,10 +315,10 @@ static void sctp_generate_timeout_event(struct sctp_association *asoc, |
943 |
+ (void *)timeout_type, GFP_ATOMIC); |
944 |
+ |
945 |
+ if (error) |
946 |
+- asoc->base.sk->sk_err = -error; |
947 |
++ sk->sk_err = -error; |
948 |
+ |
949 |
+ out_unlock: |
950 |
+- sctp_bh_unlock_sock(asoc->base.sk); |
951 |
++ sctp_bh_unlock_sock(sk); |
952 |
+ sctp_association_put(asoc); |
953 |
+ } |
954 |
+ |
955 |
+@@ -366,10 +368,11 @@ void sctp_generate_heartbeat_event(unsigned long data) |
956 |
+ int error = 0; |
957 |
+ struct sctp_transport *transport = (struct sctp_transport *) data; |
958 |
+ struct sctp_association *asoc = transport->asoc; |
959 |
+- struct net *net = sock_net(asoc->base.sk); |
960 |
++ struct sock *sk = asoc->base.sk; |
961 |
++ struct net *net = sock_net(sk); |
962 |
+ |
963 |
+- sctp_bh_lock_sock(asoc->base.sk); |
964 |
+- if (sock_owned_by_user(asoc->base.sk)) { |
965 |
++ sctp_bh_lock_sock(sk); |
966 |
++ if (sock_owned_by_user(sk)) { |
967 |
+ pr_debug("%s: sock is busy\n", __func__); |
968 |
+ |
969 |
+ /* Try again later. */ |
970 |
+@@ -390,10 +393,10 @@ void sctp_generate_heartbeat_event(unsigned long data) |
971 |
+ transport, GFP_ATOMIC); |
972 |
+ |
973 |
+ if (error) |
974 |
+- asoc->base.sk->sk_err = -error; |
975 |
++ sk->sk_err = -error; |
976 |
+ |
977 |
+ out_unlock: |
978 |
+- sctp_bh_unlock_sock(asoc->base.sk); |
979 |
++ sctp_bh_unlock_sock(sk); |
980 |
+ sctp_transport_put(transport); |
981 |
+ } |
982 |
+ |
983 |
+@@ -404,10 +407,11 @@ void sctp_generate_proto_unreach_event(unsigned long data) |
984 |
+ { |
985 |
+ struct sctp_transport *transport = (struct sctp_transport *) data; |
986 |
+ struct sctp_association *asoc = transport->asoc; |
987 |
+- struct net *net = sock_net(asoc->base.sk); |
988 |
++ struct sock *sk = asoc->base.sk; |
989 |
++ struct net *net = sock_net(sk); |
990 |
+ |
991 |
+- sctp_bh_lock_sock(asoc->base.sk); |
992 |
+- if (sock_owned_by_user(asoc->base.sk)) { |
993 |
++ sctp_bh_lock_sock(sk); |
994 |
++ if (sock_owned_by_user(sk)) { |
995 |
+ pr_debug("%s: sock is busy\n", __func__); |
996 |
+ |
997 |
+ /* Try again later. */ |
998 |
+@@ -428,7 +432,7 @@ void sctp_generate_proto_unreach_event(unsigned long data) |
999 |
+ asoc->state, asoc->ep, asoc, transport, GFP_ATOMIC); |
1000 |
+ |
1001 |
+ out_unlock: |
1002 |
+- sctp_bh_unlock_sock(asoc->base.sk); |
1003 |
++ sctp_bh_unlock_sock(sk); |
1004 |
+ sctp_association_put(asoc); |
1005 |
+ } |
1006 |
+ |
1007 |
+diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c |
1008 |
+index 33cfd27b4de2..3242195bfa95 100644 |
1009 |
+--- a/security/keys/keyctl.c |
1010 |
++++ b/security/keys/keyctl.c |
1011 |
+@@ -744,16 +744,16 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) |
1012 |
+ |
1013 |
+ /* the key is probably readable - now try to read it */ |
1014 |
+ can_read_key: |
1015 |
+- ret = key_validate(key); |
1016 |
+- if (ret == 0) { |
1017 |
+- ret = -EOPNOTSUPP; |
1018 |
+- if (key->type->read) { |
1019 |
+- /* read the data with the semaphore held (since we |
1020 |
+- * might sleep) */ |
1021 |
+- down_read(&key->sem); |
1022 |
++ ret = -EOPNOTSUPP; |
1023 |
++ if (key->type->read) { |
1024 |
++ /* Read the data with the semaphore held (since we might sleep) |
1025 |
++ * to protect against the key being updated or revoked. |
1026 |
++ */ |
1027 |
++ down_read(&key->sem); |
1028 |
++ ret = key_validate(key); |
1029 |
++ if (ret == 0) |
1030 |
+ ret = key->type->read(key, buffer, buflen); |
1031 |
+- up_read(&key->sem); |
1032 |
+- } |
1033 |
++ up_read(&key->sem); |
1034 |
+ } |
1035 |
+ |
1036 |
+ error2: |
1037 |
+diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c |
1038 |
+index 42defae1e161..cd871dc8b7c0 100644 |
1039 |
+--- a/security/keys/process_keys.c |
1040 |
++++ b/security/keys/process_keys.c |
1041 |
+@@ -792,6 +792,7 @@ long join_session_keyring(const char *name) |
1042 |
+ ret = PTR_ERR(keyring); |
1043 |
+ goto error2; |
1044 |
+ } else if (keyring == new->session_keyring) { |
1045 |
++ key_put(keyring); |
1046 |
+ ret = 0; |
1047 |
+ goto error2; |
1048 |
+ } |
1049 |
+diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c |
1050 |
+index a7315298ee10..baf12f1a2820 100644 |
1051 |
+--- a/sound/pci/hda/hda_intel.c |
1052 |
++++ b/sound/pci/hda/hda_intel.c |
1053 |
+@@ -4082,6 +4082,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { |
1054 |
+ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
1055 |
+ { PCI_DEVICE(0x8086, 0x8d21), |
1056 |
+ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
1057 |
++ /* Lewisburg */ |
1058 |
++ { PCI_DEVICE(0x8086, 0xa1f0), |
1059 |
++ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
1060 |
++ { PCI_DEVICE(0x8086, 0xa270), |
1061 |
++ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
1062 |
+ /* Lynx Point-LP */ |
1063 |
+ { PCI_DEVICE(0x8086, 0x9c20), |
1064 |
+ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
1065 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
1066 |
+index 73d342c8403c..1ec93efc8253 100644 |
1067 |
+--- a/sound/pci/hda/patch_realtek.c |
1068 |
++++ b/sound/pci/hda/patch_realtek.c |
1069 |
+@@ -3637,6 +3637,18 @@ static void alc283_fixup_chromebook(struct hda_codec *codec, |
1070 |
+ } |
1071 |
+ } |
1072 |
+ |
1073 |
++/* additional fixup for Thinkpad T440s noise problem */ |
1074 |
++static void alc_fixup_tpt440(struct hda_codec *codec, |
1075 |
++ const struct hda_fixup *fix, int action) |
1076 |
++{ |
1077 |
++ struct alc_spec *spec = codec->spec; |
1078 |
++ |
1079 |
++ if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
1080 |
++ spec->shutup = alc_no_shutup; /* reduce click noise */ |
1081 |
++ spec->gen.mixer_nid = 0; /* reduce background noise */ |
1082 |
++ } |
1083 |
++} |
1084 |
++ |
1085 |
+ /* mute tablet speaker pin (0x14) via dock plugging in addition */ |
1086 |
+ static void asus_tx300_automute(struct hda_codec *codec) |
1087 |
+ { |
1088 |
+@@ -3746,6 +3758,7 @@ enum { |
1089 |
+ ALC283_FIXUP_INT_MIC, |
1090 |
+ ALC290_FIXUP_MONO_SPEAKERS, |
1091 |
+ ALC292_FIXUP_TPT440_DOCK, |
1092 |
++ ALC292_FIXUP_TPT440, |
1093 |
+ }; |
1094 |
+ |
1095 |
+ static const struct hda_fixup alc269_fixups[] = { |
1096 |
+@@ -4090,6 +4103,12 @@ static const struct hda_fixup alc269_fixups[] = { |
1097 |
+ .chained = true, |
1098 |
+ .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST |
1099 |
+ }, |
1100 |
++ [ALC292_FIXUP_TPT440] = { |
1101 |
++ .type = HDA_FIXUP_FUNC, |
1102 |
++ .v.func = alc_fixup_tpt440, |
1103 |
++ .chained = true, |
1104 |
++ .chain_id = ALC292_FIXUP_TPT440_DOCK, |
1105 |
++ }, |
1106 |
+ }; |
1107 |
+ |
1108 |
+ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1109 |
+@@ -4185,7 +4204,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1110 |
+ SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), |
1111 |
+ SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), |
1112 |
+ SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), |
1113 |
+- SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440_DOCK), |
1114 |
++ SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440), |
1115 |
+ SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK), |
1116 |
+ SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
1117 |
+ SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
1118 |
+@@ -4263,6 +4282,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { |
1119 |
+ {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, |
1120 |
+ {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, |
1121 |
+ {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"}, |
1122 |
++ {.id = ALC292_FIXUP_TPT440, .name = "tpt440"}, |
1123 |
+ {} |
1124 |
+ }; |
1125 |
+ |
1126 |
+diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c |
1127 |
+index 984b75ef1190..d68f6af1da2b 100644 |
1128 |
+--- a/sound/pci/hda/patch_sigmatel.c |
1129 |
++++ b/sound/pci/hda/patch_sigmatel.c |
1130 |
+@@ -712,6 +712,7 @@ static bool hp_bnb2011_with_dock(struct hda_codec *codec) |
1131 |
+ static bool hp_blike_system(u32 subsystem_id) |
1132 |
+ { |
1133 |
+ switch (subsystem_id) { |
1134 |
++ case 0x103c1473: /* HP ProBook 6550b */ |
1135 |
+ case 0x103c1520: |
1136 |
+ case 0x103c1521: |
1137 |
+ case 0x103c1523: |
1138 |
+diff --git a/tools/Makefile b/tools/Makefile |
1139 |
+index 41067f304215..b82a15b92b1c 100644 |
1140 |
+--- a/tools/Makefile |
1141 |
++++ b/tools/Makefile |
1142 |
+@@ -22,6 +22,10 @@ help: |
1143 |
+ @echo ' from the kernel command line to build and install one of' |
1144 |
+ @echo ' the tools above' |
1145 |
+ @echo '' |
1146 |
++ @echo ' $$ make tools/all' |
1147 |
++ @echo '' |
1148 |
++ @echo ' builds all tools.' |
1149 |
++ @echo '' |
1150 |
+ @echo ' $$ make tools/install' |
1151 |
+ @echo '' |
1152 |
+ @echo ' installs all tools.' |
1153 |
+@@ -50,6 +54,10 @@ selftests: FORCE |
1154 |
+ turbostat x86_energy_perf_policy: FORCE |
1155 |
+ $(call descend,power/x86/$@) |
1156 |
+ |
1157 |
++all: cgroup cpupower firewire lguest \ |
1158 |
++ perf selftests turbostat usb \ |
1159 |
++ virtio vm net x86_energy_perf_policy |
1160 |
++ |
1161 |
+ cpupower_install: |
1162 |
+ $(call descend,power/$(@:_install=),install) |
1163 |
+ |