Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:3.14 commit in: /
Date: Sat, 02 Aug 2014 00:19:56
Message-Id: 1406938782.2b48b7b43d1573379b1a4293175da9b5b8a2d3e6.mpagano@gentoo
1 commit: 2b48b7b43d1573379b1a4293175da9b5b8a2d3e6
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 2 00:19:42 2014 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 2 00:19:42 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=2b48b7b4
7
8 Linux patch 3.14.15
9
10 ---
11 0000_README | 4 +
12 1014_linux-3.14.15.patch | 893 +++++++++++++++++++++++++++++++++++++++++++++++
13 2 files changed, 897 insertions(+)
14
15 diff --git a/0000_README b/0000_README
16 index d44b3d0..70e968d 100644
17 --- a/0000_README
18 +++ b/0000_README
19 @@ -98,6 +98,10 @@ Patch: 1013_linux-3.14.14.patch
20 From: http://www.kernel.org
21 Desc: Linux 3.14.14
22
23 +Patch: 1014_linux-3.14.15.patch
24 +From: http://www.kernel.org
25 +Desc: Linux 3.14.15
26 +
27 Patch: 1500_XATTR_USER_PREFIX.patch
28 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
29 Desc: Support for namespace user.pax.* on tmpfs.
30
31 diff --git a/1014_linux-3.14.15.patch b/1014_linux-3.14.15.patch
32 new file mode 100644
33 index 0000000..f173027
34 --- /dev/null
35 +++ b/1014_linux-3.14.15.patch
36 @@ -0,0 +1,893 @@
37 +diff --git a/Makefile b/Makefile
38 +index 230c7f694ab7..188523e9e880 100644
39 +--- a/Makefile
40 ++++ b/Makefile
41 +@@ -1,6 +1,6 @@
42 + VERSION = 3
43 + PATCHLEVEL = 14
44 +-SUBLEVEL = 14
45 ++SUBLEVEL = 15
46 + EXTRAVERSION =
47 + NAME = Remembering Coco
48 +
49 +@@ -639,6 +639,8 @@ KBUILD_CFLAGS += -fomit-frame-pointer
50 + endif
51 + endif
52 +
53 ++KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
54 ++
55 + ifdef CONFIG_DEBUG_INFO
56 + KBUILD_CFLAGS += -g
57 + KBUILD_AFLAGS += -Wa,--gdwarf-2
58 +diff --git a/arch/parisc/include/uapi/asm/signal.h b/arch/parisc/include/uapi/asm/signal.h
59 +index a2fa297196bc..f5645d6a89f2 100644
60 +--- a/arch/parisc/include/uapi/asm/signal.h
61 ++++ b/arch/parisc/include/uapi/asm/signal.h
62 +@@ -69,8 +69,6 @@
63 + #define SA_NOMASK SA_NODEFER
64 + #define SA_ONESHOT SA_RESETHAND
65 +
66 +-#define SA_RESTORER 0x04000000 /* obsolete -- ignored */
67 +-
68 + #define MINSIGSTKSZ 2048
69 + #define SIGSTKSZ 8192
70 +
71 +diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
72 +index a48bc79a111f..184d305af3e7 100644
73 +--- a/arch/s390/kernel/ptrace.c
74 ++++ b/arch/s390/kernel/ptrace.c
75 +@@ -323,9 +323,14 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)
76 + unsigned long mask = PSW_MASK_USER;
77 +
78 + mask |= is_ri_task(child) ? PSW_MASK_RI : 0;
79 +- if ((data & ~mask) != PSW_USER_BITS)
80 ++ if ((data ^ PSW_USER_BITS) & ~mask)
81 ++ /* Invalid psw mask. */
82 ++ return -EINVAL;
83 ++ if ((data & PSW_MASK_ASC) == PSW_ASC_HOME)
84 ++ /* Invalid address-space-control bits */
85 + return -EINVAL;
86 + if ((data & PSW_MASK_EA) && !(data & PSW_MASK_BA))
87 ++ /* Invalid addressing mode bits */
88 + return -EINVAL;
89 + }
90 + *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data;
91 +@@ -661,9 +666,12 @@ static int __poke_user_compat(struct task_struct *child,
92 +
93 + mask |= is_ri_task(child) ? PSW32_MASK_RI : 0;
94 + /* Build a 64 bit psw mask from 31 bit mask. */
95 +- if ((tmp & ~mask) != PSW32_USER_BITS)
96 ++ if ((tmp ^ PSW32_USER_BITS) & ~mask)
97 + /* Invalid psw mask. */
98 + return -EINVAL;
99 ++ if ((data & PSW32_MASK_ASC) == PSW32_ASC_HOME)
100 ++ /* Invalid address-space-control bits */
101 ++ return -EINVAL;
102 + regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) |
103 + (regs->psw.mask & PSW_MASK_BA) |
104 + (__u64)(tmp & mask) << 32;
105 +diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
106 +index ec3b8ba68096..04da6c2194ba 100644
107 +--- a/arch/x86/boot/header.S
108 ++++ b/arch/x86/boot/header.S
109 +@@ -91,10 +91,9 @@ bs_die:
110 +
111 + .section ".bsdata", "a"
112 + bugger_off_msg:
113 +- .ascii "Direct floppy boot is not supported. "
114 +- .ascii "Use a boot loader program instead.\r\n"
115 ++ .ascii "Use a boot loader.\r\n"
116 + .ascii "\n"
117 +- .ascii "Remove disk and press any key to reboot ...\r\n"
118 ++ .ascii "Remove disk and press any key to reboot...\r\n"
119 + .byte 0
120 +
121 + #ifdef CONFIG_EFI_STUB
122 +@@ -108,7 +107,7 @@ coff_header:
123 + #else
124 + .word 0x8664 # x86-64
125 + #endif
126 +- .word 3 # nr_sections
127 ++ .word 4 # nr_sections
128 + .long 0 # TimeDateStamp
129 + .long 0 # PointerToSymbolTable
130 + .long 1 # NumberOfSymbols
131 +@@ -250,6 +249,25 @@ section_table:
132 + .word 0 # NumberOfLineNumbers
133 + .long 0x60500020 # Characteristics (section flags)
134 +
135 ++ #
136 ++ # The offset & size fields are filled in by build.c.
137 ++ #
138 ++ .ascii ".bss"
139 ++ .byte 0
140 ++ .byte 0
141 ++ .byte 0
142 ++ .byte 0
143 ++ .long 0
144 ++ .long 0x0
145 ++ .long 0 # Size of initialized data
146 ++ # on disk
147 ++ .long 0x0
148 ++ .long 0 # PointerToRelocations
149 ++ .long 0 # PointerToLineNumbers
150 ++ .word 0 # NumberOfRelocations
151 ++ .word 0 # NumberOfLineNumbers
152 ++ .long 0xc8000080 # Characteristics (section flags)
153 ++
154 + #endif /* CONFIG_EFI_STUB */
155 +
156 + # Kernel attributes; used by setup. This is part 1 of the
157 +diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c
158 +index 8e15b22391fc..3dafaeb9f549 100644
159 +--- a/arch/x86/boot/tools/build.c
160 ++++ b/arch/x86/boot/tools/build.c
161 +@@ -142,7 +142,7 @@ static void usage(void)
162 +
163 + #ifdef CONFIG_EFI_STUB
164 +
165 +-static void update_pecoff_section_header(char *section_name, u32 offset, u32 size)
166 ++static void update_pecoff_section_header_fields(char *section_name, u32 vma, u32 size, u32 datasz, u32 offset)
167 + {
168 + unsigned int pe_header;
169 + unsigned short num_sections;
170 +@@ -163,10 +163,10 @@ static void update_pecoff_section_header(char *section_name, u32 offset, u32 siz
171 + put_unaligned_le32(size, section + 0x8);
172 +
173 + /* section header vma field */
174 +- put_unaligned_le32(offset, section + 0xc);
175 ++ put_unaligned_le32(vma, section + 0xc);
176 +
177 + /* section header 'size of initialised data' field */
178 +- put_unaligned_le32(size, section + 0x10);
179 ++ put_unaligned_le32(datasz, section + 0x10);
180 +
181 + /* section header 'file offset' field */
182 + put_unaligned_le32(offset, section + 0x14);
183 +@@ -178,6 +178,11 @@ static void update_pecoff_section_header(char *section_name, u32 offset, u32 siz
184 + }
185 + }
186 +
187 ++static void update_pecoff_section_header(char *section_name, u32 offset, u32 size)
188 ++{
189 ++ update_pecoff_section_header_fields(section_name, offset, size, size, offset);
190 ++}
191 ++
192 + static void update_pecoff_setup_and_reloc(unsigned int size)
193 + {
194 + u32 setup_offset = 0x200;
195 +@@ -202,9 +207,6 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz)
196 +
197 + pe_header = get_unaligned_le32(&buf[0x3c]);
198 +
199 +- /* Size of image */
200 +- put_unaligned_le32(file_sz, &buf[pe_header + 0x50]);
201 +-
202 + /*
203 + * Size of code: Subtract the size of the first sector (512 bytes)
204 + * which includes the header.
205 +@@ -219,6 +221,22 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz)
206 + update_pecoff_section_header(".text", text_start, text_sz);
207 + }
208 +
209 ++static void update_pecoff_bss(unsigned int file_sz, unsigned int init_sz)
210 ++{
211 ++ unsigned int pe_header;
212 ++ unsigned int bss_sz = init_sz - file_sz;
213 ++
214 ++ pe_header = get_unaligned_le32(&buf[0x3c]);
215 ++
216 ++ /* Size of uninitialized data */
217 ++ put_unaligned_le32(bss_sz, &buf[pe_header + 0x24]);
218 ++
219 ++ /* Size of image */
220 ++ put_unaligned_le32(init_sz, &buf[pe_header + 0x50]);
221 ++
222 ++ update_pecoff_section_header_fields(".bss", file_sz, bss_sz, 0, 0);
223 ++}
224 ++
225 + #endif /* CONFIG_EFI_STUB */
226 +
227 +
228 +@@ -270,6 +288,9 @@ int main(int argc, char ** argv)
229 + int fd;
230 + void *kernel;
231 + u32 crc = 0xffffffffUL;
232 ++#ifdef CONFIG_EFI_STUB
233 ++ unsigned int init_sz;
234 ++#endif
235 +
236 + /* Defaults for old kernel */
237 + #ifdef CONFIG_X86_32
238 +@@ -343,7 +364,9 @@ int main(int argc, char ** argv)
239 + put_unaligned_le32(sys_size, &buf[0x1f4]);
240 +
241 + #ifdef CONFIG_EFI_STUB
242 +- update_pecoff_text(setup_sectors * 512, sz + i + ((sys_size * 16) - sz));
243 ++ update_pecoff_text(setup_sectors * 512, i + (sys_size * 16));
244 ++ init_sz = get_unaligned_le32(&buf[0x260]);
245 ++ update_pecoff_bss(i + (sys_size * 16), init_sz);
246 +
247 + #ifdef CONFIG_X86_64 /* Yes, this is really how we defined it :( */
248 + efi_stub_entry -= 0x200;
249 +diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
250 +index 6491353cc9aa..c87810b1b557 100644
251 +--- a/arch/x86/kernel/entry_32.S
252 ++++ b/arch/x86/kernel/entry_32.S
253 +@@ -433,8 +433,8 @@ sysenter_do_call:
254 + cmpl $(NR_syscalls), %eax
255 + jae sysenter_badsys
256 + call *sys_call_table(,%eax,4)
257 +- movl %eax,PT_EAX(%esp)
258 + sysenter_after_call:
259 ++ movl %eax,PT_EAX(%esp)
260 + LOCKDEP_SYS_EXIT
261 + DISABLE_INTERRUPTS(CLBR_ANY)
262 + TRACE_IRQS_OFF
263 +@@ -514,6 +514,7 @@ ENTRY(system_call)
264 + jae syscall_badsys
265 + syscall_call:
266 + call *sys_call_table(,%eax,4)
267 ++syscall_after_call:
268 + movl %eax,PT_EAX(%esp) # store the return value
269 + syscall_exit:
270 + LOCKDEP_SYS_EXIT
271 +@@ -683,12 +684,12 @@ syscall_fault:
272 + END(syscall_fault)
273 +
274 + syscall_badsys:
275 +- movl $-ENOSYS,PT_EAX(%esp)
276 +- jmp syscall_exit
277 ++ movl $-ENOSYS,%eax
278 ++ jmp syscall_after_call
279 + END(syscall_badsys)
280 +
281 + sysenter_badsys:
282 +- movl $-ENOSYS,PT_EAX(%esp)
283 ++ movl $-ENOSYS,%eax
284 + jmp sysenter_after_call
285 + END(syscall_badsys)
286 + CFI_ENDPROC
287 +diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
288 +index dd0dd2d4ceca..d8f80e733cf8 100644
289 +--- a/block/blk-cgroup.c
290 ++++ b/block/blk-cgroup.c
291 +@@ -859,6 +859,13 @@ void blkcg_drain_queue(struct request_queue *q)
292 + {
293 + lockdep_assert_held(q->queue_lock);
294 +
295 ++ /*
296 ++ * @q could be exiting and already have destroyed all blkgs as
297 ++ * indicated by NULL root_blkg. If so, don't confuse policies.
298 ++ */
299 ++ if (!q->root_blkg)
300 ++ return;
301 ++
302 + blk_throtl_drain(q);
303 + }
304 +
305 +diff --git a/block/blk-tag.c b/block/blk-tag.c
306 +index 3f33d8672268..a185b86741e5 100644
307 +--- a/block/blk-tag.c
308 ++++ b/block/blk-tag.c
309 +@@ -27,18 +27,15 @@ struct request *blk_queue_find_tag(struct request_queue *q, int tag)
310 + EXPORT_SYMBOL(blk_queue_find_tag);
311 +
312 + /**
313 +- * __blk_free_tags - release a given set of tag maintenance info
314 ++ * blk_free_tags - release a given set of tag maintenance info
315 + * @bqt: the tag map to free
316 + *
317 +- * Tries to free the specified @bqt. Returns true if it was
318 +- * actually freed and false if there are still references using it
319 ++ * Drop the reference count on @bqt and frees it when the last reference
320 ++ * is dropped.
321 + */
322 +-static int __blk_free_tags(struct blk_queue_tag *bqt)
323 ++void blk_free_tags(struct blk_queue_tag *bqt)
324 + {
325 +- int retval;
326 +-
327 +- retval = atomic_dec_and_test(&bqt->refcnt);
328 +- if (retval) {
329 ++ if (atomic_dec_and_test(&bqt->refcnt)) {
330 + BUG_ON(find_first_bit(bqt->tag_map, bqt->max_depth) <
331 + bqt->max_depth);
332 +
333 +@@ -50,9 +47,8 @@ static int __blk_free_tags(struct blk_queue_tag *bqt)
334 +
335 + kfree(bqt);
336 + }
337 +-
338 +- return retval;
339 + }
340 ++EXPORT_SYMBOL(blk_free_tags);
341 +
342 + /**
343 + * __blk_queue_free_tags - release tag maintenance info
344 +@@ -69,28 +65,13 @@ void __blk_queue_free_tags(struct request_queue *q)
345 + if (!bqt)
346 + return;
347 +
348 +- __blk_free_tags(bqt);
349 ++ blk_free_tags(bqt);
350 +
351 + q->queue_tags = NULL;
352 + queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q);
353 + }
354 +
355 + /**
356 +- * blk_free_tags - release a given set of tag maintenance info
357 +- * @bqt: the tag map to free
358 +- *
359 +- * For externally managed @bqt frees the map. Callers of this
360 +- * function must guarantee to have released all the queues that
361 +- * might have been using this tag map.
362 +- */
363 +-void blk_free_tags(struct blk_queue_tag *bqt)
364 +-{
365 +- if (unlikely(!__blk_free_tags(bqt)))
366 +- BUG();
367 +-}
368 +-EXPORT_SYMBOL(blk_free_tags);
369 +-
370 +-/**
371 + * blk_queue_free_tags - release tag maintenance info
372 + * @q: the request queue for the device
373 + *
374 +diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
375 +index fbd5a67cb773..a0926a6094b2 100644
376 +--- a/block/compat_ioctl.c
377 ++++ b/block/compat_ioctl.c
378 +@@ -690,6 +690,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
379 + case BLKROSET:
380 + case BLKDISCARD:
381 + case BLKSECDISCARD:
382 ++ case BLKZEROOUT:
383 + /*
384 + * the ones below are implemented in blkdev_locked_ioctl,
385 + * but we call blkdev_ioctl, which gets the lock for us
386 +diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
387 +index 9aa42998d757..b54f8b3c7924 100644
388 +--- a/drivers/ata/ahci.c
389 ++++ b/drivers/ata/ahci.c
390 +@@ -457,6 +457,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
391 +
392 + /* Promise */
393 + { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
394 ++ { PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */
395 +
396 + /* Asmedia */
397 + { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */
398 +diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
399 +index 62fda16c8377..f7616036663b 100644
400 +--- a/drivers/ata/libata-core.c
401 ++++ b/drivers/ata/libata-core.c
402 +@@ -4787,6 +4787,10 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
403 + * ata_qc_new - Request an available ATA command, for queueing
404 + * @ap: target port
405 + *
406 ++ * Some ATA host controllers may implement a queue depth which is less
407 ++ * than ATA_MAX_QUEUE. So we shouldn't allocate a tag which is beyond
408 ++ * the hardware limitation.
409 ++ *
410 + * LOCKING:
411 + * None.
412 + */
413 +@@ -4794,14 +4798,15 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
414 + static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap)
415 + {
416 + struct ata_queued_cmd *qc = NULL;
417 ++ unsigned int max_queue = ap->host->n_tags;
418 + unsigned int i, tag;
419 +
420 + /* no command while frozen */
421 + if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
422 + return NULL;
423 +
424 +- for (i = 0; i < ATA_MAX_QUEUE; i++) {
425 +- tag = (i + ap->last_tag + 1) % ATA_MAX_QUEUE;
426 ++ for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) {
427 ++ tag = tag < max_queue ? tag : 0;
428 +
429 + /* the last tag is reserved for internal command. */
430 + if (tag == ATA_TAG_INTERNAL)
431 +@@ -6103,6 +6108,7 @@ void ata_host_init(struct ata_host *host, struct device *dev,
432 + {
433 + spin_lock_init(&host->lock);
434 + mutex_init(&host->eh_mutex);
435 ++ host->n_tags = ATA_MAX_QUEUE - 1;
436 + host->dev = dev;
437 + host->ops = ops;
438 + }
439 +@@ -6184,6 +6190,8 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
440 + {
441 + int i, rc;
442 +
443 ++ host->n_tags = clamp(sht->can_queue, 1, ATA_MAX_QUEUE - 1);
444 ++
445 + /* host must have been started */
446 + if (!(host->flags & ATA_HOST_STARTED)) {
447 + dev_err(host->dev, "BUG: trying to register unstarted host\n");
448 +diff --git a/drivers/base/platform.c b/drivers/base/platform.c
449 +index 3c51eb0bd659..9dbf4ef2b2a3 100644
450 +--- a/drivers/base/platform.c
451 ++++ b/drivers/base/platform.c
452 +@@ -89,8 +89,13 @@ int platform_get_irq(struct platform_device *dev, unsigned int num)
453 + return dev->archdata.irqs[num];
454 + #else
455 + struct resource *r;
456 +- if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node)
457 +- return of_irq_get(dev->dev.of_node, num);
458 ++ if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) {
459 ++ int ret;
460 ++
461 ++ ret = of_irq_get(dev->dev.of_node, num);
462 ++ if (ret >= 0 || ret == -EPROBE_DEFER)
463 ++ return ret;
464 ++ }
465 +
466 + r = platform_get_resource(dev, IORESOURCE_IRQ, num);
467 +
468 +diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
469 +index 270f68a6b724..7164045c06e4 100644
470 +--- a/drivers/gpu/drm/radeon/cik.c
471 ++++ b/drivers/gpu/drm/radeon/cik.c
472 +@@ -2219,6 +2219,7 @@ static void cik_tiling_mode_table_init(struct radeon_device *rdev)
473 + gb_tile_moden = 0;
474 + break;
475 + }
476 ++ rdev->config.cik.macrotile_mode_array[reg_offset] = gb_tile_moden;
477 + WREG32(GB_MACROTILE_MODE0 + (reg_offset * 4), gb_tile_moden);
478 + }
479 + } else if (num_pipe_configs == 8) {
480 +@@ -7270,6 +7271,7 @@ static inline u32 cik_get_ih_wptr(struct radeon_device *rdev)
481 + tmp = RREG32(IH_RB_CNTL);
482 + tmp |= IH_WPTR_OVERFLOW_CLEAR;
483 + WREG32(IH_RB_CNTL, tmp);
484 ++ wptr &= ~RB_OVERFLOW;
485 + }
486 + return (wptr & rdev->ih.ptr_mask);
487 + }
488 +diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
489 +index 64108dbc7d45..4b3c5f7ae63b 100644
490 +--- a/drivers/gpu/drm/radeon/evergreen.c
491 ++++ b/drivers/gpu/drm/radeon/evergreen.c
492 +@@ -4763,6 +4763,7 @@ static u32 evergreen_get_ih_wptr(struct radeon_device *rdev)
493 + tmp = RREG32(IH_RB_CNTL);
494 + tmp |= IH_WPTR_OVERFLOW_CLEAR;
495 + WREG32(IH_RB_CNTL, tmp);
496 ++ wptr &= ~RB_OVERFLOW;
497 + }
498 + return (wptr & rdev->ih.ptr_mask);
499 + }
500 +diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
501 +index f28ab840cc23..788f602e8989 100644
502 +--- a/drivers/gpu/drm/radeon/r600.c
503 ++++ b/drivers/gpu/drm/radeon/r600.c
504 +@@ -3795,6 +3795,7 @@ static u32 r600_get_ih_wptr(struct radeon_device *rdev)
505 + tmp = RREG32(IH_RB_CNTL);
506 + tmp |= IH_WPTR_OVERFLOW_CLEAR;
507 + WREG32(IH_RB_CNTL, tmp);
508 ++ wptr &= ~RB_OVERFLOW;
509 + }
510 + return (wptr & rdev->ih.ptr_mask);
511 + }
512 +diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
513 +index cb7508dc94f3..ea93393374df 100644
514 +--- a/drivers/gpu/drm/radeon/si.c
515 ++++ b/drivers/gpu/drm/radeon/si.c
516 +@@ -6098,6 +6098,7 @@ static inline u32 si_get_ih_wptr(struct radeon_device *rdev)
517 + tmp = RREG32(IH_RB_CNTL);
518 + tmp |= IH_WPTR_OVERFLOW_CLEAR;
519 + WREG32(IH_RB_CNTL, tmp);
520 ++ wptr &= ~RB_OVERFLOW;
521 + }
522 + return (wptr & rdev->ih.ptr_mask);
523 + }
524 +diff --git a/drivers/hwmon/smsc47m192.c b/drivers/hwmon/smsc47m192.c
525 +index efee4c59239f..34b9a601ad07 100644
526 +--- a/drivers/hwmon/smsc47m192.c
527 ++++ b/drivers/hwmon/smsc47m192.c
528 +@@ -86,7 +86,7 @@ static inline u8 IN_TO_REG(unsigned long val, int n)
529 + */
530 + static inline s8 TEMP_TO_REG(int val)
531 + {
532 +- return clamp_val(SCALE(val, 1, 1000), -128000, 127000);
533 ++ return SCALE(clamp_val(val, -128000, 127000), 1, 1000);
534 + }
535 +
536 + static inline int TEMP_FROM_REG(s8 val)
537 +@@ -384,6 +384,8 @@ static ssize_t set_vrm(struct device *dev, struct device_attribute *attr,
538 + err = kstrtoul(buf, 10, &val);
539 + if (err)
540 + return err;
541 ++ if (val > 255)
542 ++ return -EINVAL;
543 +
544 + data->vrm = val;
545 + return count;
546 +diff --git a/drivers/input/input.c b/drivers/input/input.c
547 +index 1c4c0db05550..29ca0bb4f561 100644
548 +--- a/drivers/input/input.c
549 ++++ b/drivers/input/input.c
550 +@@ -257,9 +257,10 @@ static int input_handle_abs_event(struct input_dev *dev,
551 + }
552 +
553 + static int input_get_disposition(struct input_dev *dev,
554 +- unsigned int type, unsigned int code, int value)
555 ++ unsigned int type, unsigned int code, int *pval)
556 + {
557 + int disposition = INPUT_IGNORE_EVENT;
558 ++ int value = *pval;
559 +
560 + switch (type) {
561 +
562 +@@ -357,6 +358,7 @@ static int input_get_disposition(struct input_dev *dev,
563 + break;
564 + }
565 +
566 ++ *pval = value;
567 + return disposition;
568 + }
569 +
570 +@@ -365,7 +367,7 @@ static void input_handle_event(struct input_dev *dev,
571 + {
572 + int disposition;
573 +
574 +- disposition = input_get_disposition(dev, type, code, value);
575 ++ disposition = input_get_disposition(dev, type, code, &value);
576 +
577 + if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
578 + dev->event(dev, type, code, value);
579 +diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
580 +index ec772d962f06..ef9e0b8a9aa7 100644
581 +--- a/drivers/input/mouse/synaptics.c
582 ++++ b/drivers/input/mouse/synaptics.c
583 +@@ -132,7 +132,8 @@ static const struct min_max_quirk min_max_pnpid_table[] = {
584 + 1232, 5710, 1156, 4696
585 + },
586 + {
587 +- (const char * const []){"LEN0034", "LEN0036", "LEN2004", NULL},
588 ++ (const char * const []){"LEN0034", "LEN0036", "LEN2002",
589 ++ "LEN2004", NULL},
590 + 1024, 5112, 2024, 4832
591 + },
592 + {
593 +@@ -168,7 +169,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
594 + "LEN0049",
595 + "LEN2000",
596 + "LEN2001", /* Edge E431 */
597 +- "LEN2002",
598 ++ "LEN2002", /* Edge E531 */
599 + "LEN2003",
600 + "LEN2004", /* L440 */
601 + "LEN2005",
602 +diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c
603 +index 8ad3a57cf640..287b977862e2 100644
604 +--- a/drivers/media/dvb-frontends/tda10071.c
605 ++++ b/drivers/media/dvb-frontends/tda10071.c
606 +@@ -667,6 +667,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
607 + struct dtv_frontend_properties *c = &fe->dtv_property_cache;
608 + int ret, i;
609 + u8 mode, rolloff, pilot, inversion, div;
610 ++ fe_modulation_t modulation;
611 +
612 + dev_dbg(&priv->i2c->dev, "%s: delivery_system=%d modulation=%d " \
613 + "frequency=%d symbol_rate=%d inversion=%d pilot=%d " \
614 +@@ -701,10 +702,13 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
615 +
616 + switch (c->delivery_system) {
617 + case SYS_DVBS:
618 ++ modulation = QPSK;
619 + rolloff = 0;
620 + pilot = 2;
621 + break;
622 + case SYS_DVBS2:
623 ++ modulation = c->modulation;
624 ++
625 + switch (c->rolloff) {
626 + case ROLLOFF_20:
627 + rolloff = 2;
628 +@@ -749,7 +753,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
629 +
630 + for (i = 0, mode = 0xff; i < ARRAY_SIZE(TDA10071_MODCOD); i++) {
631 + if (c->delivery_system == TDA10071_MODCOD[i].delivery_system &&
632 +- c->modulation == TDA10071_MODCOD[i].modulation &&
633 ++ modulation == TDA10071_MODCOD[i].modulation &&
634 + c->fec_inner == TDA10071_MODCOD[i].fec) {
635 + mode = TDA10071_MODCOD[i].val;
636 + dev_dbg(&priv->i2c->dev, "%s: mode found=%02x\n",
637 +diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
638 +index 0500c4175d5f..6bce01a674f9 100644
639 +--- a/drivers/media/usb/hdpvr/hdpvr-video.c
640 ++++ b/drivers/media/usb/hdpvr/hdpvr-video.c
641 +@@ -82,7 +82,7 @@ static void hdpvr_read_bulk_callback(struct urb *urb)
642 + }
643 +
644 + /*=========================================================================*/
645 +-/* bufffer bits */
646 ++/* buffer bits */
647 +
648 + /* function expects dev->io_mutex to be hold by caller */
649 + int hdpvr_cancel_queue(struct hdpvr_device *dev)
650 +@@ -926,7 +926,7 @@ static int hdpvr_s_ctrl(struct v4l2_ctrl *ctrl)
651 + case V4L2_CID_MPEG_AUDIO_ENCODING:
652 + if (dev->flags & HDPVR_FLAG_AC3_CAP) {
653 + opt->audio_codec = ctrl->val;
654 +- return hdpvr_set_audio(dev, opt->audio_input,
655 ++ return hdpvr_set_audio(dev, opt->audio_input + 1,
656 + opt->audio_codec);
657 + }
658 + return 0;
659 +@@ -1198,7 +1198,7 @@ int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent,
660 + v4l2_ctrl_new_std_menu(hdl, &hdpvr_ctrl_ops,
661 + V4L2_CID_MPEG_AUDIO_ENCODING,
662 + ac3 ? V4L2_MPEG_AUDIO_ENCODING_AC3 : V4L2_MPEG_AUDIO_ENCODING_AAC,
663 +- 0x7, V4L2_MPEG_AUDIO_ENCODING_AAC);
664 ++ 0x7, ac3 ? dev->options.audio_codec : V4L2_MPEG_AUDIO_ENCODING_AAC);
665 + v4l2_ctrl_new_std_menu(hdl, &hdpvr_ctrl_ops,
666 + V4L2_CID_MPEG_VIDEO_ENCODING,
667 + V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC, 0x3,
668 +diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c
669 +index a2e257970fec..78d99b137d91 100644
670 +--- a/drivers/media/v4l2-core/v4l2-dv-timings.c
671 ++++ b/drivers/media/v4l2-core/v4l2-dv-timings.c
672 +@@ -595,10 +595,10 @@ struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait)
673 + aspect.denominator = 9;
674 + } else if (ratio == 34) {
675 + aspect.numerator = 4;
676 +- aspect.numerator = 3;
677 ++ aspect.denominator = 3;
678 + } else if (ratio == 68) {
679 + aspect.numerator = 15;
680 +- aspect.numerator = 9;
681 ++ aspect.denominator = 9;
682 + } else {
683 + aspect.numerator = hor_landscape + 99;
684 + aspect.denominator = 100;
685 +diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig
686 +index 2872ece81f35..44333bd8f908 100644
687 +--- a/drivers/parport/Kconfig
688 ++++ b/drivers/parport/Kconfig
689 +@@ -5,6 +5,12 @@
690 + # Parport configuration.
691 + #
692 +
693 ++config ARCH_MIGHT_HAVE_PC_PARPORT
694 ++ bool
695 ++ help
696 ++ Select this config option from the architecture Kconfig if
697 ++ the architecture might have PC parallel port hardware.
698 ++
699 + menuconfig PARPORT
700 + tristate "Parallel port support"
701 + depends on HAS_IOMEM
702 +@@ -31,12 +37,6 @@ menuconfig PARPORT
703 +
704 + If unsure, say Y.
705 +
706 +-config ARCH_MIGHT_HAVE_PC_PARPORT
707 +- bool
708 +- help
709 +- Select this config option from the architecture Kconfig if
710 +- the architecture might have PC parallel port hardware.
711 +-
712 + if PARPORT
713 +
714 + config PARPORT_PC
715 +diff --git a/drivers/staging/media/omap4iss/Kconfig b/drivers/staging/media/omap4iss/Kconfig
716 +index b9fe753969bd..15940f8fdd24 100644
717 +--- a/drivers/staging/media/omap4iss/Kconfig
718 ++++ b/drivers/staging/media/omap4iss/Kconfig
719 +@@ -1,6 +1,6 @@
720 + config VIDEO_OMAP4
721 + bool "OMAP 4 Camera support"
722 +- depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && I2C && ARCH_OMAP4
723 ++ depends on VIDEO_V4L2=y && VIDEO_V4L2_SUBDEV_API && I2C=y && ARCH_OMAP4
724 + select VIDEOBUF2_DMA_CONTIG
725 + ---help---
726 + Driver for an OMAP 4 ISS controller.
727 +diff --git a/fs/coredump.c b/fs/coredump.c
728 +index 0b2528fb640e..a93f7e6ea4cf 100644
729 +--- a/fs/coredump.c
730 ++++ b/fs/coredump.c
731 +@@ -306,7 +306,7 @@ static int zap_threads(struct task_struct *tsk, struct mm_struct *mm,
732 + if (unlikely(nr < 0))
733 + return nr;
734 +
735 +- tsk->flags = PF_DUMPCORE;
736 ++ tsk->flags |= PF_DUMPCORE;
737 + if (atomic_read(&mm->mm_users) == nr + 1)
738 + goto done;
739 + /*
740 +diff --git a/fs/namei.c b/fs/namei.c
741 +index 8274c8d39b03..bdea10963aa5 100644
742 +--- a/fs/namei.c
743 ++++ b/fs/namei.c
744 +@@ -2247,9 +2247,10 @@ done:
745 + goto out;
746 + }
747 + path->dentry = dentry;
748 +- path->mnt = mntget(nd->path.mnt);
749 ++ path->mnt = nd->path.mnt;
750 + if (should_follow_link(dentry, nd->flags & LOOKUP_FOLLOW))
751 + return 1;
752 ++ mntget(path->mnt);
753 + follow_mount(path);
754 + error = 0;
755 + out:
756 +diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
757 +index 871d6eda8dba..8f854dde4150 100644
758 +--- a/fs/nfs/nfs3acl.c
759 ++++ b/fs/nfs/nfs3acl.c
760 +@@ -247,3 +247,46 @@ const struct xattr_handler *nfs3_xattr_handlers[] = {
761 + &posix_acl_default_xattr_handler,
762 + NULL,
763 + };
764 ++
765 ++static int
766 ++nfs3_list_one_acl(struct inode *inode, int type, const char *name, void *data,
767 ++ size_t size, ssize_t *result)
768 ++{
769 ++ struct posix_acl *acl;
770 ++ char *p = data + *result;
771 ++
772 ++ acl = get_acl(inode, type);
773 ++ if (!acl)
774 ++ return 0;
775 ++
776 ++ posix_acl_release(acl);
777 ++
778 ++ *result += strlen(name);
779 ++ *result += 1;
780 ++ if (!size)
781 ++ return 0;
782 ++ if (*result > size)
783 ++ return -ERANGE;
784 ++
785 ++ strcpy(p, name);
786 ++ return 0;
787 ++}
788 ++
789 ++ssize_t
790 ++nfs3_listxattr(struct dentry *dentry, char *data, size_t size)
791 ++{
792 ++ struct inode *inode = dentry->d_inode;
793 ++ ssize_t result = 0;
794 ++ int error;
795 ++
796 ++ error = nfs3_list_one_acl(inode, ACL_TYPE_ACCESS,
797 ++ POSIX_ACL_XATTR_ACCESS, data, size, &result);
798 ++ if (error)
799 ++ return error;
800 ++
801 ++ error = nfs3_list_one_acl(inode, ACL_TYPE_DEFAULT,
802 ++ POSIX_ACL_XATTR_DEFAULT, data, size, &result);
803 ++ if (error)
804 ++ return error;
805 ++ return result;
806 ++}
807 +diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
808 +index a462ef0fb5d6..8a18b4a0a4ee 100644
809 +--- a/fs/nfs/nfs3proc.c
810 ++++ b/fs/nfs/nfs3proc.c
811 +@@ -926,7 +926,7 @@ static const struct inode_operations nfs3_dir_inode_operations = {
812 + .getattr = nfs_getattr,
813 + .setattr = nfs_setattr,
814 + #ifdef CONFIG_NFS_V3_ACL
815 +- .listxattr = generic_listxattr,
816 ++ .listxattr = nfs3_listxattr,
817 + .getxattr = generic_getxattr,
818 + .setxattr = generic_setxattr,
819 + .removexattr = generic_removexattr,
820 +@@ -940,7 +940,7 @@ static const struct inode_operations nfs3_file_inode_operations = {
821 + .getattr = nfs_getattr,
822 + .setattr = nfs_setattr,
823 + #ifdef CONFIG_NFS_V3_ACL
824 +- .listxattr = generic_listxattr,
825 ++ .listxattr = nfs3_listxattr,
826 + .getxattr = generic_getxattr,
827 + .setxattr = generic_setxattr,
828 + .removexattr = generic_removexattr,
829 +diff --git a/include/linux/libata.h b/include/linux/libata.h
830 +index 3fee55e73e5e..e13b3aef0b0c 100644
831 +--- a/include/linux/libata.h
832 ++++ b/include/linux/libata.h
833 +@@ -593,6 +593,7 @@ struct ata_host {
834 + struct device *dev;
835 + void __iomem * const *iomap;
836 + unsigned int n_ports;
837 ++ unsigned int n_tags; /* nr of NCQ tags */
838 + void *private_data;
839 + struct ata_port_operations *ops;
840 + unsigned long flags;
841 +diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
842 +index 7e259b2bdf44..71136720ffa1 100644
843 +--- a/kernel/trace/trace.c
844 ++++ b/kernel/trace/trace.c
845 +@@ -811,7 +811,7 @@ static struct {
846 + { trace_clock_local, "local", 1 },
847 + { trace_clock_global, "global", 1 },
848 + { trace_clock_counter, "counter", 0 },
849 +- { trace_clock_jiffies, "uptime", 1 },
850 ++ { trace_clock_jiffies, "uptime", 0 },
851 + { trace_clock, "perf", 1 },
852 + ARCH_TRACE_CLOCKS
853 + };
854 +diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
855 +index 26dc348332b7..57b67b1f24d1 100644
856 +--- a/kernel/trace/trace_clock.c
857 ++++ b/kernel/trace/trace_clock.c
858 +@@ -59,13 +59,14 @@ u64 notrace trace_clock(void)
859 +
860 + /*
861 + * trace_jiffy_clock(): Simply use jiffies as a clock counter.
862 ++ * Note that this use of jiffies_64 is not completely safe on
863 ++ * 32-bit systems. But the window is tiny, and the effect if
864 ++ * we are affected is that we will have an obviously bogus
865 ++ * timestamp on a trace event - i.e. not life threatening.
866 + */
867 + u64 notrace trace_clock_jiffies(void)
868 + {
869 +- u64 jiffy = jiffies - INITIAL_JIFFIES;
870 +-
871 +- /* Return nsecs */
872 +- return (u64)jiffies_to_usecs(jiffy) * 1000ULL;
873 ++ return jiffies_64_to_clock_t(jiffies_64 - INITIAL_JIFFIES);
874 + }
875 +
876 + /*
877 +diff --git a/mm/hugetlb.c b/mm/hugetlb.c
878 +index 30dd6265a141..923f38e62bcf 100644
879 +--- a/mm/hugetlb.c
880 ++++ b/mm/hugetlb.c
881 +@@ -2422,6 +2422,7 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
882 + } else {
883 + if (cow)
884 + huge_ptep_set_wrprotect(src, addr, src_pte);
885 ++ entry = huge_ptep_get(src_pte);
886 + ptepage = pte_page(entry);
887 + get_page(ptepage);
888 + page_dup_rmap(ptepage);
889 +diff --git a/mm/slab_common.c b/mm/slab_common.c
890 +index 1ec3c619ba04..f149e6724411 100644
891 +--- a/mm/slab_common.c
892 ++++ b/mm/slab_common.c
893 +@@ -56,7 +56,7 @@ static int kmem_cache_sanity_check(struct mem_cgroup *memcg, const char *name,
894 + continue;
895 + }
896 +
897 +-#if !defined(CONFIG_SLUB) || !defined(CONFIG_SLUB_DEBUG_ON)
898 ++#if !defined(CONFIG_SLUB)
899 + /*
900 + * For simplicity, we won't check this in the list of memcg
901 + * caches. We have control over memcg naming, and if there
902 +diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
903 +index 4fe2e6e2bc76..e6283464a8e6 100644
904 +--- a/net/wireless/nl80211.c
905 ++++ b/net/wireless/nl80211.c
906 +@@ -1450,18 +1450,17 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
907 + }
908 + CMD(start_p2p_device, START_P2P_DEVICE);
909 + CMD(set_mcast_rate, SET_MCAST_RATE);
910 ++#ifdef CONFIG_NL80211_TESTMODE
911 ++ CMD(testmode_cmd, TESTMODE);
912 ++#endif
913 + if (state->split) {
914 + CMD(crit_proto_start, CRIT_PROTOCOL_START);
915 + CMD(crit_proto_stop, CRIT_PROTOCOL_STOP);
916 + if (dev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH)
917 + CMD(channel_switch, CHANNEL_SWITCH);
918 ++ CMD(set_qos_map, SET_QOS_MAP);
919 + }
920 +- CMD(set_qos_map, SET_QOS_MAP);
921 +-
922 +-#ifdef CONFIG_NL80211_TESTMODE
923 +- CMD(testmode_cmd, TESTMODE);
924 +-#endif
925 +-
926 ++ /* add into the if now */
927 + #undef CMD
928 +
929 + if (dev->ops->connect || dev->ops->auth) {