Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.4 commit in: /
Date: Tue, 05 May 2020 17:37:40
Message-Id: 1588700236.842a300d1a91309aa52cc94b961324e72a91e106.mpagano@gentoo
1 commit: 842a300d1a91309aa52cc94b961324e72a91e106
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 5 17:37:16 2020 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Tue May 5 17:37:16 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=842a300d
7
8 Linux patch 4.4.222
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1221_linux-4.4.222.patch | 536 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 540 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 0853ee6..80253f1 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -927,6 +927,10 @@ Patch: 1220_linux-4.4.221.patch
21 From: http://www.kernel.org
22 Desc: Linux 4.4.221
23
24 +Patch: 1221_linux-4.4.222.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 4.4.222
27 +
28 Patch: 1500_XATTR_USER_PREFIX.patch
29 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
30 Desc: Support for namespace user.pax.* on tmpfs.
31
32 diff --git a/1221_linux-4.4.222.patch b/1221_linux-4.4.222.patch
33 new file mode 100644
34 index 0000000..6c96b52
35 --- /dev/null
36 +++ b/1221_linux-4.4.222.patch
37 @@ -0,0 +1,536 @@
38 +diff --git a/Makefile b/Makefile
39 +index ea97d0869c89..03f34df673d9 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,6 +1,6 @@
43 + VERSION = 4
44 + PATCHLEVEL = 4
45 +-SUBLEVEL = 221
46 ++SUBLEVEL = 222
47 + EXTRAVERSION =
48 + NAME = Blurry Fish Butt
49 +
50 +diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c
51 +index 7d5e295255b7..9958ba8bf0d2 100644
52 +--- a/arch/powerpc/perf/power8-pmu.c
53 ++++ b/arch/powerpc/perf/power8-pmu.c
54 +@@ -816,7 +816,7 @@ static struct power_pmu power8_pmu = {
55 + .get_constraint = power8_get_constraint,
56 + .get_alternatives = power8_get_alternatives,
57 + .disable_pmc = power8_disable_pmc,
58 +- .flags = PPMU_HAS_SSLOT | PPMU_HAS_SIER | PPMU_ARCH_207S,
59 ++ .flags = PPMU_HAS_SIER | PPMU_ARCH_207S,
60 + .n_generic = ARRAY_SIZE(power8_generic_events),
61 + .generic_events = power8_generic_events,
62 + .cache_events = &power8_cache_events,
63 +diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
64 +index 3572434a73cb..f65f74163ff7 100644
65 +--- a/arch/x86/kernel/cpu/perf_event_intel.c
66 ++++ b/arch/x86/kernel/cpu/perf_event_intel.c
67 +@@ -1937,7 +1937,8 @@ intel_bts_constraints(struct perf_event *event)
68 +
69 + static int intel_alt_er(int idx, u64 config)
70 + {
71 +- int alt_idx;
72 ++ int alt_idx = idx;
73 ++
74 + if (!(x86_pmu.flags & PMU_FL_HAS_RSP_1))
75 + return idx;
76 +
77 +diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
78 +index 829b20a3bb0a..4c3d24de9f8b 100644
79 +--- a/drivers/acpi/device_pm.c
80 ++++ b/drivers/acpi/device_pm.c
81 +@@ -225,13 +225,13 @@ int acpi_device_set_power(struct acpi_device *device, int state)
82 + end:
83 + if (result) {
84 + dev_warn(&device->dev, "Failed to change power state to %s\n",
85 +- acpi_power_state_string(state));
86 ++ acpi_power_state_string(target_state));
87 + } else {
88 + device->power.state = target_state;
89 + ACPI_DEBUG_PRINT((ACPI_DB_INFO,
90 + "Device [%s] transitioned to %s\n",
91 + device->pnp.bus_id,
92 +- acpi_power_state_string(state)));
93 ++ acpi_power_state_string(target_state)));
94 + }
95 +
96 + return result;
97 +diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
98 +index 884aecebb249..79c131746caa 100644
99 +--- a/drivers/dma/dmatest.c
100 ++++ b/drivers/dma/dmatest.c
101 +@@ -491,8 +491,8 @@ static int dmatest_func(void *data)
102 + flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT;
103 +
104 + ktime = ktime_get();
105 +- while (!kthread_should_stop()
106 +- && !(params->iterations && total_tests >= params->iterations)) {
107 ++ while (!(kthread_should_stop() ||
108 ++ (params->iterations && total_tests >= params->iterations))) {
109 + struct dma_async_tx_descriptor *tx = NULL;
110 + struct dmaengine_unmap_data *um;
111 + dma_addr_t srcs[src_cnt];
112 +diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
113 +index fdc1833b1af8..d8066ac1e764 100644
114 +--- a/drivers/gpu/drm/qxl/qxl_cmd.c
115 ++++ b/drivers/gpu/drm/qxl/qxl_cmd.c
116 +@@ -500,9 +500,10 @@ int qxl_hw_surface_alloc(struct qxl_device *qdev,
117 + return ret;
118 +
119 + ret = qxl_release_reserve_list(release, true);
120 +- if (ret)
121 ++ if (ret) {
122 ++ qxl_release_free(qdev, release);
123 + return ret;
124 +-
125 ++ }
126 + cmd = (struct qxl_surface_cmd *)qxl_release_map(qdev, release);
127 + cmd->type = QXL_SURFACE_CMD_CREATE;
128 + cmd->flags = QXL_SURF_FLAG_KEEP_DATA;
129 +diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c
130 +index de7fbbb374cd..914994c232ad 100644
131 +--- a/drivers/i2c/busses/i2c-designware-core.c
132 ++++ b/drivers/i2c/busses/i2c-designware-core.c
133 +@@ -865,7 +865,8 @@ int i2c_dw_probe(struct dw_i2c_dev *dev)
134 + i2c_set_adapdata(adap, dev);
135 +
136 + i2c_dw_disable_int(dev);
137 +- r = devm_request_irq(dev->dev, dev->irq, i2c_dw_isr, IRQF_SHARED,
138 ++ r = devm_request_irq(dev->dev, dev->irq, i2c_dw_isr,
139 ++ IRQF_SHARED | IRQF_COND_SUSPEND,
140 + dev_name(dev->dev), dev);
141 + if (r) {
142 + dev_err(dev->dev, "failure requesting irq %i: %d\n",
143 +diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
144 +index 6968154a073e..ac9f173c4311 100644
145 +--- a/drivers/infiniband/hw/mlx4/main.c
146 ++++ b/drivers/infiniband/hw/mlx4/main.c
147 +@@ -1435,8 +1435,9 @@ static int __mlx4_ib_create_default_rules(
148 + int i;
149 +
150 + for (i = 0; i < ARRAY_SIZE(pdefault_rules->rules_create_list); i++) {
151 ++ union ib_flow_spec ib_spec = {};
152 + int ret;
153 +- union ib_flow_spec ib_spec;
154 ++
155 + switch (pdefault_rules->rules_create_list[i]) {
156 + case 0:
157 + /* no rule */
158 +diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c b/drivers/media/platform/exynos4-is/fimc-isp-video.c
159 +index 4b7803cec37f..6297b32eab31 100644
160 +--- a/drivers/media/platform/exynos4-is/fimc-isp-video.c
161 ++++ b/drivers/media/platform/exynos4-is/fimc-isp-video.c
162 +@@ -221,8 +221,8 @@ static void isp_video_capture_buffer_queue(struct vb2_buffer *vb)
163 + ivb->dma_addr[i];
164 +
165 + isp_dbg(2, &video->ve.vdev,
166 +- "dma_buf %pad (%d/%d/%d) addr: %pad\n",
167 +- &buf_index, ivb->index, i, vb->index,
168 ++ "dma_buf %d (%d/%d/%d) addr: %pad\n",
169 ++ buf_index, ivb->index, i, vb->index,
170 + &ivb->dma_addr[i]);
171 + }
172 +
173 +diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
174 +index 875634d0d020..d394911ec0c9 100644
175 +--- a/drivers/vfio/vfio_iommu_type1.c
176 ++++ b/drivers/vfio/vfio_iommu_type1.c
177 +@@ -227,8 +227,8 @@ static int vaddr_get_pfn(unsigned long vaddr, int prot, unsigned long *pfn)
178 + vma = find_vma_intersection(current->mm, vaddr, vaddr + 1);
179 +
180 + if (vma && vma->vm_flags & VM_PFNMAP) {
181 +- *pfn = ((vaddr - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
182 +- if (is_invalid_reserved_pfn(*pfn))
183 ++ if (!follow_pfn(vma, vaddr, pfn) &&
184 ++ is_invalid_reserved_pfn(*pfn))
185 + ret = 0;
186 + }
187 +
188 +diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
189 +index 805d38a14002..8e7997010ba1 100644
190 +--- a/fs/ext4/inode.c
191 ++++ b/fs/ext4/inode.c
192 +@@ -4233,7 +4233,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
193 + uid_t i_uid;
194 + gid_t i_gid;
195 +
196 +- if (((flags & EXT4_IGET_NORMAL) &&
197 ++ if ((!(flags & EXT4_IGET_SPECIAL) &&
198 + (ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO)) ||
199 + (ino < EXT4_ROOT_INO) ||
200 + (ino > le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count))) {
201 +diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
202 +index 1ebe2fc7cda2..05c697d5b477 100644
203 +--- a/fs/nfs/nfs3acl.c
204 ++++ b/fs/nfs/nfs3acl.c
205 +@@ -213,37 +213,45 @@ int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
206 +
207 + int nfs3_set_acl(struct inode *inode, struct posix_acl *acl, int type)
208 + {
209 +- struct posix_acl *alloc = NULL, *dfacl = NULL;
210 ++ struct posix_acl *orig = acl, *dfacl = NULL, *alloc;
211 + int status;
212 +
213 + if (S_ISDIR(inode->i_mode)) {
214 + switch(type) {
215 + case ACL_TYPE_ACCESS:
216 +- alloc = dfacl = get_acl(inode, ACL_TYPE_DEFAULT);
217 ++ alloc = get_acl(inode, ACL_TYPE_DEFAULT);
218 + if (IS_ERR(alloc))
219 + goto fail;
220 ++ dfacl = alloc;
221 + break;
222 +
223 + case ACL_TYPE_DEFAULT:
224 +- dfacl = acl;
225 +- alloc = acl = get_acl(inode, ACL_TYPE_ACCESS);
226 ++ alloc = get_acl(inode, ACL_TYPE_ACCESS);
227 + if (IS_ERR(alloc))
228 + goto fail;
229 ++ dfacl = acl;
230 ++ acl = alloc;
231 + break;
232 + }
233 + }
234 +
235 + if (acl == NULL) {
236 +- alloc = acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
237 ++ alloc = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
238 + if (IS_ERR(alloc))
239 + goto fail;
240 ++ acl = alloc;
241 + }
242 + status = __nfs3_proc_setacls(inode, acl, dfacl);
243 +- posix_acl_release(alloc);
244 ++out:
245 ++ if (acl != orig)
246 ++ posix_acl_release(acl);
247 ++ if (dfacl != orig)
248 ++ posix_acl_release(dfacl);
249 + return status;
250 +
251 + fail:
252 +- return PTR_ERR(alloc);
253 ++ status = PTR_ERR(alloc);
254 ++ goto out;
255 + }
256 +
257 + const struct xattr_handler *nfs3_xattr_handlers[] = {
258 +diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
259 +index 55953c5804c3..86c75e97cfec 100644
260 +--- a/net/ipv6/raw.c
261 ++++ b/net/ipv6/raw.c
262 +@@ -757,6 +757,7 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
263 + int hlimit = -1;
264 + int tclass = -1;
265 + int dontfrag = -1;
266 ++ int hdrincl;
267 + u16 proto;
268 + int err;
269 +
270 +@@ -770,6 +771,13 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
271 + if (msg->msg_flags & MSG_OOB)
272 + return -EOPNOTSUPP;
273 +
274 ++ /* hdrincl should be READ_ONCE(inet->hdrincl)
275 ++ * but READ_ONCE() doesn't work with bit fields.
276 ++ * Doing this indirectly yields the same result.
277 ++ */
278 ++ hdrincl = inet->hdrincl;
279 ++ hdrincl = READ_ONCE(hdrincl);
280 ++
281 + /*
282 + * Get and verify the address.
283 + */
284 +@@ -878,7 +886,7 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
285 + fl6.flowi6_oif = np->ucast_oif;
286 + security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
287 +
288 +- if (inet->hdrincl)
289 ++ if (hdrincl)
290 + fl6.flowi6_flags |= FLOWI_FLAG_KNOWN_NH;
291 +
292 + dst = ip6_dst_lookup_flow(sk, &fl6, final_p);
293 +@@ -899,7 +907,7 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
294 + goto do_confirm;
295 +
296 + back_from_confirm:
297 +- if (inet->hdrincl)
298 ++ if (hdrincl)
299 + err = rawv6_send_hdrinc(sk, msg, len, &fl6, &dst, msg->msg_flags);
300 + else {
301 + lock_sock(sk);
302 +diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
303 +index ab2759d88bc6..055bf769408e 100644
304 +--- a/security/selinux/hooks.c
305 ++++ b/security/selinux/hooks.c
306 +@@ -4791,38 +4791,59 @@ static int selinux_tun_dev_open(void *security)
307 +
308 + static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb)
309 + {
310 +- int err = 0;
311 +- u32 perm;
312 ++ int rc = 0;
313 ++ unsigned int msg_len;
314 ++ unsigned int data_len = skb->len;
315 ++ unsigned char *data = skb->data;
316 + struct nlmsghdr *nlh;
317 + struct sk_security_struct *sksec = sk->sk_security;
318 ++ u16 sclass = sksec->sclass;
319 ++ u32 perm;
320 +
321 +- if (skb->len < NLMSG_HDRLEN) {
322 +- err = -EINVAL;
323 +- goto out;
324 +- }
325 +- nlh = nlmsg_hdr(skb);
326 ++ while (data_len >= nlmsg_total_size(0)) {
327 ++ nlh = (struct nlmsghdr *)data;
328 +
329 +- err = selinux_nlmsg_lookup(sksec->sclass, nlh->nlmsg_type, &perm);
330 +- if (err) {
331 +- if (err == -EINVAL) {
332 +- printk(KERN_WARNING
333 +- "SELinux: unrecognized netlink message:"
334 +- " protocol=%hu nlmsg_type=%hu sclass=%s\n",
335 +- sk->sk_protocol, nlh->nlmsg_type,
336 +- secclass_map[sksec->sclass - 1].name);
337 +- if (!selinux_enforcing || security_get_allow_unknown())
338 +- err = 0;
339 ++ /* NOTE: the nlmsg_len field isn't reliably set by some netlink
340 ++ * users which means we can't reject skb's with bogus
341 ++ * length fields; our solution is to follow what
342 ++ * netlink_rcv_skb() does and simply skip processing at
343 ++ * messages with length fields that are clearly junk
344 ++ */
345 ++ if (nlh->nlmsg_len < NLMSG_HDRLEN || nlh->nlmsg_len > data_len)
346 ++ return 0;
347 ++
348 ++ rc = selinux_nlmsg_lookup(sclass, nlh->nlmsg_type, &perm);
349 ++ if (rc == 0) {
350 ++ rc = sock_has_perm(current, sk, perm);
351 ++ if (rc)
352 ++ return rc;
353 ++ } else if (rc == -EINVAL) {
354 ++ /* -EINVAL is a missing msg/perm mapping */
355 ++ pr_warn_ratelimited("SELinux: unrecognized netlink"
356 ++ " message: protocol=%hu nlmsg_type=%hu sclass=%s"
357 ++ " pid=%d comm=%s\n",
358 ++ sk->sk_protocol, nlh->nlmsg_type,
359 ++ secclass_map[sclass - 1].name,
360 ++ task_pid_nr(current), current->comm);
361 ++ if (selinux_enforcing && !security_get_allow_unknown())
362 ++ return rc;
363 ++ rc = 0;
364 ++ } else if (rc == -ENOENT) {
365 ++ /* -ENOENT is a missing socket/class mapping, ignore */
366 ++ rc = 0;
367 ++ } else {
368 ++ return rc;
369 + }
370 +
371 +- /* Ignore */
372 +- if (err == -ENOENT)
373 +- err = 0;
374 +- goto out;
375 ++ /* move to the next message after applying netlink padding */
376 ++ msg_len = NLMSG_ALIGN(nlh->nlmsg_len);
377 ++ if (msg_len >= data_len)
378 ++ return 0;
379 ++ data_len -= msg_len;
380 ++ data += msg_len;
381 + }
382 +
383 +- err = sock_has_perm(current, sk, perm);
384 +-out:
385 +- return err;
386 ++ return rc;
387 + }
388 +
389 + #ifdef CONFIG_NETFILTER
390 +diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
391 +index 7c5d124d538c..6a7cbad90222 100644
392 +--- a/sound/core/oss/pcm_plugin.c
393 ++++ b/sound/core/oss/pcm_plugin.c
394 +@@ -211,21 +211,23 @@ static snd_pcm_sframes_t plug_client_size(struct snd_pcm_substream *plug,
395 + if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
396 + plugin = snd_pcm_plug_last(plug);
397 + while (plugin && drv_frames > 0) {
398 +- if (check_size && drv_frames > plugin->buf_frames)
399 +- drv_frames = plugin->buf_frames;
400 + plugin_prev = plugin->prev;
401 + if (plugin->src_frames)
402 + drv_frames = plugin->src_frames(plugin, drv_frames);
403 ++ if (check_size && plugin->buf_frames &&
404 ++ drv_frames > plugin->buf_frames)
405 ++ drv_frames = plugin->buf_frames;
406 + plugin = plugin_prev;
407 + }
408 + } else if (stream == SNDRV_PCM_STREAM_CAPTURE) {
409 + plugin = snd_pcm_plug_first(plug);
410 + while (plugin && drv_frames > 0) {
411 + plugin_next = plugin->next;
412 ++ if (check_size && plugin->buf_frames &&
413 ++ drv_frames > plugin->buf_frames)
414 ++ drv_frames = plugin->buf_frames;
415 + if (plugin->dst_frames)
416 + drv_frames = plugin->dst_frames(plugin, drv_frames);
417 +- if (check_size && drv_frames > plugin->buf_frames)
418 +- drv_frames = plugin->buf_frames;
419 + plugin = plugin_next;
420 + }
421 + } else
422 +@@ -251,26 +253,28 @@ static snd_pcm_sframes_t plug_slave_size(struct snd_pcm_substream *plug,
423 + plugin = snd_pcm_plug_first(plug);
424 + while (plugin && frames > 0) {
425 + plugin_next = plugin->next;
426 ++ if (check_size && plugin->buf_frames &&
427 ++ frames > plugin->buf_frames)
428 ++ frames = plugin->buf_frames;
429 + if (plugin->dst_frames) {
430 + frames = plugin->dst_frames(plugin, frames);
431 + if (frames < 0)
432 + return frames;
433 + }
434 +- if (check_size && frames > plugin->buf_frames)
435 +- frames = plugin->buf_frames;
436 + plugin = plugin_next;
437 + }
438 + } else if (stream == SNDRV_PCM_STREAM_CAPTURE) {
439 + plugin = snd_pcm_plug_last(plug);
440 + while (plugin) {
441 +- if (check_size && frames > plugin->buf_frames)
442 +- frames = plugin->buf_frames;
443 + plugin_prev = plugin->prev;
444 + if (plugin->src_frames) {
445 + frames = plugin->src_frames(plugin, frames);
446 + if (frames < 0)
447 + return frames;
448 + }
449 ++ if (check_size && plugin->buf_frames &&
450 ++ frames > plugin->buf_frames)
451 ++ frames = plugin->buf_frames;
452 + plugin = plugin_prev;
453 + }
454 + } else
455 +diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
456 +index 3a9067db1a84..7fbac24607bc 100644
457 +--- a/sound/isa/opti9xx/miro.c
458 ++++ b/sound/isa/opti9xx/miro.c
459 +@@ -875,10 +875,13 @@ static void snd_miro_write(struct snd_miro *chip, unsigned char reg,
460 + spin_unlock_irqrestore(&chip->lock, flags);
461 + }
462 +
463 ++static inline void snd_miro_write_mask(struct snd_miro *chip,
464 ++ unsigned char reg, unsigned char value, unsigned char mask)
465 ++{
466 ++ unsigned char oldval = snd_miro_read(chip, reg);
467 +
468 +-#define snd_miro_write_mask(chip, reg, value, mask) \
469 +- snd_miro_write(chip, reg, \
470 +- (snd_miro_read(chip, reg) & ~(mask)) | ((value) & (mask)))
471 ++ snd_miro_write(chip, reg, (oldval & ~mask) | (value & mask));
472 ++}
473 +
474 + /*
475 + * Proc Interface
476 +diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
477 +index 0a5266003786..6777ae84b59e 100644
478 +--- a/sound/isa/opti9xx/opti92x-ad1848.c
479 ++++ b/sound/isa/opti9xx/opti92x-ad1848.c
480 +@@ -327,10 +327,13 @@ static void snd_opti9xx_write(struct snd_opti9xx *chip, unsigned char reg,
481 + }
482 +
483 +
484 +-#define snd_opti9xx_write_mask(chip, reg, value, mask) \
485 +- snd_opti9xx_write(chip, reg, \
486 +- (snd_opti9xx_read(chip, reg) & ~(mask)) | ((value) & (mask)))
487 ++static inline void snd_opti9xx_write_mask(struct snd_opti9xx *chip,
488 ++ unsigned char reg, unsigned char value, unsigned char mask)
489 ++{
490 ++ unsigned char oldval = snd_opti9xx_read(chip, reg);
491 +
492 ++ snd_opti9xx_write(chip, reg, (oldval & ~mask) | (value & mask));
493 ++}
494 +
495 + static int snd_opti9xx_configure(struct snd_opti9xx *chip,
496 + long port,
497 +diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
498 +index 5380798883b5..10f6401e15c1 100644
499 +--- a/sound/soc/codecs/wm8960.c
500 ++++ b/sound/soc/codecs/wm8960.c
501 +@@ -631,29 +631,31 @@ static int wm8960_configure_clocking(struct snd_soc_codec *codec)
502 + return -EINVAL;
503 + }
504 +
505 +- /* check if the sysclk frequency is available. */
506 +- for (i = 0; i < ARRAY_SIZE(sysclk_divs); ++i) {
507 +- if (sysclk_divs[i] == -1)
508 +- continue;
509 +- sysclk = freq_out / sysclk_divs[i];
510 +- for (j = 0; j < ARRAY_SIZE(dac_divs); ++j) {
511 +- if (sysclk == dac_divs[j] * lrclk) {
512 ++ if (wm8960->clk_id != WM8960_SYSCLK_PLL) {
513 ++ /* check if the sysclk frequency is available. */
514 ++ for (i = 0; i < ARRAY_SIZE(sysclk_divs); ++i) {
515 ++ if (sysclk_divs[i] == -1)
516 ++ continue;
517 ++ sysclk = freq_out / sysclk_divs[i];
518 ++ for (j = 0; j < ARRAY_SIZE(dac_divs); ++j) {
519 ++ if (sysclk != dac_divs[j] * lrclk)
520 ++ continue;
521 + for (k = 0; k < ARRAY_SIZE(bclk_divs); ++k)
522 + if (sysclk == bclk * bclk_divs[k] / 10)
523 + break;
524 + if (k != ARRAY_SIZE(bclk_divs))
525 + break;
526 + }
527 ++ if (j != ARRAY_SIZE(dac_divs))
528 ++ break;
529 + }
530 +- if (j != ARRAY_SIZE(dac_divs))
531 +- break;
532 +- }
533 +
534 +- if (i != ARRAY_SIZE(sysclk_divs)) {
535 +- goto configure_clock;
536 +- } else if (wm8960->clk_id != WM8960_SYSCLK_AUTO) {
537 +- dev_err(codec->dev, "failed to configure clock\n");
538 +- return -EINVAL;
539 ++ if (i != ARRAY_SIZE(sysclk_divs)) {
540 ++ goto configure_clock;
541 ++ } else if (wm8960->clk_id != WM8960_SYSCLK_AUTO) {
542 ++ dev_err(codec->dev, "failed to configure clock\n");
543 ++ return -EINVAL;
544 ++ }
545 + }
546 + /* get a available pll out frequency and set pll */
547 + for (i = 0; i < ARRAY_SIZE(sysclk_divs); ++i) {
548 +diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c
549 +index a407e833c612..fb896b2c9ba3 100644
550 +--- a/sound/soc/fsl/imx-spdif.c
551 ++++ b/sound/soc/fsl/imx-spdif.c
552 +@@ -72,8 +72,6 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
553 + goto end;
554 + }
555 +
556 +- platform_set_drvdata(pdev, data);
557 +-
558 + end:
559 + of_node_put(spdif_np);
560 +
561 +diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
562 +index 97ebd1d3646d..9f1db4a69e80 100644
563 +--- a/tools/perf/util/hist.c
564 ++++ b/tools/perf/util/hist.c
565 +@@ -131,6 +131,8 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h)
566 + symlen = unresolved_col_width + 4 + 2;
567 + hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL,
568 + symlen);
569 ++ hists__new_col_len(hists, HISTC_MEM_DCACHELINE,
570 ++ symlen);
571 + }
572 +
573 + if (h->mem_info->iaddr.sym) {