Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:3.15 commit in: /
Date: Sat, 02 Aug 2014 16:29:43
Message-Id: 1406996851.c161f53362c20e3d2fda97942def9a3ce9390675.mpagano@gentoo
1 commit: c161f53362c20e3d2fda97942def9a3ce9390675
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 2 16:27:31 2014 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 2 16:27:31 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=c161f533
7
8 Linux patch 3.15.8
9
10 ---
11 0000_README | 4 +
12 1007_linux-3.15.8.patch | 1014 +++++++++++++++++++++++++++++++++++++++++++++++
13 2 files changed, 1018 insertions(+)
14
15 diff --git a/0000_README b/0000_README
16 index afe4465..bab5745 100644
17 --- a/0000_README
18 +++ b/0000_README
19 @@ -71,6 +71,10 @@ Patch: 1006_linux-3.15.7.patch
20 From: http://www.kernel.org
21 Desc: Linux 3.15.7
22
23 +Patch: 1007_linux-3.15.8.patch
24 +From: http://www.kernel.org
25 +Desc: Linux 3.15.8
26 +
27 Patch: 1700_enable-thinkpad-micled.patch
28 From: https://bugs.gentoo.org/show_bug.cgi?id=449248
29 Desc: Enable mic mute led in thinkpads
30
31 diff --git a/1007_linux-3.15.8.patch b/1007_linux-3.15.8.patch
32 new file mode 100644
33 index 0000000..f0d7a6d
34 --- /dev/null
35 +++ b/1007_linux-3.15.8.patch
36 @@ -0,0 +1,1014 @@
37 +diff --git a/Makefile b/Makefile
38 +index 833f67f3f80f..d5d9a22a404a 100644
39 +--- a/Makefile
40 ++++ b/Makefile
41 +@@ -1,8 +1,8 @@
42 + VERSION = 3
43 + PATCHLEVEL = 15
44 +-SUBLEVEL = 7
45 ++SUBLEVEL = 8
46 + EXTRAVERSION =
47 +-NAME = Shuffling Zombie Juror
48 ++NAME = Double Funky Skunk
49 +
50 + # *DOCUMENTATION*
51 + # To see a list of typical targets execute "make help"
52 +@@ -669,6 +669,8 @@ KBUILD_CFLAGS += -fomit-frame-pointer
53 + endif
54 + endif
55 +
56 ++KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
57 ++
58 + ifdef CONFIG_DEBUG_INFO
59 + KBUILD_CFLAGS += -g
60 + KBUILD_AFLAGS += -Wa,--gdwarf-2
61 +diff --git a/arch/parisc/include/uapi/asm/signal.h b/arch/parisc/include/uapi/asm/signal.h
62 +index a2fa297196bc..f5645d6a89f2 100644
63 +--- a/arch/parisc/include/uapi/asm/signal.h
64 ++++ b/arch/parisc/include/uapi/asm/signal.h
65 +@@ -69,8 +69,6 @@
66 + #define SA_NOMASK SA_NODEFER
67 + #define SA_ONESHOT SA_RESETHAND
68 +
69 +-#define SA_RESTORER 0x04000000 /* obsolete -- ignored */
70 +-
71 + #define MINSIGSTKSZ 2048
72 + #define SIGSTKSZ 8192
73 +
74 +diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
75 +index 022b38e6a80b..2d0b4d68a40a 100644
76 +--- a/arch/powerpc/platforms/pseries/dlpar.c
77 ++++ b/arch/powerpc/platforms/pseries/dlpar.c
78 +@@ -86,6 +86,7 @@ static struct device_node *dlpar_parse_cc_node(struct cc_workarea *ccwa,
79 + }
80 +
81 + of_node_set_flag(dn, OF_DYNAMIC);
82 ++ of_node_init(dn);
83 +
84 + return dn;
85 + }
86 +diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
87 +index 0435bb65d0aa..1c0a60d98867 100644
88 +--- a/arch/powerpc/platforms/pseries/reconfig.c
89 ++++ b/arch/powerpc/platforms/pseries/reconfig.c
90 +@@ -69,6 +69,7 @@ static int pSeries_reconfig_add_node(const char *path, struct property *proplist
91 +
92 + np->properties = proplist;
93 + of_node_set_flag(np, OF_DYNAMIC);
94 ++ of_node_init(np);
95 +
96 + np->parent = derive_parent(path);
97 + if (IS_ERR(np->parent)) {
98 +diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
99 +index 1c82619eb4f7..8c390e7a525a 100644
100 +--- a/arch/s390/kernel/ptrace.c
101 ++++ b/arch/s390/kernel/ptrace.c
102 +@@ -334,9 +334,14 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)
103 + unsigned long mask = PSW_MASK_USER;
104 +
105 + mask |= is_ri_task(child) ? PSW_MASK_RI : 0;
106 +- if ((data & ~mask) != PSW_USER_BITS)
107 ++ if ((data ^ PSW_USER_BITS) & ~mask)
108 ++ /* Invalid psw mask. */
109 ++ return -EINVAL;
110 ++ if ((data & PSW_MASK_ASC) == PSW_ASC_HOME)
111 ++ /* Invalid address-space-control bits */
112 + return -EINVAL;
113 + if ((data & PSW_MASK_EA) && !(data & PSW_MASK_BA))
114 ++ /* Invalid addressing mode bits */
115 + return -EINVAL;
116 + }
117 + *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data;
118 +@@ -672,9 +677,12 @@ static int __poke_user_compat(struct task_struct *child,
119 +
120 + mask |= is_ri_task(child) ? PSW32_MASK_RI : 0;
121 + /* Build a 64 bit psw mask from 31 bit mask. */
122 +- if ((tmp & ~mask) != PSW32_USER_BITS)
123 ++ if ((tmp ^ PSW32_USER_BITS) & ~mask)
124 + /* Invalid psw mask. */
125 + return -EINVAL;
126 ++ if ((data & PSW32_MASK_ASC) == PSW32_ASC_HOME)
127 ++ /* Invalid address-space-control bits */
128 ++ return -EINVAL;
129 + regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) |
130 + (regs->psw.mask & PSW_MASK_BA) |
131 + (__u64)(tmp & mask) << 32;
132 +diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
133 +index 6491353cc9aa..c87810b1b557 100644
134 +--- a/arch/x86/kernel/entry_32.S
135 ++++ b/arch/x86/kernel/entry_32.S
136 +@@ -433,8 +433,8 @@ sysenter_do_call:
137 + cmpl $(NR_syscalls), %eax
138 + jae sysenter_badsys
139 + call *sys_call_table(,%eax,4)
140 +- movl %eax,PT_EAX(%esp)
141 + sysenter_after_call:
142 ++ movl %eax,PT_EAX(%esp)
143 + LOCKDEP_SYS_EXIT
144 + DISABLE_INTERRUPTS(CLBR_ANY)
145 + TRACE_IRQS_OFF
146 +@@ -514,6 +514,7 @@ ENTRY(system_call)
147 + jae syscall_badsys
148 + syscall_call:
149 + call *sys_call_table(,%eax,4)
150 ++syscall_after_call:
151 + movl %eax,PT_EAX(%esp) # store the return value
152 + syscall_exit:
153 + LOCKDEP_SYS_EXIT
154 +@@ -683,12 +684,12 @@ syscall_fault:
155 + END(syscall_fault)
156 +
157 + syscall_badsys:
158 +- movl $-ENOSYS,PT_EAX(%esp)
159 +- jmp syscall_exit
160 ++ movl $-ENOSYS,%eax
161 ++ jmp syscall_after_call
162 + END(syscall_badsys)
163 +
164 + sysenter_badsys:
165 +- movl $-ENOSYS,PT_EAX(%esp)
166 ++ movl $-ENOSYS,%eax
167 + jmp sysenter_after_call
168 + END(syscall_badsys)
169 + CFI_ENDPROC
170 +diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
171 +index 4224256bb215..77ed20209ca5 100644
172 +--- a/arch/xtensa/mm/init.c
173 ++++ b/arch/xtensa/mm/init.c
174 +@@ -191,7 +191,7 @@ int __init mem_reserve(unsigned long start, unsigned long end, int must_exist)
175 + return -EINVAL;
176 + }
177 +
178 +- if (it && start - it->start < bank_sz) {
179 ++ if (it && start - it->start <= bank_sz) {
180 + if (start == it->start) {
181 + if (end - it->start < bank_sz) {
182 + it->start = end;
183 +diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
184 +index 95ee425bf7c6..f1e380368372 100644
185 +--- a/block/blk-cgroup.c
186 ++++ b/block/blk-cgroup.c
187 +@@ -872,6 +872,13 @@ void blkcg_drain_queue(struct request_queue *q)
188 + {
189 + lockdep_assert_held(q->queue_lock);
190 +
191 ++ /*
192 ++ * @q could be exiting and already have destroyed all blkgs as
193 ++ * indicated by NULL root_blkg. If so, don't confuse policies.
194 ++ */
195 ++ if (!q->root_blkg)
196 ++ return;
197 ++
198 + blk_throtl_drain(q);
199 + }
200 +
201 +diff --git a/block/blk-tag.c b/block/blk-tag.c
202 +index 3f33d8672268..a185b86741e5 100644
203 +--- a/block/blk-tag.c
204 ++++ b/block/blk-tag.c
205 +@@ -27,18 +27,15 @@ struct request *blk_queue_find_tag(struct request_queue *q, int tag)
206 + EXPORT_SYMBOL(blk_queue_find_tag);
207 +
208 + /**
209 +- * __blk_free_tags - release a given set of tag maintenance info
210 ++ * blk_free_tags - release a given set of tag maintenance info
211 + * @bqt: the tag map to free
212 + *
213 +- * Tries to free the specified @bqt. Returns true if it was
214 +- * actually freed and false if there are still references using it
215 ++ * Drop the reference count on @bqt and frees it when the last reference
216 ++ * is dropped.
217 + */
218 +-static int __blk_free_tags(struct blk_queue_tag *bqt)
219 ++void blk_free_tags(struct blk_queue_tag *bqt)
220 + {
221 +- int retval;
222 +-
223 +- retval = atomic_dec_and_test(&bqt->refcnt);
224 +- if (retval) {
225 ++ if (atomic_dec_and_test(&bqt->refcnt)) {
226 + BUG_ON(find_first_bit(bqt->tag_map, bqt->max_depth) <
227 + bqt->max_depth);
228 +
229 +@@ -50,9 +47,8 @@ static int __blk_free_tags(struct blk_queue_tag *bqt)
230 +
231 + kfree(bqt);
232 + }
233 +-
234 +- return retval;
235 + }
236 ++EXPORT_SYMBOL(blk_free_tags);
237 +
238 + /**
239 + * __blk_queue_free_tags - release tag maintenance info
240 +@@ -69,28 +65,13 @@ void __blk_queue_free_tags(struct request_queue *q)
241 + if (!bqt)
242 + return;
243 +
244 +- __blk_free_tags(bqt);
245 ++ blk_free_tags(bqt);
246 +
247 + q->queue_tags = NULL;
248 + queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q);
249 + }
250 +
251 + /**
252 +- * blk_free_tags - release a given set of tag maintenance info
253 +- * @bqt: the tag map to free
254 +- *
255 +- * For externally managed @bqt frees the map. Callers of this
256 +- * function must guarantee to have released all the queues that
257 +- * might have been using this tag map.
258 +- */
259 +-void blk_free_tags(struct blk_queue_tag *bqt)
260 +-{
261 +- if (unlikely(!__blk_free_tags(bqt)))
262 +- BUG();
263 +-}
264 +-EXPORT_SYMBOL(blk_free_tags);
265 +-
266 +-/**
267 + * blk_queue_free_tags - release tag maintenance info
268 + * @q: the request queue for the device
269 + *
270 +diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
271 +index fbd5a67cb773..a0926a6094b2 100644
272 +--- a/block/compat_ioctl.c
273 ++++ b/block/compat_ioctl.c
274 +@@ -690,6 +690,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
275 + case BLKROSET:
276 + case BLKDISCARD:
277 + case BLKSECDISCARD:
278 ++ case BLKZEROOUT:
279 + /*
280 + * the ones below are implemented in blkdev_locked_ioctl,
281 + * but we call blkdev_ioctl, which gets the lock for us
282 +diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
283 +index dae5607e1115..4cd52a4541a9 100644
284 +--- a/drivers/ata/ahci.c
285 ++++ b/drivers/ata/ahci.c
286 +@@ -456,6 +456,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
287 +
288 + /* Promise */
289 + { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
290 ++ { PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */
291 +
292 + /* Asmedia */
293 + { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */
294 +diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
295 +index 18d97d5c7d90..677c0c1b03bd 100644
296 +--- a/drivers/ata/libata-core.c
297 ++++ b/drivers/ata/libata-core.c
298 +@@ -4787,6 +4787,10 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
299 + * ata_qc_new - Request an available ATA command, for queueing
300 + * @ap: target port
301 + *
302 ++ * Some ATA host controllers may implement a queue depth which is less
303 ++ * than ATA_MAX_QUEUE. So we shouldn't allocate a tag which is beyond
304 ++ * the hardware limitation.
305 ++ *
306 + * LOCKING:
307 + * None.
308 + */
309 +@@ -4794,14 +4798,15 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
310 + static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap)
311 + {
312 + struct ata_queued_cmd *qc = NULL;
313 ++ unsigned int max_queue = ap->host->n_tags;
314 + unsigned int i, tag;
315 +
316 + /* no command while frozen */
317 + if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
318 + return NULL;
319 +
320 +- for (i = 0; i < ATA_MAX_QUEUE; i++) {
321 +- tag = (i + ap->last_tag + 1) % ATA_MAX_QUEUE;
322 ++ for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) {
323 ++ tag = tag < max_queue ? tag : 0;
324 +
325 + /* the last tag is reserved for internal command. */
326 + if (tag == ATA_TAG_INTERNAL)
327 +@@ -6088,6 +6093,7 @@ void ata_host_init(struct ata_host *host, struct device *dev,
328 + {
329 + spin_lock_init(&host->lock);
330 + mutex_init(&host->eh_mutex);
331 ++ host->n_tags = ATA_MAX_QUEUE - 1;
332 + host->dev = dev;
333 + host->ops = ops;
334 + }
335 +@@ -6169,6 +6175,8 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
336 + {
337 + int i, rc;
338 +
339 ++ host->n_tags = clamp(sht->can_queue, 1, ATA_MAX_QUEUE - 1);
340 ++
341 + /* host must have been started */
342 + if (!(host->flags & ATA_HOST_STARTED)) {
343 + dev_err(host->dev, "BUG: trying to register unstarted host\n");
344 +diff --git a/drivers/base/platform.c b/drivers/base/platform.c
345 +index 5b47210889e0..cd2a7d0a56b2 100644
346 +--- a/drivers/base/platform.c
347 ++++ b/drivers/base/platform.c
348 +@@ -89,8 +89,13 @@ int platform_get_irq(struct platform_device *dev, unsigned int num)
349 + return dev->archdata.irqs[num];
350 + #else
351 + struct resource *r;
352 +- if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node)
353 +- return of_irq_get(dev->dev.of_node, num);
354 ++ if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) {
355 ++ int ret;
356 ++
357 ++ ret = of_irq_get(dev->dev.of_node, num);
358 ++ if (ret >= 0 || ret == -EPROBE_DEFER)
359 ++ return ret;
360 ++ }
361 +
362 + r = platform_get_resource(dev, IORESOURCE_IRQ, num);
363 +
364 +diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
365 +index 089e72cd37be..36e54be402df 100644
366 +--- a/drivers/block/zram/zram_drv.c
367 ++++ b/drivers/block/zram/zram_drv.c
368 +@@ -622,11 +622,18 @@ static void zram_reset_device(struct zram *zram, bool reset_capacity)
369 + memset(&zram->stats, 0, sizeof(zram->stats));
370 +
371 + zram->disksize = 0;
372 +- if (reset_capacity) {
373 ++ if (reset_capacity)
374 + set_capacity(zram->disk, 0);
375 +- revalidate_disk(zram->disk);
376 +- }
377 ++
378 + up_write(&zram->init_lock);
379 ++
380 ++ /*
381 ++ * Revalidate disk out of the init_lock to avoid lockdep splat.
382 ++ * It's okay because disk's capacity is protected by init_lock
383 ++ * so that revalidate_disk always sees up-to-date capacity.
384 ++ */
385 ++ if (reset_capacity)
386 ++ revalidate_disk(zram->disk);
387 + }
388 +
389 + static ssize_t disksize_store(struct device *dev,
390 +@@ -666,8 +673,15 @@ static ssize_t disksize_store(struct device *dev,
391 + zram->comp = comp;
392 + zram->disksize = disksize;
393 + set_capacity(zram->disk, zram->disksize >> SECTOR_SHIFT);
394 +- revalidate_disk(zram->disk);
395 + up_write(&zram->init_lock);
396 ++
397 ++ /*
398 ++ * Revalidate disk out of the init_lock to avoid lockdep splat.
399 ++ * It's okay because disk's capacity is protected by init_lock
400 ++ * so that revalidate_disk always sees up-to-date capacity.
401 ++ */
402 ++ revalidate_disk(zram->disk);
403 ++
404 + return len;
405 +
406 + out_destroy_comp:
407 +diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
408 +index 2a451b14b3cc..c4419ea1ab07 100644
409 +--- a/drivers/char/hw_random/core.c
410 ++++ b/drivers/char/hw_random/core.c
411 +@@ -68,6 +68,12 @@ static void add_early_randomness(struct hwrng *rng)
412 + unsigned char bytes[16];
413 + int bytes_read;
414 +
415 ++ /*
416 ++ * Currently only virtio-rng cannot return data during device
417 ++ * probe, and that's handled in virtio-rng.c itself. If there
418 ++ * are more such devices, this call to rng_get_data can be
419 ++ * made conditional here instead of doing it per-device.
420 ++ */
421 + bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1);
422 + if (bytes_read > 0)
423 + add_device_randomness(bytes, bytes_read);
424 +diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
425 +index 2ce0e225e58c..e4ecf99971fe 100644
426 +--- a/drivers/char/hw_random/virtio-rng.c
427 ++++ b/drivers/char/hw_random/virtio-rng.c
428 +@@ -30,6 +30,8 @@ static unsigned int data_avail;
429 + static DECLARE_COMPLETION(have_data);
430 + static bool busy;
431 +
432 ++static bool probe_done;
433 ++
434 + static void random_recv_done(struct virtqueue *vq)
435 + {
436 + /* We can get spurious callbacks, e.g. shared IRQs + virtio_pci. */
437 +@@ -56,6 +58,13 @@ static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait)
438 + {
439 + int ret;
440 +
441 ++ /*
442 ++ * Don't ask host for data till we're setup. This call can
443 ++ * happen during hwrng_register(), after commit d9e7972619.
444 ++ */
445 ++ if (unlikely(!probe_done))
446 ++ return 0;
447 ++
448 + if (!busy) {
449 + busy = true;
450 + init_completion(&have_data);
451 +@@ -110,6 +119,7 @@ static int probe_common(struct virtio_device *vdev)
452 + return err;
453 + }
454 +
455 ++ probe_done = true;
456 + return 0;
457 + }
458 +
459 +diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
460 +index d2fd98968085..03ff689229ff 100644
461 +--- a/drivers/gpu/drm/radeon/cik.c
462 ++++ b/drivers/gpu/drm/radeon/cik.c
463 +@@ -2290,6 +2290,7 @@ static void cik_tiling_mode_table_init(struct radeon_device *rdev)
464 + gb_tile_moden = 0;
465 + break;
466 + }
467 ++ rdev->config.cik.macrotile_mode_array[reg_offset] = gb_tile_moden;
468 + WREG32(GB_MACROTILE_MODE0 + (reg_offset * 4), gb_tile_moden);
469 + }
470 + } else if (num_pipe_configs == 8) {
471 +@@ -7363,6 +7364,7 @@ static inline u32 cik_get_ih_wptr(struct radeon_device *rdev)
472 + tmp = RREG32(IH_RB_CNTL);
473 + tmp |= IH_WPTR_OVERFLOW_CLEAR;
474 + WREG32(IH_RB_CNTL, tmp);
475 ++ wptr &= ~RB_OVERFLOW;
476 + }
477 + return (wptr & rdev->ih.ptr_mask);
478 + }
479 +diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
480 +index a61a9039f6f6..9da5a9506d60 100644
481 +--- a/drivers/gpu/drm/radeon/evergreen.c
482 ++++ b/drivers/gpu/drm/radeon/evergreen.c
483 +@@ -4759,6 +4759,7 @@ static u32 evergreen_get_ih_wptr(struct radeon_device *rdev)
484 + tmp = RREG32(IH_RB_CNTL);
485 + tmp |= IH_WPTR_OVERFLOW_CLEAR;
486 + WREG32(IH_RB_CNTL, tmp);
487 ++ wptr &= ~RB_OVERFLOW;
488 + }
489 + return (wptr & rdev->ih.ptr_mask);
490 + }
491 +diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
492 +index bbc189fd3ddc..7600a432d702 100644
493 +--- a/drivers/gpu/drm/radeon/r600.c
494 ++++ b/drivers/gpu/drm/radeon/r600.c
495 +@@ -3792,6 +3792,7 @@ static u32 r600_get_ih_wptr(struct radeon_device *rdev)
496 + tmp = RREG32(IH_RB_CNTL);
497 + tmp |= IH_WPTR_OVERFLOW_CLEAR;
498 + WREG32(IH_RB_CNTL, tmp);
499 ++ wptr &= ~RB_OVERFLOW;
500 + }
501 + return (wptr & rdev->ih.ptr_mask);
502 + }
503 +diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
504 +index 22a63c98ba14..70d4c7603c28 100644
505 +--- a/drivers/gpu/drm/radeon/si.c
506 ++++ b/drivers/gpu/drm/radeon/si.c
507 +@@ -6090,6 +6090,7 @@ static inline u32 si_get_ih_wptr(struct radeon_device *rdev)
508 + tmp = RREG32(IH_RB_CNTL);
509 + tmp |= IH_WPTR_OVERFLOW_CLEAR;
510 + WREG32(IH_RB_CNTL, tmp);
511 ++ wptr &= ~RB_OVERFLOW;
512 + }
513 + return (wptr & rdev->ih.ptr_mask);
514 + }
515 +diff --git a/drivers/hwmon/smsc47m192.c b/drivers/hwmon/smsc47m192.c
516 +index efee4c59239f..34b9a601ad07 100644
517 +--- a/drivers/hwmon/smsc47m192.c
518 ++++ b/drivers/hwmon/smsc47m192.c
519 +@@ -86,7 +86,7 @@ static inline u8 IN_TO_REG(unsigned long val, int n)
520 + */
521 + static inline s8 TEMP_TO_REG(int val)
522 + {
523 +- return clamp_val(SCALE(val, 1, 1000), -128000, 127000);
524 ++ return SCALE(clamp_val(val, -128000, 127000), 1, 1000);
525 + }
526 +
527 + static inline int TEMP_FROM_REG(s8 val)
528 +@@ -384,6 +384,8 @@ static ssize_t set_vrm(struct device *dev, struct device_attribute *attr,
529 + err = kstrtoul(buf, 10, &val);
530 + if (err)
531 + return err;
532 ++ if (val > 255)
533 ++ return -EINVAL;
534 +
535 + data->vrm = val;
536 + return count;
537 +diff --git a/drivers/input/input.c b/drivers/input/input.c
538 +index 1c4c0db05550..29ca0bb4f561 100644
539 +--- a/drivers/input/input.c
540 ++++ b/drivers/input/input.c
541 +@@ -257,9 +257,10 @@ static int input_handle_abs_event(struct input_dev *dev,
542 + }
543 +
544 + static int input_get_disposition(struct input_dev *dev,
545 +- unsigned int type, unsigned int code, int value)
546 ++ unsigned int type, unsigned int code, int *pval)
547 + {
548 + int disposition = INPUT_IGNORE_EVENT;
549 ++ int value = *pval;
550 +
551 + switch (type) {
552 +
553 +@@ -357,6 +358,7 @@ static int input_get_disposition(struct input_dev *dev,
554 + break;
555 + }
556 +
557 ++ *pval = value;
558 + return disposition;
559 + }
560 +
561 +@@ -365,7 +367,7 @@ static void input_handle_event(struct input_dev *dev,
562 + {
563 + int disposition;
564 +
565 +- disposition = input_get_disposition(dev, type, code, value);
566 ++ disposition = input_get_disposition(dev, type, code, &value);
567 +
568 + if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
569 + dev->event(dev, type, code, value);
570 +diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
571 +index ec772d962f06..ef9e0b8a9aa7 100644
572 +--- a/drivers/input/mouse/synaptics.c
573 ++++ b/drivers/input/mouse/synaptics.c
574 +@@ -132,7 +132,8 @@ static const struct min_max_quirk min_max_pnpid_table[] = {
575 + 1232, 5710, 1156, 4696
576 + },
577 + {
578 +- (const char * const []){"LEN0034", "LEN0036", "LEN2004", NULL},
579 ++ (const char * const []){"LEN0034", "LEN0036", "LEN2002",
580 ++ "LEN2004", NULL},
581 + 1024, 5112, 2024, 4832
582 + },
583 + {
584 +@@ -168,7 +169,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
585 + "LEN0049",
586 + "LEN2000",
587 + "LEN2001", /* Edge E431 */
588 +- "LEN2002",
589 ++ "LEN2002", /* Edge E531 */
590 + "LEN2003",
591 + "LEN2004", /* L440 */
592 + "LEN2005",
593 +diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c
594 +index 522fe00f5eee..49874e76548b 100644
595 +--- a/drivers/media/dvb-frontends/tda10071.c
596 ++++ b/drivers/media/dvb-frontends/tda10071.c
597 +@@ -668,6 +668,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
598 + struct dtv_frontend_properties *c = &fe->dtv_property_cache;
599 + int ret, i;
600 + u8 mode, rolloff, pilot, inversion, div;
601 ++ fe_modulation_t modulation;
602 +
603 + dev_dbg(&priv->i2c->dev,
604 + "%s: delivery_system=%d modulation=%d frequency=%d symbol_rate=%d inversion=%d pilot=%d rolloff=%d\n",
605 +@@ -702,10 +703,13 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
606 +
607 + switch (c->delivery_system) {
608 + case SYS_DVBS:
609 ++ modulation = QPSK;
610 + rolloff = 0;
611 + pilot = 2;
612 + break;
613 + case SYS_DVBS2:
614 ++ modulation = c->modulation;
615 ++
616 + switch (c->rolloff) {
617 + case ROLLOFF_20:
618 + rolloff = 2;
619 +@@ -750,7 +754,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
620 +
621 + for (i = 0, mode = 0xff; i < ARRAY_SIZE(TDA10071_MODCOD); i++) {
622 + if (c->delivery_system == TDA10071_MODCOD[i].delivery_system &&
623 +- c->modulation == TDA10071_MODCOD[i].modulation &&
624 ++ modulation == TDA10071_MODCOD[i].modulation &&
625 + c->fec_inner == TDA10071_MODCOD[i].fec) {
626 + mode = TDA10071_MODCOD[i].val;
627 + dev_dbg(&priv->i2c->dev, "%s: mode found=%02x\n",
628 +diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
629 +index 021e4d35e4d7..7b9b75f60774 100644
630 +--- a/drivers/media/usb/dvb-usb-v2/af9035.c
631 ++++ b/drivers/media/usb/dvb-usb-v2/af9035.c
632 +@@ -704,15 +704,41 @@ static int af9035_read_config(struct dvb_usb_device *d)
633 + if (ret < 0)
634 + goto err;
635 +
636 +- if (tmp == 0x00)
637 +- dev_dbg(&d->udev->dev,
638 +- "%s: [%d]tuner not set, using default\n",
639 +- __func__, i);
640 +- else
641 ++ dev_dbg(&d->udev->dev, "%s: [%d]tuner=%02x\n",
642 ++ __func__, i, tmp);
643 ++
644 ++ /* tuner sanity check */
645 ++ if (state->chip_type == 0x9135) {
646 ++ if (state->chip_version == 0x02) {
647 ++ /* IT9135 BX (v2) */
648 ++ switch (tmp) {
649 ++ case AF9033_TUNER_IT9135_60:
650 ++ case AF9033_TUNER_IT9135_61:
651 ++ case AF9033_TUNER_IT9135_62:
652 ++ state->af9033_config[i].tuner = tmp;
653 ++ break;
654 ++ }
655 ++ } else {
656 ++ /* IT9135 AX (v1) */
657 ++ switch (tmp) {
658 ++ case AF9033_TUNER_IT9135_38:
659 ++ case AF9033_TUNER_IT9135_51:
660 ++ case AF9033_TUNER_IT9135_52:
661 ++ state->af9033_config[i].tuner = tmp;
662 ++ break;
663 ++ }
664 ++ }
665 ++ } else {
666 ++ /* AF9035 */
667 + state->af9033_config[i].tuner = tmp;
668 ++ }
669 +
670 +- dev_dbg(&d->udev->dev, "%s: [%d]tuner=%02x\n",
671 +- __func__, i, state->af9033_config[i].tuner);
672 ++ if (state->af9033_config[i].tuner != tmp) {
673 ++ dev_info(&d->udev->dev,
674 ++ "%s: [%d] overriding tuner from %02x to %02x\n",
675 ++ KBUILD_MODNAME, i, tmp,
676 ++ state->af9033_config[i].tuner);
677 ++ }
678 +
679 + switch (state->af9033_config[i].tuner) {
680 + case AF9033_TUNER_TUA9001:
681 +diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
682 +index 0500c4175d5f..6bce01a674f9 100644
683 +--- a/drivers/media/usb/hdpvr/hdpvr-video.c
684 ++++ b/drivers/media/usb/hdpvr/hdpvr-video.c
685 +@@ -82,7 +82,7 @@ static void hdpvr_read_bulk_callback(struct urb *urb)
686 + }
687 +
688 + /*=========================================================================*/
689 +-/* bufffer bits */
690 ++/* buffer bits */
691 +
692 + /* function expects dev->io_mutex to be hold by caller */
693 + int hdpvr_cancel_queue(struct hdpvr_device *dev)
694 +@@ -926,7 +926,7 @@ static int hdpvr_s_ctrl(struct v4l2_ctrl *ctrl)
695 + case V4L2_CID_MPEG_AUDIO_ENCODING:
696 + if (dev->flags & HDPVR_FLAG_AC3_CAP) {
697 + opt->audio_codec = ctrl->val;
698 +- return hdpvr_set_audio(dev, opt->audio_input,
699 ++ return hdpvr_set_audio(dev, opt->audio_input + 1,
700 + opt->audio_codec);
701 + }
702 + return 0;
703 +@@ -1198,7 +1198,7 @@ int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent,
704 + v4l2_ctrl_new_std_menu(hdl, &hdpvr_ctrl_ops,
705 + V4L2_CID_MPEG_AUDIO_ENCODING,
706 + ac3 ? V4L2_MPEG_AUDIO_ENCODING_AC3 : V4L2_MPEG_AUDIO_ENCODING_AAC,
707 +- 0x7, V4L2_MPEG_AUDIO_ENCODING_AAC);
708 ++ 0x7, ac3 ? dev->options.audio_codec : V4L2_MPEG_AUDIO_ENCODING_AAC);
709 + v4l2_ctrl_new_std_menu(hdl, &hdpvr_ctrl_ops,
710 + V4L2_CID_MPEG_VIDEO_ENCODING,
711 + V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC, 0x3,
712 +diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c
713 +index 48b20dfcc4d0..eb3850c246a6 100644
714 +--- a/drivers/media/v4l2-core/v4l2-dv-timings.c
715 ++++ b/drivers/media/v4l2-core/v4l2-dv-timings.c
716 +@@ -599,10 +599,10 @@ struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait)
717 + aspect.denominator = 9;
718 + } else if (ratio == 34) {
719 + aspect.numerator = 4;
720 +- aspect.numerator = 3;
721 ++ aspect.denominator = 3;
722 + } else if (ratio == 68) {
723 + aspect.numerator = 15;
724 +- aspect.numerator = 9;
725 ++ aspect.denominator = 9;
726 + } else {
727 + aspect.numerator = hor_landscape + 99;
728 + aspect.denominator = 100;
729 +diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig
730 +index 2872ece81f35..44333bd8f908 100644
731 +--- a/drivers/parport/Kconfig
732 ++++ b/drivers/parport/Kconfig
733 +@@ -5,6 +5,12 @@
734 + # Parport configuration.
735 + #
736 +
737 ++config ARCH_MIGHT_HAVE_PC_PARPORT
738 ++ bool
739 ++ help
740 ++ Select this config option from the architecture Kconfig if
741 ++ the architecture might have PC parallel port hardware.
742 ++
743 + menuconfig PARPORT
744 + tristate "Parallel port support"
745 + depends on HAS_IOMEM
746 +@@ -31,12 +37,6 @@ menuconfig PARPORT
747 +
748 + If unsure, say Y.
749 +
750 +-config ARCH_MIGHT_HAVE_PC_PARPORT
751 +- bool
752 +- help
753 +- Select this config option from the architecture Kconfig if
754 +- the architecture might have PC parallel port hardware.
755 +-
756 + if PARPORT
757 +
758 + config PARPORT_PC
759 +diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
760 +index bd725b0a4341..3a364686c112 100644
761 +--- a/drivers/pinctrl/pinctrl-st.c
762 ++++ b/drivers/pinctrl/pinctrl-st.c
763 +@@ -1467,7 +1467,7 @@ static void st_gpio_irqmux_handler(unsigned irq, struct irq_desc *desc)
764 +
765 + status = readl(info->irqmux_base);
766 +
767 +- for_each_set_bit(n, &status, ST_GPIO_PINS_PER_BANK)
768 ++ for_each_set_bit(n, &status, info->nbanks)
769 + __gpio_irq_handler(&info->banks[n]);
770 +
771 + chained_irq_exit(chip, desc);
772 +diff --git a/drivers/staging/media/omap4iss/Kconfig b/drivers/staging/media/omap4iss/Kconfig
773 +index b9fe753969bd..15940f8fdd24 100644
774 +--- a/drivers/staging/media/omap4iss/Kconfig
775 ++++ b/drivers/staging/media/omap4iss/Kconfig
776 +@@ -1,6 +1,6 @@
777 + config VIDEO_OMAP4
778 + bool "OMAP 4 Camera support"
779 +- depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && I2C && ARCH_OMAP4
780 ++ depends on VIDEO_V4L2=y && VIDEO_V4L2_SUBDEV_API && I2C=y && ARCH_OMAP4
781 + select VIDEOBUF2_DMA_CONTIG
782 + ---help---
783 + Driver for an OMAP 4 ISS controller.
784 +diff --git a/fs/coredump.c b/fs/coredump.c
785 +index 0b2528fb640e..a93f7e6ea4cf 100644
786 +--- a/fs/coredump.c
787 ++++ b/fs/coredump.c
788 +@@ -306,7 +306,7 @@ static int zap_threads(struct task_struct *tsk, struct mm_struct *mm,
789 + if (unlikely(nr < 0))
790 + return nr;
791 +
792 +- tsk->flags = PF_DUMPCORE;
793 ++ tsk->flags |= PF_DUMPCORE;
794 + if (atomic_read(&mm->mm_users) == nr + 1)
795 + goto done;
796 + /*
797 +diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
798 +index e2cd799e4d21..2d9c1d071a7a 100644
799 +--- a/fs/fuse/inode.c
800 ++++ b/fs/fuse/inode.c
801 +@@ -907,9 +907,6 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
802 + fc->writeback_cache = 1;
803 + if (arg->time_gran && arg->time_gran <= 1000000000)
804 + fc->sb->s_time_gran = arg->time_gran;
805 +- else
806 +- fc->sb->s_time_gran = 1000000000;
807 +-
808 + } else {
809 + ra_pages = fc->max_read / PAGE_CACHE_SIZE;
810 + fc->no_lock = 1;
811 +@@ -938,7 +935,7 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req)
812 + FUSE_SPLICE_WRITE | FUSE_SPLICE_MOVE | FUSE_SPLICE_READ |
813 + FUSE_FLOCK_LOCKS | FUSE_IOCTL_DIR | FUSE_AUTO_INVAL_DATA |
814 + FUSE_DO_READDIRPLUS | FUSE_READDIRPLUS_AUTO | FUSE_ASYNC_DIO |
815 +- FUSE_WRITEBACK_CACHE;
816 ++ FUSE_WRITEBACK_CACHE | FUSE_NO_OPEN_SUPPORT;
817 + req->in.h.opcode = FUSE_INIT;
818 + req->in.numargs = 1;
819 + req->in.args[0].size = sizeof(*arg);
820 +diff --git a/fs/namei.c b/fs/namei.c
821 +index 985c6f368485..9eb787e5c167 100644
822 +--- a/fs/namei.c
823 ++++ b/fs/namei.c
824 +@@ -2256,9 +2256,10 @@ done:
825 + goto out;
826 + }
827 + path->dentry = dentry;
828 +- path->mnt = mntget(nd->path.mnt);
829 ++ path->mnt = nd->path.mnt;
830 + if (should_follow_link(dentry, nd->flags & LOOKUP_FOLLOW))
831 + return 1;
832 ++ mntget(path->mnt);
833 + follow_mount(path);
834 + error = 0;
835 + out:
836 +diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
837 +index 871d6eda8dba..8f854dde4150 100644
838 +--- a/fs/nfs/nfs3acl.c
839 ++++ b/fs/nfs/nfs3acl.c
840 +@@ -247,3 +247,46 @@ const struct xattr_handler *nfs3_xattr_handlers[] = {
841 + &posix_acl_default_xattr_handler,
842 + NULL,
843 + };
844 ++
845 ++static int
846 ++nfs3_list_one_acl(struct inode *inode, int type, const char *name, void *data,
847 ++ size_t size, ssize_t *result)
848 ++{
849 ++ struct posix_acl *acl;
850 ++ char *p = data + *result;
851 ++
852 ++ acl = get_acl(inode, type);
853 ++ if (!acl)
854 ++ return 0;
855 ++
856 ++ posix_acl_release(acl);
857 ++
858 ++ *result += strlen(name);
859 ++ *result += 1;
860 ++ if (!size)
861 ++ return 0;
862 ++ if (*result > size)
863 ++ return -ERANGE;
864 ++
865 ++ strcpy(p, name);
866 ++ return 0;
867 ++}
868 ++
869 ++ssize_t
870 ++nfs3_listxattr(struct dentry *dentry, char *data, size_t size)
871 ++{
872 ++ struct inode *inode = dentry->d_inode;
873 ++ ssize_t result = 0;
874 ++ int error;
875 ++
876 ++ error = nfs3_list_one_acl(inode, ACL_TYPE_ACCESS,
877 ++ POSIX_ACL_XATTR_ACCESS, data, size, &result);
878 ++ if (error)
879 ++ return error;
880 ++
881 ++ error = nfs3_list_one_acl(inode, ACL_TYPE_DEFAULT,
882 ++ POSIX_ACL_XATTR_DEFAULT, data, size, &result);
883 ++ if (error)
884 ++ return error;
885 ++ return result;
886 ++}
887 +diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
888 +index db60149c4579..0e2bb2658c94 100644
889 +--- a/fs/nfs/nfs3proc.c
890 ++++ b/fs/nfs/nfs3proc.c
891 +@@ -891,7 +891,7 @@ static const struct inode_operations nfs3_dir_inode_operations = {
892 + .getattr = nfs_getattr,
893 + .setattr = nfs_setattr,
894 + #ifdef CONFIG_NFS_V3_ACL
895 +- .listxattr = generic_listxattr,
896 ++ .listxattr = nfs3_listxattr,
897 + .getxattr = generic_getxattr,
898 + .setxattr = generic_setxattr,
899 + .removexattr = generic_removexattr,
900 +@@ -905,7 +905,7 @@ static const struct inode_operations nfs3_file_inode_operations = {
901 + .getattr = nfs_getattr,
902 + .setattr = nfs_setattr,
903 + #ifdef CONFIG_NFS_V3_ACL
904 +- .listxattr = generic_listxattr,
905 ++ .listxattr = nfs3_listxattr,
906 + .getxattr = generic_getxattr,
907 + .setxattr = generic_setxattr,
908 + .removexattr = generic_removexattr,
909 +diff --git a/include/linux/libata.h b/include/linux/libata.h
910 +index 5ab4e3a76721..92abb497ab14 100644
911 +--- a/include/linux/libata.h
912 ++++ b/include/linux/libata.h
913 +@@ -593,6 +593,7 @@ struct ata_host {
914 + struct device *dev;
915 + void __iomem * const *iomap;
916 + unsigned int n_ports;
917 ++ unsigned int n_tags; /* nr of NCQ tags */
918 + void *private_data;
919 + struct ata_port_operations *ops;
920 + unsigned long flags;
921 +diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
922 +index 40b5ca8a1b1f..25084a052a1e 100644
923 +--- a/include/uapi/linux/fuse.h
924 ++++ b/include/uapi/linux/fuse.h
925 +@@ -101,6 +101,7 @@
926 + * - add FATTR_CTIME
927 + * - add ctime and ctimensec to fuse_setattr_in
928 + * - add FUSE_RENAME2 request
929 ++ * - add FUSE_NO_OPEN_SUPPORT flag
930 + */
931 +
932 + #ifndef _LINUX_FUSE_H
933 +@@ -229,6 +230,7 @@ struct fuse_file_lock {
934 + * FUSE_READDIRPLUS_AUTO: adaptive readdirplus
935 + * FUSE_ASYNC_DIO: asynchronous direct I/O submission
936 + * FUSE_WRITEBACK_CACHE: use writeback cache for buffered writes
937 ++ * FUSE_NO_OPEN_SUPPORT: kernel supports zero-message opens
938 + */
939 + #define FUSE_ASYNC_READ (1 << 0)
940 + #define FUSE_POSIX_LOCKS (1 << 1)
941 +@@ -247,6 +249,7 @@ struct fuse_file_lock {
942 + #define FUSE_READDIRPLUS_AUTO (1 << 14)
943 + #define FUSE_ASYNC_DIO (1 << 15)
944 + #define FUSE_WRITEBACK_CACHE (1 << 16)
945 ++#define FUSE_NO_OPEN_SUPPORT (1 << 17)
946 +
947 + /**
948 + * CUSE INIT request/reply flags
949 +diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
950 +index 4dcbf7dc3c51..e1baa92f8013 100644
951 +--- a/kernel/trace/trace.c
952 ++++ b/kernel/trace/trace.c
953 +@@ -823,7 +823,7 @@ static struct {
954 + { trace_clock_local, "local", 1 },
955 + { trace_clock_global, "global", 1 },
956 + { trace_clock_counter, "counter", 0 },
957 +- { trace_clock_jiffies, "uptime", 1 },
958 ++ { trace_clock_jiffies, "uptime", 0 },
959 + { trace_clock, "perf", 1 },
960 + ARCH_TRACE_CLOCKS
961 + };
962 +diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
963 +index 26dc348332b7..57b67b1f24d1 100644
964 +--- a/kernel/trace/trace_clock.c
965 ++++ b/kernel/trace/trace_clock.c
966 +@@ -59,13 +59,14 @@ u64 notrace trace_clock(void)
967 +
968 + /*
969 + * trace_jiffy_clock(): Simply use jiffies as a clock counter.
970 ++ * Note that this use of jiffies_64 is not completely safe on
971 ++ * 32-bit systems. But the window is tiny, and the effect if
972 ++ * we are affected is that we will have an obviously bogus
973 ++ * timestamp on a trace event - i.e. not life threatening.
974 + */
975 + u64 notrace trace_clock_jiffies(void)
976 + {
977 +- u64 jiffy = jiffies - INITIAL_JIFFIES;
978 +-
979 +- /* Return nsecs */
980 +- return (u64)jiffies_to_usecs(jiffy) * 1000ULL;
981 ++ return jiffies_64_to_clock_t(jiffies_64 - INITIAL_JIFFIES);
982 + }
983 +
984 + /*
985 +diff --git a/mm/hugetlb.c b/mm/hugetlb.c
986 +index a646f1598d58..002f08e3d61c 100644
987 +--- a/mm/hugetlb.c
988 ++++ b/mm/hugetlb.c
989 +@@ -2461,6 +2461,7 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
990 + } else {
991 + if (cow)
992 + huge_ptep_set_wrprotect(src, addr, src_pte);
993 ++ entry = huge_ptep_get(src_pte);
994 + ptepage = pte_page(entry);
995 + get_page(ptepage);
996 + page_dup_rmap(ptepage);
997 +diff --git a/mm/memory.c b/mm/memory.c
998 +index e302ae1dcce0..4f9e53024b24 100644
999 +--- a/mm/memory.c
1000 ++++ b/mm/memory.c
1001 +@@ -3515,7 +3515,7 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma,
1002 + * if page by the offset is not ready to be mapped (cold cache or
1003 + * something).
1004 + */
1005 +- if (vma->vm_ops->map_pages) {
1006 ++ if (vma->vm_ops->map_pages && !(flags & FAULT_FLAG_NONLINEAR)) {
1007 + pte = pte_offset_map_lock(mm, pmd, address, &ptl);
1008 + do_fault_around(vma, address, pte, pgoff, flags);
1009 + if (!pte_same(*pte, orig_pte))
1010 +diff --git a/mm/slab_common.c b/mm/slab_common.c
1011 +index 102cc6fca3d3..b810fba0095d 100644
1012 +--- a/mm/slab_common.c
1013 ++++ b/mm/slab_common.c
1014 +@@ -55,7 +55,7 @@ static int kmem_cache_sanity_check(const char *name, size_t size)
1015 + continue;
1016 + }
1017 +
1018 +-#if !defined(CONFIG_SLUB) || !defined(CONFIG_SLUB_DEBUG_ON)
1019 ++#if !defined(CONFIG_SLUB)
1020 + if (!strcmp(s->name, name)) {
1021 + pr_err("%s (%s): Cache name already exists.\n",
1022 + __func__, name);
1023 +diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
1024 +index 052c1bf8ffac..8060b28dcef6 100644
1025 +--- a/net/wireless/nl80211.c
1026 ++++ b/net/wireless/nl80211.c
1027 +@@ -1470,18 +1470,17 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
1028 + }
1029 + CMD(start_p2p_device, START_P2P_DEVICE);
1030 + CMD(set_mcast_rate, SET_MCAST_RATE);
1031 ++#ifdef CONFIG_NL80211_TESTMODE
1032 ++ CMD(testmode_cmd, TESTMODE);
1033 ++#endif
1034 + if (state->split) {
1035 + CMD(crit_proto_start, CRIT_PROTOCOL_START);
1036 + CMD(crit_proto_stop, CRIT_PROTOCOL_STOP);
1037 + if (dev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH)
1038 + CMD(channel_switch, CHANNEL_SWITCH);
1039 ++ CMD(set_qos_map, SET_QOS_MAP);
1040 + }
1041 +- CMD(set_qos_map, SET_QOS_MAP);
1042 +-
1043 +-#ifdef CONFIG_NL80211_TESTMODE
1044 +- CMD(testmode_cmd, TESTMODE);
1045 +-#endif
1046 +-
1047 ++ /* add into the if now */
1048 + #undef CMD
1049 +
1050 + if (dev->ops->connect || dev->ops->auth) {