1 |
commit: 7b102a4aca0c94e96a635cb87635fd14908b1aa3 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 8 17:55:20 2022 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 8 17:55:20 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=7b102a4a |
7 |
|
8 |
Linuxpatch 5.4.178 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1177_linux-5.4.178.patch | 1218 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 1222 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index d82773a6..0633c4d5 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -751,6 +751,10 @@ Patch: 1176_linux-5.4.177.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 5.4.177 |
23 |
|
24 |
+Patch: 1177_linux-5.4.178.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 5.4.178 |
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/1177_linux-5.4.178.patch b/1177_linux-5.4.178.patch |
33 |
new file mode 100644 |
34 |
index 00000000..078c0523 |
35 |
--- /dev/null |
36 |
+++ b/1177_linux-5.4.178.patch |
37 |
@@ -0,0 +1,1218 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 324939b64d7b7..6d33284664fef 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 5 |
45 |
+ PATCHLEVEL = 4 |
46 |
+-SUBLEVEL = 177 |
47 |
++SUBLEVEL = 178 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Kleptomaniac Octopus |
50 |
+ |
51 |
+diff --git a/block/bio-integrity.c b/block/bio-integrity.c |
52 |
+index c9dc2b17ce251..ec295be93ca0d 100644 |
53 |
+--- a/block/bio-integrity.c |
54 |
++++ b/block/bio-integrity.c |
55 |
+@@ -380,7 +380,7 @@ void bio_integrity_advance(struct bio *bio, unsigned int bytes_done) |
56 |
+ struct blk_integrity *bi = blk_get_integrity(bio->bi_disk); |
57 |
+ unsigned bytes = bio_integrity_bytes(bi, bytes_done >> 9); |
58 |
+ |
59 |
+- bip->bip_iter.bi_sector += bytes_done >> 9; |
60 |
++ bip->bip_iter.bi_sector += bio_integrity_intervals(bi, bytes_done >> 9); |
61 |
+ bvec_iter_advance(bip->bip_vec, &bip->bip_iter, bytes); |
62 |
+ } |
63 |
+ |
64 |
+diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c |
65 |
+index 0be3d1b17f034..a09a5041e74c8 100644 |
66 |
+--- a/drivers/edac/altera_edac.c |
67 |
++++ b/drivers/edac/altera_edac.c |
68 |
+@@ -349,7 +349,7 @@ static int altr_sdram_probe(struct platform_device *pdev) |
69 |
+ if (irq < 0) { |
70 |
+ edac_printk(KERN_ERR, EDAC_MC, |
71 |
+ "No irq %d in DT\n", irq); |
72 |
+- return -ENODEV; |
73 |
++ return irq; |
74 |
+ } |
75 |
+ |
76 |
+ /* Arria10 has a 2nd IRQ */ |
77 |
+diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c |
78 |
+index e4a1032ba0b58..cd9926e518967 100644 |
79 |
+--- a/drivers/edac/xgene_edac.c |
80 |
++++ b/drivers/edac/xgene_edac.c |
81 |
+@@ -1922,7 +1922,7 @@ static int xgene_edac_probe(struct platform_device *pdev) |
82 |
+ irq = platform_get_irq(pdev, i); |
83 |
+ if (irq < 0) { |
84 |
+ dev_err(&pdev->dev, "No IRQ resource\n"); |
85 |
+- rc = -EINVAL; |
86 |
++ rc = irq; |
87 |
+ goto out_err; |
88 |
+ } |
89 |
+ rc = devm_request_irq(&pdev->dev, irq, |
90 |
+diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c |
91 |
+index 29edfc3437163..aeb7cb651fa4f 100644 |
92 |
+--- a/drivers/gpu/drm/i915/display/intel_overlay.c |
93 |
++++ b/drivers/gpu/drm/i915/display/intel_overlay.c |
94 |
+@@ -913,6 +913,9 @@ static int check_overlay_dst(struct intel_overlay *overlay, |
95 |
+ const struct intel_crtc_state *pipe_config = |
96 |
+ overlay->crtc->config; |
97 |
+ |
98 |
++ if (rec->dst_height == 0 || rec->dst_width == 0) |
99 |
++ return -EINVAL; |
100 |
++ |
101 |
+ if (rec->dst_x < pipe_config->pipe_src_w && |
102 |
+ rec->dst_x + rec->dst_width <= pipe_config->pipe_src_w && |
103 |
+ rec->dst_y < pipe_config->pipe_src_h && |
104 |
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c |
105 |
+index f3c30b2a788e8..8bff14ae16b0e 100644 |
106 |
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c |
107 |
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c |
108 |
+@@ -38,7 +38,7 @@ nvbios_addr(struct nvkm_bios *bios, u32 *addr, u8 size) |
109 |
+ *addr += bios->imaged_addr; |
110 |
+ } |
111 |
+ |
112 |
+- if (unlikely(*addr + size >= bios->size)) { |
113 |
++ if (unlikely(*addr + size > bios->size)) { |
114 |
+ nvkm_error(&bios->subdev, "OOB %d %08x %08x\n", size, p, *addr); |
115 |
+ return false; |
116 |
+ } |
117 |
+diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c |
118 |
+index 48864269f042a..baa129a6c9127 100644 |
119 |
+--- a/drivers/infiniband/hw/mlx4/main.c |
120 |
++++ b/drivers/infiniband/hw/mlx4/main.c |
121 |
+@@ -3291,7 +3291,7 @@ static void mlx4_ib_event(struct mlx4_dev *dev, void *ibdev_ptr, |
122 |
+ case MLX4_DEV_EVENT_PORT_MGMT_CHANGE: |
123 |
+ ew = kmalloc(sizeof *ew, GFP_ATOMIC); |
124 |
+ if (!ew) |
125 |
+- break; |
126 |
++ return; |
127 |
+ |
128 |
+ INIT_WORK(&ew->work, handle_port_mgmt_change_event); |
129 |
+ memcpy(&ew->ib_eqe, eqe, sizeof *eqe); |
130 |
+diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c |
131 |
+index d14ad523f96c8..a5152f097cb7a 100644 |
132 |
+--- a/drivers/infiniband/sw/rdmavt/qp.c |
133 |
++++ b/drivers/infiniband/sw/rdmavt/qp.c |
134 |
+@@ -3110,6 +3110,8 @@ do_write: |
135 |
+ case IB_WR_ATOMIC_FETCH_AND_ADD: |
136 |
+ if (unlikely(!(qp->qp_access_flags & IB_ACCESS_REMOTE_ATOMIC))) |
137 |
+ goto inv_err; |
138 |
++ if (unlikely(wqe->atomic_wr.remote_addr & (sizeof(u64) - 1))) |
139 |
++ goto inv_err; |
140 |
+ if (unlikely(!rvt_rkey_ok(qp, &qp->r_sge.sge, sizeof(u64), |
141 |
+ wqe->atomic_wr.remote_addr, |
142 |
+ wqe->atomic_wr.rkey, |
143 |
+diff --git a/drivers/infiniband/sw/siw/siw.h b/drivers/infiniband/sw/siw/siw.h |
144 |
+index 4d8bc995b4503..eaa9863dd1e00 100644 |
145 |
+--- a/drivers/infiniband/sw/siw/siw.h |
146 |
++++ b/drivers/infiniband/sw/siw/siw.h |
147 |
+@@ -658,14 +658,9 @@ static inline struct siw_sqe *orq_get_current(struct siw_qp *qp) |
148 |
+ return &qp->orq[qp->orq_get % qp->attrs.orq_size]; |
149 |
+ } |
150 |
+ |
151 |
+-static inline struct siw_sqe *orq_get_tail(struct siw_qp *qp) |
152 |
+-{ |
153 |
+- return &qp->orq[qp->orq_put % qp->attrs.orq_size]; |
154 |
+-} |
155 |
+- |
156 |
+ static inline struct siw_sqe *orq_get_free(struct siw_qp *qp) |
157 |
+ { |
158 |
+- struct siw_sqe *orq_e = orq_get_tail(qp); |
159 |
++ struct siw_sqe *orq_e = &qp->orq[qp->orq_put % qp->attrs.orq_size]; |
160 |
+ |
161 |
+ if (READ_ONCE(orq_e->flags) == 0) |
162 |
+ return orq_e; |
163 |
+diff --git a/drivers/infiniband/sw/siw/siw_qp_rx.c b/drivers/infiniband/sw/siw/siw_qp_rx.c |
164 |
+index c7c38f7fd29d6..5f94c716301fa 100644 |
165 |
+--- a/drivers/infiniband/sw/siw/siw_qp_rx.c |
166 |
++++ b/drivers/infiniband/sw/siw/siw_qp_rx.c |
167 |
+@@ -1153,11 +1153,12 @@ static int siw_check_tx_fence(struct siw_qp *qp) |
168 |
+ |
169 |
+ spin_lock_irqsave(&qp->orq_lock, flags); |
170 |
+ |
171 |
+- rreq = orq_get_current(qp); |
172 |
+- |
173 |
+ /* free current orq entry */ |
174 |
++ rreq = orq_get_current(qp); |
175 |
+ WRITE_ONCE(rreq->flags, 0); |
176 |
+ |
177 |
++ qp->orq_get++; |
178 |
++ |
179 |
+ if (qp->tx_ctx.orq_fence) { |
180 |
+ if (unlikely(tx_waiting->wr_status != SIW_WR_QUEUED)) { |
181 |
+ pr_warn("siw: [QP %u]: fence resume: bad status %d\n", |
182 |
+@@ -1165,10 +1166,12 @@ static int siw_check_tx_fence(struct siw_qp *qp) |
183 |
+ rv = -EPROTO; |
184 |
+ goto out; |
185 |
+ } |
186 |
+- /* resume SQ processing */ |
187 |
++ /* resume SQ processing, if possible */ |
188 |
+ if (tx_waiting->sqe.opcode == SIW_OP_READ || |
189 |
+ tx_waiting->sqe.opcode == SIW_OP_READ_LOCAL_INV) { |
190 |
+- rreq = orq_get_tail(qp); |
191 |
++ |
192 |
++ /* SQ processing was stopped because of a full ORQ */ |
193 |
++ rreq = orq_get_free(qp); |
194 |
+ if (unlikely(!rreq)) { |
195 |
+ pr_warn("siw: [QP %u]: no ORQE\n", qp_id(qp)); |
196 |
+ rv = -EPROTO; |
197 |
+@@ -1181,15 +1184,14 @@ static int siw_check_tx_fence(struct siw_qp *qp) |
198 |
+ resume_tx = 1; |
199 |
+ |
200 |
+ } else if (siw_orq_empty(qp)) { |
201 |
++ /* |
202 |
++ * SQ processing was stopped by fenced work request. |
203 |
++ * Resume since all previous Read's are now completed. |
204 |
++ */ |
205 |
+ qp->tx_ctx.orq_fence = 0; |
206 |
+ resume_tx = 1; |
207 |
+- } else { |
208 |
+- pr_warn("siw: [QP %u]: fence resume: orq idx: %d:%d\n", |
209 |
+- qp_id(qp), qp->orq_get, qp->orq_put); |
210 |
+- rv = -EPROTO; |
211 |
+ } |
212 |
+ } |
213 |
+- qp->orq_get++; |
214 |
+ out: |
215 |
+ spin_unlock_irqrestore(&qp->orq_lock, flags); |
216 |
+ |
217 |
+diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c |
218 |
+index 692401e941a77..7502fa84e2537 100644 |
219 |
+--- a/drivers/iommu/amd_iommu_init.c |
220 |
++++ b/drivers/iommu/amd_iommu_init.c |
221 |
+@@ -21,6 +21,7 @@ |
222 |
+ #include <linux/iommu.h> |
223 |
+ #include <linux/kmemleak.h> |
224 |
+ #include <linux/mem_encrypt.h> |
225 |
++#include <linux/iopoll.h> |
226 |
+ #include <asm/pci-direct.h> |
227 |
+ #include <asm/iommu.h> |
228 |
+ #include <asm/apic.h> |
229 |
+@@ -759,6 +760,7 @@ static int iommu_ga_log_enable(struct amd_iommu *iommu) |
230 |
+ status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET); |
231 |
+ if (status & (MMIO_STATUS_GALOG_RUN_MASK)) |
232 |
+ break; |
233 |
++ udelay(10); |
234 |
+ } |
235 |
+ |
236 |
+ if (i >= LOOP_TIMEOUT) |
237 |
+diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c |
238 |
+index 5dcc81b1df623..f3b299b5c1c06 100644 |
239 |
+--- a/drivers/iommu/intel_irq_remapping.c |
240 |
++++ b/drivers/iommu/intel_irq_remapping.c |
241 |
+@@ -570,9 +570,8 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu) |
242 |
+ fn, &intel_ir_domain_ops, |
243 |
+ iommu); |
244 |
+ if (!iommu->ir_domain) { |
245 |
+- irq_domain_free_fwnode(fn); |
246 |
+ pr_err("IR%d: failed to allocate irqdomain\n", iommu->seq_id); |
247 |
+- goto out_free_bitmap; |
248 |
++ goto out_free_fwnode; |
249 |
+ } |
250 |
+ iommu->ir_msi_domain = |
251 |
+ arch_create_remap_msi_irq_domain(iommu->ir_domain, |
252 |
+@@ -596,7 +595,7 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu) |
253 |
+ |
254 |
+ if (dmar_enable_qi(iommu)) { |
255 |
+ pr_err("Failed to enable queued invalidation\n"); |
256 |
+- goto out_free_bitmap; |
257 |
++ goto out_free_ir_domain; |
258 |
+ } |
259 |
+ } |
260 |
+ |
261 |
+@@ -620,6 +619,14 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu) |
262 |
+ |
263 |
+ return 0; |
264 |
+ |
265 |
++out_free_ir_domain: |
266 |
++ if (iommu->ir_msi_domain) |
267 |
++ irq_domain_remove(iommu->ir_msi_domain); |
268 |
++ iommu->ir_msi_domain = NULL; |
269 |
++ irq_domain_remove(iommu->ir_domain); |
270 |
++ iommu->ir_domain = NULL; |
271 |
++out_free_fwnode: |
272 |
++ irq_domain_free_fwnode(fn); |
273 |
+ out_free_bitmap: |
274 |
+ bitmap_free(bitmap); |
275 |
+ out_free_pages: |
276 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h b/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h |
277 |
+index 292b880f3f9fc..3587b2e7843ef 100644 |
278 |
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h |
279 |
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h |
280 |
+@@ -128,6 +128,7 @@ |
281 |
+ |
282 |
+ #define NUM_DWMAC100_DMA_REGS 9 |
283 |
+ #define NUM_DWMAC1000_DMA_REGS 23 |
284 |
++#define NUM_DWMAC4_DMA_REGS 27 |
285 |
+ |
286 |
+ void dwmac_enable_dma_transmission(void __iomem *ioaddr); |
287 |
+ void dwmac_enable_dma_irq(void __iomem *ioaddr, u32 chan); |
288 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c |
289 |
+index ce1346c14b05a..30b9393ae8f2f 100644 |
290 |
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c |
291 |
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c |
292 |
+@@ -21,10 +21,18 @@ |
293 |
+ #include "dwxgmac2.h" |
294 |
+ |
295 |
+ #define REG_SPACE_SIZE 0x1060 |
296 |
++#define GMAC4_REG_SPACE_SIZE 0x116C |
297 |
+ #define MAC100_ETHTOOL_NAME "st_mac100" |
298 |
+ #define GMAC_ETHTOOL_NAME "st_gmac" |
299 |
+ #define XGMAC_ETHTOOL_NAME "st_xgmac" |
300 |
+ |
301 |
++/* Same as DMA_CHAN_BASE_ADDR defined in dwmac4_dma.h |
302 |
++ * |
303 |
++ * It is here because dwmac_dma.h and dwmac4_dam.h can not be included at the |
304 |
++ * same time due to the conflicting macro names. |
305 |
++ */ |
306 |
++#define GMAC4_DMA_CHAN_BASE_ADDR 0x00001100 |
307 |
++ |
308 |
+ #define ETHTOOL_DMA_OFFSET 55 |
309 |
+ |
310 |
+ struct stmmac_stats { |
311 |
+@@ -413,6 +421,8 @@ static int stmmac_ethtool_get_regs_len(struct net_device *dev) |
312 |
+ |
313 |
+ if (priv->plat->has_xgmac) |
314 |
+ return XGMAC_REGSIZE * 4; |
315 |
++ else if (priv->plat->has_gmac4) |
316 |
++ return GMAC4_REG_SPACE_SIZE; |
317 |
+ return REG_SPACE_SIZE; |
318 |
+ } |
319 |
+ |
320 |
+@@ -425,8 +435,13 @@ static void stmmac_ethtool_gregs(struct net_device *dev, |
321 |
+ stmmac_dump_mac_regs(priv, priv->hw, reg_space); |
322 |
+ stmmac_dump_dma_regs(priv, priv->ioaddr, reg_space); |
323 |
+ |
324 |
+- if (!priv->plat->has_xgmac) { |
325 |
+- /* Copy DMA registers to where ethtool expects them */ |
326 |
++ /* Copy DMA registers to where ethtool expects them */ |
327 |
++ if (priv->plat->has_gmac4) { |
328 |
++ /* GMAC4 dumps its DMA registers at its DMA_CHAN_BASE_ADDR */ |
329 |
++ memcpy(®_space[ETHTOOL_DMA_OFFSET], |
330 |
++ ®_space[GMAC4_DMA_CHAN_BASE_ADDR / 4], |
331 |
++ NUM_DWMAC4_DMA_REGS * 4); |
332 |
++ } else if (!priv->plat->has_xgmac) { |
333 |
+ memcpy(®_space[ETHTOOL_DMA_OFFSET], |
334 |
+ ®_space[DMA_BUS_MODE / 4], |
335 |
+ NUM_DWMAC1000_DMA_REGS * 4); |
336 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c |
337 |
+index e5d9007c8090b..8c14c99663941 100644 |
338 |
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c |
339 |
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c |
340 |
+@@ -149,15 +149,20 @@ static int adjust_systime(void __iomem *ioaddr, u32 sec, u32 nsec, |
341 |
+ |
342 |
+ static void get_systime(void __iomem *ioaddr, u64 *systime) |
343 |
+ { |
344 |
+- u64 ns; |
345 |
+- |
346 |
+- /* Get the TSSS value */ |
347 |
+- ns = readl(ioaddr + PTP_STNSR); |
348 |
+- /* Get the TSS and convert sec time value to nanosecond */ |
349 |
+- ns += readl(ioaddr + PTP_STSR) * 1000000000ULL; |
350 |
++ u64 ns, sec0, sec1; |
351 |
++ |
352 |
++ /* Get the TSS value */ |
353 |
++ sec1 = readl_relaxed(ioaddr + PTP_STSR); |
354 |
++ do { |
355 |
++ sec0 = sec1; |
356 |
++ /* Get the TSSS value */ |
357 |
++ ns = readl_relaxed(ioaddr + PTP_STNSR); |
358 |
++ /* Get the TSS value */ |
359 |
++ sec1 = readl_relaxed(ioaddr + PTP_STSR); |
360 |
++ } while (sec0 != sec1); |
361 |
+ |
362 |
+ if (systime) |
363 |
+- *systime = ns; |
364 |
++ *systime = ns + (sec1 * 1000000000ULL); |
365 |
+ } |
366 |
+ |
367 |
+ const struct stmmac_hwtimestamp stmmac_ptp = { |
368 |
+diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c |
369 |
+index 25dbea302fb6d..7c131a423cafa 100644 |
370 |
+--- a/drivers/net/ieee802154/ca8210.c |
371 |
++++ b/drivers/net/ieee802154/ca8210.c |
372 |
+@@ -1770,6 +1770,7 @@ static int ca8210_async_xmit_complete( |
373 |
+ status |
374 |
+ ); |
375 |
+ if (status != MAC_TRANSACTION_OVERFLOW) { |
376 |
++ dev_kfree_skb_any(priv->tx_skb); |
377 |
+ ieee802154_wake_queue(priv->hw); |
378 |
+ return 0; |
379 |
+ } |
380 |
+diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c |
381 |
+index 2a78084aeaedb..1d181eff0c299 100644 |
382 |
+--- a/drivers/net/ieee802154/mac802154_hwsim.c |
383 |
++++ b/drivers/net/ieee802154/mac802154_hwsim.c |
384 |
+@@ -786,6 +786,7 @@ static int hwsim_add_one(struct genl_info *info, struct device *dev, |
385 |
+ goto err_pib; |
386 |
+ } |
387 |
+ |
388 |
++ pib->channel = 13; |
389 |
+ rcu_assign_pointer(phy->pib, pib); |
390 |
+ phy->idx = idx; |
391 |
+ INIT_LIST_HEAD(&phy->edges); |
392 |
+diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c |
393 |
+index 8dc04e2590b18..383231b854642 100644 |
394 |
+--- a/drivers/net/ieee802154/mcr20a.c |
395 |
++++ b/drivers/net/ieee802154/mcr20a.c |
396 |
+@@ -976,8 +976,8 @@ static void mcr20a_hw_setup(struct mcr20a_local *lp) |
397 |
+ dev_dbg(printdev(lp), "%s\n", __func__); |
398 |
+ |
399 |
+ phy->symbol_duration = 16; |
400 |
+- phy->lifs_period = 40; |
401 |
+- phy->sifs_period = 12; |
402 |
++ phy->lifs_period = 40 * phy->symbol_duration; |
403 |
++ phy->sifs_period = 12 * phy->symbol_duration; |
404 |
+ |
405 |
+ hw->flags = IEEE802154_HW_TX_OMIT_CKSUM | |
406 |
+ IEEE802154_HW_AFILT | |
407 |
+diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c |
408 |
+index f233a6933a976..f729f55f6a174 100644 |
409 |
+--- a/drivers/net/macsec.c |
410 |
++++ b/drivers/net/macsec.c |
411 |
+@@ -3247,6 +3247,15 @@ static int macsec_newlink(struct net *net, struct net_device *dev, |
412 |
+ |
413 |
+ macsec->real_dev = real_dev; |
414 |
+ |
415 |
++ /* send_sci must be set to true when transmit sci explicitly is set */ |
416 |
++ if ((data && data[IFLA_MACSEC_SCI]) && |
417 |
++ (data && data[IFLA_MACSEC_INC_SCI])) { |
418 |
++ u8 send_sci = !!nla_get_u8(data[IFLA_MACSEC_INC_SCI]); |
419 |
++ |
420 |
++ if (!send_sci) |
421 |
++ return -EINVAL; |
422 |
++ } |
423 |
++ |
424 |
+ if (data && data[IFLA_MACSEC_ICV_LEN]) |
425 |
+ icv_len = nla_get_u8(data[IFLA_MACSEC_ICV_LEN]); |
426 |
+ mtu = real_dev->mtu - icv_len - macsec_extra_len(true); |
427 |
+diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c |
428 |
+index fa742535f6791..e4da3217e9398 100644 |
429 |
+--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c |
430 |
++++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c |
431 |
+@@ -1261,16 +1261,18 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) |
432 |
+ sizeof(*girq->parents), |
433 |
+ GFP_KERNEL); |
434 |
+ if (!girq->parents) { |
435 |
+- pinctrl_remove_gpio_range(pc->pctl_dev, &pc->gpio_range); |
436 |
+- return -ENOMEM; |
437 |
++ err = -ENOMEM; |
438 |
++ goto out_remove; |
439 |
+ } |
440 |
+ |
441 |
+ if (is_7211) { |
442 |
+ pc->wake_irq = devm_kcalloc(dev, BCM2835_NUM_IRQS, |
443 |
+ sizeof(*pc->wake_irq), |
444 |
+ GFP_KERNEL); |
445 |
+- if (!pc->wake_irq) |
446 |
+- return -ENOMEM; |
447 |
++ if (!pc->wake_irq) { |
448 |
++ err = -ENOMEM; |
449 |
++ goto out_remove; |
450 |
++ } |
451 |
+ } |
452 |
+ |
453 |
+ /* |
454 |
+@@ -1294,8 +1296,10 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) |
455 |
+ |
456 |
+ len = strlen(dev_name(pc->dev)) + 16; |
457 |
+ name = devm_kzalloc(pc->dev, len, GFP_KERNEL); |
458 |
+- if (!name) |
459 |
+- return -ENOMEM; |
460 |
++ if (!name) { |
461 |
++ err = -ENOMEM; |
462 |
++ goto out_remove; |
463 |
++ } |
464 |
+ |
465 |
+ snprintf(name, len, "%s:bank%d", dev_name(pc->dev), i); |
466 |
+ |
467 |
+@@ -1314,11 +1318,14 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) |
468 |
+ err = gpiochip_add_data(&pc->gpio_chip, pc); |
469 |
+ if (err) { |
470 |
+ dev_err(dev, "could not add GPIO chip\n"); |
471 |
+- pinctrl_remove_gpio_range(pc->pctl_dev, &pc->gpio_range); |
472 |
+- return err; |
473 |
++ goto out_remove; |
474 |
+ } |
475 |
+ |
476 |
+ return 0; |
477 |
++ |
478 |
++out_remove: |
479 |
++ pinctrl_remove_gpio_range(pc->pctl_dev, &pc->gpio_range); |
480 |
++ return err; |
481 |
+ } |
482 |
+ |
483 |
+ static struct platform_driver bcm2835_pinctrl_driver = { |
484 |
+diff --git a/drivers/rtc/rtc-mc146818-lib.c b/drivers/rtc/rtc-mc146818-lib.c |
485 |
+index 2ecd8752b088b..5add637c9ad23 100644 |
486 |
+--- a/drivers/rtc/rtc-mc146818-lib.c |
487 |
++++ b/drivers/rtc/rtc-mc146818-lib.c |
488 |
+@@ -83,7 +83,7 @@ unsigned int mc146818_get_time(struct rtc_time *time) |
489 |
+ time->tm_year += real_year - 72; |
490 |
+ #endif |
491 |
+ |
492 |
+- if (century > 20) |
493 |
++ if (century > 19) |
494 |
+ time->tm_year += (century - 19) * 100; |
495 |
+ |
496 |
+ /* |
497 |
+diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c |
498 |
+index e6c3e7c070aaf..9ed109fb6b67b 100644 |
499 |
+--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c |
500 |
++++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c |
501 |
+@@ -506,7 +506,8 @@ static int bnx2fc_l2_rcv_thread(void *arg) |
502 |
+ |
503 |
+ static void bnx2fc_recv_frame(struct sk_buff *skb) |
504 |
+ { |
505 |
+- u32 fr_len; |
506 |
++ u64 crc_err; |
507 |
++ u32 fr_len, fr_crc; |
508 |
+ struct fc_lport *lport; |
509 |
+ struct fcoe_rcv_info *fr; |
510 |
+ struct fc_stats *stats; |
511 |
+@@ -540,6 +541,11 @@ static void bnx2fc_recv_frame(struct sk_buff *skb) |
512 |
+ skb_pull(skb, sizeof(struct fcoe_hdr)); |
513 |
+ fr_len = skb->len - sizeof(struct fcoe_crc_eof); |
514 |
+ |
515 |
++ stats = per_cpu_ptr(lport->stats, get_cpu()); |
516 |
++ stats->RxFrames++; |
517 |
++ stats->RxWords += fr_len / FCOE_WORD_TO_BYTE; |
518 |
++ put_cpu(); |
519 |
++ |
520 |
+ fp = (struct fc_frame *)skb; |
521 |
+ fc_frame_init(fp); |
522 |
+ fr_dev(fp) = lport; |
523 |
+@@ -622,16 +628,15 @@ static void bnx2fc_recv_frame(struct sk_buff *skb) |
524 |
+ return; |
525 |
+ } |
526 |
+ |
527 |
+- stats = per_cpu_ptr(lport->stats, smp_processor_id()); |
528 |
+- stats->RxFrames++; |
529 |
+- stats->RxWords += fr_len / FCOE_WORD_TO_BYTE; |
530 |
++ fr_crc = le32_to_cpu(fr_crc(fp)); |
531 |
+ |
532 |
+- if (le32_to_cpu(fr_crc(fp)) != |
533 |
+- ~crc32(~0, skb->data, fr_len)) { |
534 |
+- if (stats->InvalidCRCCount < 5) |
535 |
++ if (unlikely(fr_crc != ~crc32(~0, skb->data, fr_len))) { |
536 |
++ stats = per_cpu_ptr(lport->stats, get_cpu()); |
537 |
++ crc_err = (stats->InvalidCRCCount++); |
538 |
++ put_cpu(); |
539 |
++ if (crc_err < 5) |
540 |
+ printk(KERN_WARNING PFX "dropping frame with " |
541 |
+ "CRC error\n"); |
542 |
+- stats->InvalidCRCCount++; |
543 |
+ kfree_skb(skb); |
544 |
+ return; |
545 |
+ } |
546 |
+diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c |
547 |
+index 71afa2a99b17f..75f25f08245fd 100644 |
548 |
+--- a/drivers/soc/mediatek/mtk-scpsys.c |
549 |
++++ b/drivers/soc/mediatek/mtk-scpsys.c |
550 |
+@@ -333,17 +333,12 @@ out: |
551 |
+ return ret; |
552 |
+ } |
553 |
+ |
554 |
+-static int init_clks(struct platform_device *pdev, struct clk **clk) |
555 |
++static void init_clks(struct platform_device *pdev, struct clk **clk) |
556 |
+ { |
557 |
+ int i; |
558 |
+ |
559 |
+- for (i = CLK_NONE + 1; i < CLK_MAX; i++) { |
560 |
++ for (i = CLK_NONE + 1; i < CLK_MAX; i++) |
561 |
+ clk[i] = devm_clk_get(&pdev->dev, clk_names[i]); |
562 |
+- if (IS_ERR(clk[i])) |
563 |
+- return PTR_ERR(clk[i]); |
564 |
+- } |
565 |
+- |
566 |
+- return 0; |
567 |
+ } |
568 |
+ |
569 |
+ static struct scp *init_scp(struct platform_device *pdev, |
570 |
+@@ -353,7 +348,7 @@ static struct scp *init_scp(struct platform_device *pdev, |
571 |
+ { |
572 |
+ struct genpd_onecell_data *pd_data; |
573 |
+ struct resource *res; |
574 |
+- int i, j, ret; |
575 |
++ int i, j; |
576 |
+ struct scp *scp; |
577 |
+ struct clk *clk[CLK_MAX]; |
578 |
+ |
579 |
+@@ -408,9 +403,7 @@ static struct scp *init_scp(struct platform_device *pdev, |
580 |
+ |
581 |
+ pd_data->num_domains = num; |
582 |
+ |
583 |
+- ret = init_clks(pdev, clk); |
584 |
+- if (ret) |
585 |
+- return ERR_PTR(ret); |
586 |
++ init_clks(pdev, clk); |
587 |
+ |
588 |
+ for (i = 0; i < num; i++) { |
589 |
+ struct scp_domain *scpd = &scp->domains[i]; |
590 |
+diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c |
591 |
+index 8a1176efa4c85..3755be04346a6 100644 |
592 |
+--- a/drivers/spi/spi-bcm-qspi.c |
593 |
++++ b/drivers/spi/spi-bcm-qspi.c |
594 |
+@@ -509,7 +509,7 @@ static void bcm_qspi_chip_select(struct bcm_qspi *qspi, int cs) |
595 |
+ u32 rd = 0; |
596 |
+ u32 wr = 0; |
597 |
+ |
598 |
+- if (qspi->base[CHIP_SELECT]) { |
599 |
++ if (cs >= 0 && qspi->base[CHIP_SELECT]) { |
600 |
+ rd = bcm_qspi_read(qspi, CHIP_SELECT, 0); |
601 |
+ wr = (rd & ~0xff) | (1 << cs); |
602 |
+ if (rd == wr) |
603 |
+diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c |
604 |
+index 3c841ae0a3e91..c9c4c0f2e8b7a 100644 |
605 |
+--- a/drivers/spi/spi-meson-spicc.c |
606 |
++++ b/drivers/spi/spi-meson-spicc.c |
607 |
+@@ -527,6 +527,11 @@ static int meson_spicc_probe(struct platform_device *pdev) |
608 |
+ writel_relaxed(0, spicc->base + SPICC_INTREG); |
609 |
+ |
610 |
+ irq = platform_get_irq(pdev, 0); |
611 |
++ if (irq < 0) { |
612 |
++ ret = irq; |
613 |
++ goto out_master; |
614 |
++ } |
615 |
++ |
616 |
+ ret = devm_request_irq(&pdev->dev, irq, meson_spicc_irq, |
617 |
+ 0, NULL, spicc); |
618 |
+ if (ret) { |
619 |
+diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c |
620 |
+index cafb773f78616..29d44f5d5212c 100644 |
621 |
+--- a/drivers/spi/spi-mt65xx.c |
622 |
++++ b/drivers/spi/spi-mt65xx.c |
623 |
+@@ -533,7 +533,7 @@ static irqreturn_t mtk_spi_interrupt(int irq, void *dev_id) |
624 |
+ else |
625 |
+ mdata->state = MTK_SPI_IDLE; |
626 |
+ |
627 |
+- if (!master->can_dma(master, master->cur_msg->spi, trans)) { |
628 |
++ if (!master->can_dma(master, NULL, trans)) { |
629 |
+ if (trans->rx_buf) { |
630 |
+ cnt = mdata->xfer_len / 4; |
631 |
+ ioread32_rep(mdata->base + SPI_RX_DATA_REG, |
632 |
+diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c |
633 |
+index 2ee61596164be..a5041bf0d5db1 100644 |
634 |
+--- a/fs/btrfs/qgroup.c |
635 |
++++ b/fs/btrfs/qgroup.c |
636 |
+@@ -1105,9 +1105,24 @@ int btrfs_quota_disable(struct btrfs_fs_info *fs_info) |
637 |
+ struct btrfs_trans_handle *trans = NULL; |
638 |
+ int ret = 0; |
639 |
+ |
640 |
++ /* |
641 |
++ * We need to have subvol_sem write locked, to prevent races between |
642 |
++ * concurrent tasks trying to disable quotas, because we will unlock |
643 |
++ * and relock qgroup_ioctl_lock across BTRFS_FS_QUOTA_ENABLED changes. |
644 |
++ */ |
645 |
++ lockdep_assert_held_write(&fs_info->subvol_sem); |
646 |
++ |
647 |
+ mutex_lock(&fs_info->qgroup_ioctl_lock); |
648 |
+ if (!fs_info->quota_root) |
649 |
+ goto out; |
650 |
++ |
651 |
++ /* |
652 |
++ * Request qgroup rescan worker to complete and wait for it. This wait |
653 |
++ * must be done before transaction start for quota disable since it may |
654 |
++ * deadlock with transaction by the qgroup rescan worker. |
655 |
++ */ |
656 |
++ clear_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags); |
657 |
++ btrfs_qgroup_wait_for_completion(fs_info, false); |
658 |
+ mutex_unlock(&fs_info->qgroup_ioctl_lock); |
659 |
+ |
660 |
+ /* |
661 |
+@@ -1125,14 +1140,13 @@ int btrfs_quota_disable(struct btrfs_fs_info *fs_info) |
662 |
+ if (IS_ERR(trans)) { |
663 |
+ ret = PTR_ERR(trans); |
664 |
+ trans = NULL; |
665 |
++ set_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags); |
666 |
+ goto out; |
667 |
+ } |
668 |
+ |
669 |
+ if (!fs_info->quota_root) |
670 |
+ goto out; |
671 |
+ |
672 |
+- clear_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags); |
673 |
+- btrfs_qgroup_wait_for_completion(fs_info, false); |
674 |
+ spin_lock(&fs_info->qgroup_lock); |
675 |
+ quota_root = fs_info->quota_root; |
676 |
+ fs_info->quota_root = NULL; |
677 |
+@@ -3304,6 +3318,9 @@ qgroup_rescan_init(struct btrfs_fs_info *fs_info, u64 progress_objectid, |
678 |
+ btrfs_warn(fs_info, |
679 |
+ "qgroup rescan init failed, qgroup is not enabled"); |
680 |
+ ret = -EINVAL; |
681 |
++ } else if (!test_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags)) { |
682 |
++ /* Quota disable is in progress */ |
683 |
++ ret = -EBUSY; |
684 |
+ } |
685 |
+ |
686 |
+ if (ret) { |
687 |
+diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c |
688 |
+index cdb10e9fded65..8f665aa1d706e 100644 |
689 |
+--- a/fs/ext4/inline.c |
690 |
++++ b/fs/ext4/inline.c |
691 |
+@@ -1120,7 +1120,15 @@ static void ext4_restore_inline_data(handle_t *handle, struct inode *inode, |
692 |
+ struct ext4_iloc *iloc, |
693 |
+ void *buf, int inline_size) |
694 |
+ { |
695 |
+- ext4_create_inline_data(handle, inode, inline_size); |
696 |
++ int ret; |
697 |
++ |
698 |
++ ret = ext4_create_inline_data(handle, inode, inline_size); |
699 |
++ if (ret) { |
700 |
++ ext4_msg(inode->i_sb, KERN_EMERG, |
701 |
++ "error restoring inline_data for inode -- potential data loss! (inode %lu, error %d)", |
702 |
++ inode->i_ino, ret); |
703 |
++ return; |
704 |
++ } |
705 |
+ ext4_write_inline_data(inode, iloc, buf, 0, inline_size); |
706 |
+ ext4_set_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); |
707 |
+ } |
708 |
+diff --git a/fs/fs_context.c b/fs/fs_context.c |
709 |
+index a2367c7aef5b3..e492a83fa100e 100644 |
710 |
+--- a/fs/fs_context.c |
711 |
++++ b/fs/fs_context.c |
712 |
+@@ -258,7 +258,7 @@ static struct fs_context *alloc_fs_context(struct file_system_type *fs_type, |
713 |
+ struct fs_context *fc; |
714 |
+ int ret = -ENOMEM; |
715 |
+ |
716 |
+- fc = kzalloc(sizeof(struct fs_context), GFP_KERNEL); |
717 |
++ fc = kzalloc(sizeof(struct fs_context), GFP_KERNEL_ACCOUNT); |
718 |
+ if (!fc) |
719 |
+ return ERR_PTR(-ENOMEM); |
720 |
+ |
721 |
+@@ -686,7 +686,7 @@ const struct fs_context_operations legacy_fs_context_ops = { |
722 |
+ */ |
723 |
+ static int legacy_init_fs_context(struct fs_context *fc) |
724 |
+ { |
725 |
+- fc->fs_private = kzalloc(sizeof(struct legacy_fs_context), GFP_KERNEL); |
726 |
++ fc->fs_private = kzalloc(sizeof(struct legacy_fs_context), GFP_KERNEL_ACCOUNT); |
727 |
+ if (!fc->fs_private) |
728 |
+ return -ENOMEM; |
729 |
+ fc->ops = &legacy_fs_context_ops; |
730 |
+diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c |
731 |
+index a48fcd4180c74..62eb78ac7437f 100644 |
732 |
+--- a/fs/nfsd/nfs4state.c |
733 |
++++ b/fs/nfsd/nfs4state.c |
734 |
+@@ -3941,8 +3941,10 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, |
735 |
+ status = nfserr_clid_inuse; |
736 |
+ if (client_has_state(old) |
737 |
+ && !same_creds(&unconf->cl_cred, |
738 |
+- &old->cl_cred)) |
739 |
++ &old->cl_cred)) { |
740 |
++ old = NULL; |
741 |
+ goto out; |
742 |
++ } |
743 |
+ status = mark_client_expired_locked(old); |
744 |
+ if (status) { |
745 |
+ old = NULL; |
746 |
+diff --git a/kernel/audit.c b/kernel/audit.c |
747 |
+index 146edff0c73ec..db8141866ceaa 100644 |
748 |
+--- a/kernel/audit.c |
749 |
++++ b/kernel/audit.c |
750 |
+@@ -535,20 +535,22 @@ static void kauditd_printk_skb(struct sk_buff *skb) |
751 |
+ /** |
752 |
+ * kauditd_rehold_skb - Handle a audit record send failure in the hold queue |
753 |
+ * @skb: audit record |
754 |
++ * @error: error code (unused) |
755 |
+ * |
756 |
+ * Description: |
757 |
+ * This should only be used by the kauditd_thread when it fails to flush the |
758 |
+ * hold queue. |
759 |
+ */ |
760 |
+-static void kauditd_rehold_skb(struct sk_buff *skb) |
761 |
++static void kauditd_rehold_skb(struct sk_buff *skb, __always_unused int error) |
762 |
+ { |
763 |
+- /* put the record back in the queue at the same place */ |
764 |
+- skb_queue_head(&audit_hold_queue, skb); |
765 |
++ /* put the record back in the queue */ |
766 |
++ skb_queue_tail(&audit_hold_queue, skb); |
767 |
+ } |
768 |
+ |
769 |
+ /** |
770 |
+ * kauditd_hold_skb - Queue an audit record, waiting for auditd |
771 |
+ * @skb: audit record |
772 |
++ * @error: error code |
773 |
+ * |
774 |
+ * Description: |
775 |
+ * Queue the audit record, waiting for an instance of auditd. When this |
776 |
+@@ -558,19 +560,31 @@ static void kauditd_rehold_skb(struct sk_buff *skb) |
777 |
+ * and queue it, if we have room. If we want to hold on to the record, but we |
778 |
+ * don't have room, record a record lost message. |
779 |
+ */ |
780 |
+-static void kauditd_hold_skb(struct sk_buff *skb) |
781 |
++static void kauditd_hold_skb(struct sk_buff *skb, int error) |
782 |
+ { |
783 |
+ /* at this point it is uncertain if we will ever send this to auditd so |
784 |
+ * try to send the message via printk before we go any further */ |
785 |
+ kauditd_printk_skb(skb); |
786 |
+ |
787 |
+ /* can we just silently drop the message? */ |
788 |
+- if (!audit_default) { |
789 |
+- kfree_skb(skb); |
790 |
+- return; |
791 |
++ if (!audit_default) |
792 |
++ goto drop; |
793 |
++ |
794 |
++ /* the hold queue is only for when the daemon goes away completely, |
795 |
++ * not -EAGAIN failures; if we are in a -EAGAIN state requeue the |
796 |
++ * record on the retry queue unless it's full, in which case drop it |
797 |
++ */ |
798 |
++ if (error == -EAGAIN) { |
799 |
++ if (!audit_backlog_limit || |
800 |
++ skb_queue_len(&audit_retry_queue) < audit_backlog_limit) { |
801 |
++ skb_queue_tail(&audit_retry_queue, skb); |
802 |
++ return; |
803 |
++ } |
804 |
++ audit_log_lost("kauditd retry queue overflow"); |
805 |
++ goto drop; |
806 |
+ } |
807 |
+ |
808 |
+- /* if we have room, queue the message */ |
809 |
++ /* if we have room in the hold queue, queue the message */ |
810 |
+ if (!audit_backlog_limit || |
811 |
+ skb_queue_len(&audit_hold_queue) < audit_backlog_limit) { |
812 |
+ skb_queue_tail(&audit_hold_queue, skb); |
813 |
+@@ -579,24 +593,32 @@ static void kauditd_hold_skb(struct sk_buff *skb) |
814 |
+ |
815 |
+ /* we have no other options - drop the message */ |
816 |
+ audit_log_lost("kauditd hold queue overflow"); |
817 |
++drop: |
818 |
+ kfree_skb(skb); |
819 |
+ } |
820 |
+ |
821 |
+ /** |
822 |
+ * kauditd_retry_skb - Queue an audit record, attempt to send again to auditd |
823 |
+ * @skb: audit record |
824 |
++ * @error: error code (unused) |
825 |
+ * |
826 |
+ * Description: |
827 |
+ * Not as serious as kauditd_hold_skb() as we still have a connected auditd, |
828 |
+ * but for some reason we are having problems sending it audit records so |
829 |
+ * queue the given record and attempt to resend. |
830 |
+ */ |
831 |
+-static void kauditd_retry_skb(struct sk_buff *skb) |
832 |
++static void kauditd_retry_skb(struct sk_buff *skb, __always_unused int error) |
833 |
+ { |
834 |
+- /* NOTE: because records should only live in the retry queue for a |
835 |
+- * short period of time, before either being sent or moved to the hold |
836 |
+- * queue, we don't currently enforce a limit on this queue */ |
837 |
+- skb_queue_tail(&audit_retry_queue, skb); |
838 |
++ if (!audit_backlog_limit || |
839 |
++ skb_queue_len(&audit_retry_queue) < audit_backlog_limit) { |
840 |
++ skb_queue_tail(&audit_retry_queue, skb); |
841 |
++ return; |
842 |
++ } |
843 |
++ |
844 |
++ /* we have to drop the record, send it via printk as a last effort */ |
845 |
++ kauditd_printk_skb(skb); |
846 |
++ audit_log_lost("kauditd retry queue overflow"); |
847 |
++ kfree_skb(skb); |
848 |
+ } |
849 |
+ |
850 |
+ /** |
851 |
+@@ -634,7 +656,7 @@ static void auditd_reset(const struct auditd_connection *ac) |
852 |
+ /* flush the retry queue to the hold queue, but don't touch the main |
853 |
+ * queue since we need to process that normally for multicast */ |
854 |
+ while ((skb = skb_dequeue(&audit_retry_queue))) |
855 |
+- kauditd_hold_skb(skb); |
856 |
++ kauditd_hold_skb(skb, -ECONNREFUSED); |
857 |
+ } |
858 |
+ |
859 |
+ /** |
860 |
+@@ -708,16 +730,18 @@ static int kauditd_send_queue(struct sock *sk, u32 portid, |
861 |
+ struct sk_buff_head *queue, |
862 |
+ unsigned int retry_limit, |
863 |
+ void (*skb_hook)(struct sk_buff *skb), |
864 |
+- void (*err_hook)(struct sk_buff *skb)) |
865 |
++ void (*err_hook)(struct sk_buff *skb, int error)) |
866 |
+ { |
867 |
+ int rc = 0; |
868 |
+- struct sk_buff *skb; |
869 |
++ struct sk_buff *skb = NULL; |
870 |
++ struct sk_buff *skb_tail; |
871 |
+ unsigned int failed = 0; |
872 |
+ |
873 |
+ /* NOTE: kauditd_thread takes care of all our locking, we just use |
874 |
+ * the netlink info passed to us (e.g. sk and portid) */ |
875 |
+ |
876 |
+- while ((skb = skb_dequeue(queue))) { |
877 |
++ skb_tail = skb_peek_tail(queue); |
878 |
++ while ((skb != skb_tail) && (skb = skb_dequeue(queue))) { |
879 |
+ /* call the skb_hook for each skb we touch */ |
880 |
+ if (skb_hook) |
881 |
+ (*skb_hook)(skb); |
882 |
+@@ -725,7 +749,7 @@ static int kauditd_send_queue(struct sock *sk, u32 portid, |
883 |
+ /* can we send to anyone via unicast? */ |
884 |
+ if (!sk) { |
885 |
+ if (err_hook) |
886 |
+- (*err_hook)(skb); |
887 |
++ (*err_hook)(skb, -ECONNREFUSED); |
888 |
+ continue; |
889 |
+ } |
890 |
+ |
891 |
+@@ -739,7 +763,7 @@ retry: |
892 |
+ rc == -ECONNREFUSED || rc == -EPERM) { |
893 |
+ sk = NULL; |
894 |
+ if (err_hook) |
895 |
+- (*err_hook)(skb); |
896 |
++ (*err_hook)(skb, rc); |
897 |
+ if (rc == -EAGAIN) |
898 |
+ rc = 0; |
899 |
+ /* continue to drain the queue */ |
900 |
+diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c |
901 |
+index 411be8b2e837e..ad9dffed8411d 100644 |
902 |
+--- a/kernel/cgroup/cpuset.c |
903 |
++++ b/kernel/cgroup/cpuset.c |
904 |
+@@ -1473,10 +1473,15 @@ static void update_sibling_cpumasks(struct cpuset *parent, struct cpuset *cs, |
905 |
+ struct cpuset *sibling; |
906 |
+ struct cgroup_subsys_state *pos_css; |
907 |
+ |
908 |
++ percpu_rwsem_assert_held(&cpuset_rwsem); |
909 |
++ |
910 |
+ /* |
911 |
+ * Check all its siblings and call update_cpumasks_hier() |
912 |
+ * if their use_parent_ecpus flag is set in order for them |
913 |
+ * to use the right effective_cpus value. |
914 |
++ * |
915 |
++ * The update_cpumasks_hier() function may sleep. So we have to |
916 |
++ * release the RCU read lock before calling it. |
917 |
+ */ |
918 |
+ rcu_read_lock(); |
919 |
+ cpuset_for_each_child(sibling, pos_css, parent) { |
920 |
+@@ -1484,8 +1489,13 @@ static void update_sibling_cpumasks(struct cpuset *parent, struct cpuset *cs, |
921 |
+ continue; |
922 |
+ if (!sibling->use_parent_ecpus) |
923 |
+ continue; |
924 |
++ if (!css_tryget_online(&sibling->css)) |
925 |
++ continue; |
926 |
+ |
927 |
++ rcu_read_unlock(); |
928 |
+ update_cpumasks_hier(sibling, tmp); |
929 |
++ rcu_read_lock(); |
930 |
++ css_put(&sibling->css); |
931 |
+ } |
932 |
+ rcu_read_unlock(); |
933 |
+ } |
934 |
+diff --git a/mm/kmemleak.c b/mm/kmemleak.c |
935 |
+index 312942d784058..4a669c81f4e22 100644 |
936 |
+--- a/mm/kmemleak.c |
937 |
++++ b/mm/kmemleak.c |
938 |
+@@ -1399,7 +1399,8 @@ static void kmemleak_scan(void) |
939 |
+ { |
940 |
+ unsigned long flags; |
941 |
+ struct kmemleak_object *object; |
942 |
+- int i; |
943 |
++ struct zone *zone; |
944 |
++ int __maybe_unused i; |
945 |
+ int new_leaks = 0; |
946 |
+ |
947 |
+ jiffies_last_scan = jiffies; |
948 |
+@@ -1439,9 +1440,9 @@ static void kmemleak_scan(void) |
949 |
+ * Struct page scanning for each node. |
950 |
+ */ |
951 |
+ get_online_mems(); |
952 |
+- for_each_online_node(i) { |
953 |
+- unsigned long start_pfn = node_start_pfn(i); |
954 |
+- unsigned long end_pfn = node_end_pfn(i); |
955 |
++ for_each_populated_zone(zone) { |
956 |
++ unsigned long start_pfn = zone->zone_start_pfn; |
957 |
++ unsigned long end_pfn = zone_end_pfn(zone); |
958 |
+ unsigned long pfn; |
959 |
+ |
960 |
+ for (pfn = start_pfn; pfn < end_pfn; pfn++) { |
961 |
+@@ -1450,8 +1451,8 @@ static void kmemleak_scan(void) |
962 |
+ if (!page) |
963 |
+ continue; |
964 |
+ |
965 |
+- /* only scan pages belonging to this node */ |
966 |
+- if (page_to_nid(page) != i) |
967 |
++ /* only scan pages belonging to this zone */ |
968 |
++ if (page_zone(page) != zone) |
969 |
+ continue; |
970 |
+ /* only scan if page is in use */ |
971 |
+ if (page_count(page) == 0) |
972 |
+diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c |
973 |
+index b2ba1d2556f14..e0df892b5c370 100644 |
974 |
+--- a/net/ieee802154/nl802154.c |
975 |
++++ b/net/ieee802154/nl802154.c |
976 |
+@@ -1457,7 +1457,7 @@ static int nl802154_send_key(struct sk_buff *msg, u32 cmd, u32 portid, |
977 |
+ |
978 |
+ hdr = nl802154hdr_put(msg, portid, seq, flags, cmd); |
979 |
+ if (!hdr) |
980 |
+- return -1; |
981 |
++ return -ENOBUFS; |
982 |
+ |
983 |
+ if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) |
984 |
+ goto nla_put_failure; |
985 |
+@@ -1650,7 +1650,7 @@ static int nl802154_send_device(struct sk_buff *msg, u32 cmd, u32 portid, |
986 |
+ |
987 |
+ hdr = nl802154hdr_put(msg, portid, seq, flags, cmd); |
988 |
+ if (!hdr) |
989 |
+- return -1; |
990 |
++ return -ENOBUFS; |
991 |
+ |
992 |
+ if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) |
993 |
+ goto nla_put_failure; |
994 |
+@@ -1828,7 +1828,7 @@ static int nl802154_send_devkey(struct sk_buff *msg, u32 cmd, u32 portid, |
995 |
+ |
996 |
+ hdr = nl802154hdr_put(msg, portid, seq, flags, cmd); |
997 |
+ if (!hdr) |
998 |
+- return -1; |
999 |
++ return -ENOBUFS; |
1000 |
+ |
1001 |
+ if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) |
1002 |
+ goto nla_put_failure; |
1003 |
+@@ -2004,7 +2004,7 @@ static int nl802154_send_seclevel(struct sk_buff *msg, u32 cmd, u32 portid, |
1004 |
+ |
1005 |
+ hdr = nl802154hdr_put(msg, portid, seq, flags, cmd); |
1006 |
+ if (!hdr) |
1007 |
+- return -1; |
1008 |
++ return -ENOBUFS; |
1009 |
+ |
1010 |
+ if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) |
1011 |
+ goto nla_put_failure; |
1012 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
1013 |
+index d06205626cd54..c03448ea8a203 100644 |
1014 |
+--- a/sound/pci/hda/patch_realtek.c |
1015 |
++++ b/sound/pci/hda/patch_realtek.c |
1016 |
+@@ -2122,6 +2122,7 @@ static void alc1220_fixup_gb_x570(struct hda_codec *codec, |
1017 |
+ { |
1018 |
+ static const hda_nid_t conn1[] = { 0x0c }; |
1019 |
+ static const struct coef_fw gb_x570_coefs[] = { |
1020 |
++ WRITE_COEF(0x07, 0x03c0), |
1021 |
+ WRITE_COEF(0x1a, 0x01c1), |
1022 |
+ WRITE_COEF(0x1b, 0x0202), |
1023 |
+ WRITE_COEF(0x43, 0x3005), |
1024 |
+@@ -2548,7 +2549,8 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
1025 |
+ SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE), |
1026 |
+ SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), |
1027 |
+ SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570), |
1028 |
+- SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_CLEVO_P950), |
1029 |
++ SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_GB_X570), |
1030 |
++ SND_PCI_QUIRK(0x1458, 0xa0d5, "Gigabyte X570S Aorus Master", ALC1220_FIXUP_GB_X570), |
1031 |
+ SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950), |
1032 |
+ SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950), |
1033 |
+ SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950), |
1034 |
+@@ -2623,6 +2625,7 @@ static const struct hda_model_fixup alc882_fixup_models[] = { |
1035 |
+ {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, |
1036 |
+ {.id = ALC887_FIXUP_ASUS_BASS, .name = "asus-bass"}, |
1037 |
+ {.id = ALC1220_FIXUP_GB_DUAL_CODECS, .name = "dual-codecs"}, |
1038 |
++ {.id = ALC1220_FIXUP_GB_X570, .name = "gb-x570"}, |
1039 |
+ {.id = ALC1220_FIXUP_CLEVO_P950, .name = "clevo-p950"}, |
1040 |
+ {} |
1041 |
+ }; |
1042 |
+@@ -8180,6 +8183,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1043 |
+ SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS), |
1044 |
+ SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401), |
1045 |
+ SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), |
1046 |
++ SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), |
1047 |
+ SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), |
1048 |
+ SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), |
1049 |
+ SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), |
1050 |
+diff --git a/sound/soc/codecs/cpcap.c b/sound/soc/codecs/cpcap.c |
1051 |
+index 1902689c5ea2c..acd88fe38cd4c 100644 |
1052 |
+--- a/sound/soc/codecs/cpcap.c |
1053 |
++++ b/sound/soc/codecs/cpcap.c |
1054 |
+@@ -1541,6 +1541,8 @@ static int cpcap_codec_probe(struct platform_device *pdev) |
1055 |
+ { |
1056 |
+ struct device_node *codec_node = |
1057 |
+ of_get_child_by_name(pdev->dev.parent->of_node, "audio-codec"); |
1058 |
++ if (!codec_node) |
1059 |
++ return -ENODEV; |
1060 |
+ |
1061 |
+ pdev->dev.of_node = codec_node; |
1062 |
+ |
1063 |
+diff --git a/sound/soc/codecs/max9759.c b/sound/soc/codecs/max9759.c |
1064 |
+index 00e9d4fd1651f..0c261335c8a16 100644 |
1065 |
+--- a/sound/soc/codecs/max9759.c |
1066 |
++++ b/sound/soc/codecs/max9759.c |
1067 |
+@@ -64,7 +64,8 @@ static int speaker_gain_control_put(struct snd_kcontrol *kcontrol, |
1068 |
+ struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); |
1069 |
+ struct max9759 *priv = snd_soc_component_get_drvdata(c); |
1070 |
+ |
1071 |
+- if (ucontrol->value.integer.value[0] > 3) |
1072 |
++ if (ucontrol->value.integer.value[0] < 0 || |
1073 |
++ ucontrol->value.integer.value[0] > 3) |
1074 |
+ return -EINVAL; |
1075 |
+ |
1076 |
+ priv->gain = ucontrol->value.integer.value[0]; |
1077 |
+diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c |
1078 |
+index af3c3b90c0aca..83b4a22bf15ac 100644 |
1079 |
+--- a/sound/soc/fsl/pcm030-audio-fabric.c |
1080 |
++++ b/sound/soc/fsl/pcm030-audio-fabric.c |
1081 |
+@@ -93,16 +93,21 @@ static int pcm030_fabric_probe(struct platform_device *op) |
1082 |
+ dev_err(&op->dev, "platform_device_alloc() failed\n"); |
1083 |
+ |
1084 |
+ ret = platform_device_add(pdata->codec_device); |
1085 |
+- if (ret) |
1086 |
++ if (ret) { |
1087 |
+ dev_err(&op->dev, "platform_device_add() failed: %d\n", ret); |
1088 |
++ platform_device_put(pdata->codec_device); |
1089 |
++ } |
1090 |
+ |
1091 |
+ ret = snd_soc_register_card(card); |
1092 |
+- if (ret) |
1093 |
++ if (ret) { |
1094 |
+ dev_err(&op->dev, "snd_soc_register_card() failed: %d\n", ret); |
1095 |
++ platform_device_del(pdata->codec_device); |
1096 |
++ platform_device_put(pdata->codec_device); |
1097 |
++ } |
1098 |
+ |
1099 |
+ platform_set_drvdata(op, pdata); |
1100 |
+- |
1101 |
+ return ret; |
1102 |
++ |
1103 |
+ } |
1104 |
+ |
1105 |
+ static int pcm030_fabric_remove(struct platform_device *op) |
1106 |
+diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c |
1107 |
+index 95fc24580f85f..ef8fd331526b0 100644 |
1108 |
+--- a/sound/soc/soc-ops.c |
1109 |
++++ b/sound/soc/soc-ops.c |
1110 |
+@@ -322,13 +322,27 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, |
1111 |
+ if (sign_bit) |
1112 |
+ mask = BIT(sign_bit + 1) - 1; |
1113 |
+ |
1114 |
+- val = ((ucontrol->value.integer.value[0] + min) & mask); |
1115 |
++ val = ucontrol->value.integer.value[0]; |
1116 |
++ if (mc->platform_max && val > mc->platform_max) |
1117 |
++ return -EINVAL; |
1118 |
++ if (val > max - min) |
1119 |
++ return -EINVAL; |
1120 |
++ if (val < 0) |
1121 |
++ return -EINVAL; |
1122 |
++ val = (val + min) & mask; |
1123 |
+ if (invert) |
1124 |
+ val = max - val; |
1125 |
+ val_mask = mask << shift; |
1126 |
+ val = val << shift; |
1127 |
+ if (snd_soc_volsw_is_stereo(mc)) { |
1128 |
+- val2 = ((ucontrol->value.integer.value[1] + min) & mask); |
1129 |
++ val2 = ucontrol->value.integer.value[1]; |
1130 |
++ if (mc->platform_max && val2 > mc->platform_max) |
1131 |
++ return -EINVAL; |
1132 |
++ if (val2 > max - min) |
1133 |
++ return -EINVAL; |
1134 |
++ if (val2 < 0) |
1135 |
++ return -EINVAL; |
1136 |
++ val2 = (val2 + min) & mask; |
1137 |
+ if (invert) |
1138 |
+ val2 = max - val2; |
1139 |
+ if (reg == reg2) { |
1140 |
+@@ -422,8 +436,15 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, |
1141 |
+ int err = 0; |
1142 |
+ unsigned int val, val_mask, val2 = 0; |
1143 |
+ |
1144 |
++ val = ucontrol->value.integer.value[0]; |
1145 |
++ if (mc->platform_max && val > mc->platform_max) |
1146 |
++ return -EINVAL; |
1147 |
++ if (val > max - min) |
1148 |
++ return -EINVAL; |
1149 |
++ if (val < 0) |
1150 |
++ return -EINVAL; |
1151 |
+ val_mask = mask << shift; |
1152 |
+- val = (ucontrol->value.integer.value[0] + min) & mask; |
1153 |
++ val = (val + min) & mask; |
1154 |
+ val = val << shift; |
1155 |
+ |
1156 |
+ err = snd_soc_component_update_bits(component, reg, val_mask, val); |
1157 |
+@@ -889,6 +910,8 @@ int snd_soc_put_xr_sx(struct snd_kcontrol *kcontrol, |
1158 |
+ unsigned int i, regval, regmask; |
1159 |
+ int err; |
1160 |
+ |
1161 |
++ if (val < mc->min || val > mc->max) |
1162 |
++ return -EINVAL; |
1163 |
+ if (invert) |
1164 |
+ val = max - val; |
1165 |
+ val &= mask; |
1166 |
+diff --git a/sound/soc/xilinx/xlnx_formatter_pcm.c b/sound/soc/xilinx/xlnx_formatter_pcm.c |
1167 |
+index 1f15c11782ec4..4caee57114b88 100644 |
1168 |
+--- a/sound/soc/xilinx/xlnx_formatter_pcm.c |
1169 |
++++ b/sound/soc/xilinx/xlnx_formatter_pcm.c |
1170 |
+@@ -37,6 +37,7 @@ |
1171 |
+ #define XLNX_AUD_XFER_COUNT 0x28 |
1172 |
+ #define XLNX_AUD_CH_STS_START 0x2C |
1173 |
+ #define XLNX_BYTES_PER_CH 0x44 |
1174 |
++#define XLNX_AUD_ALIGN_BYTES 64 |
1175 |
+ |
1176 |
+ #define AUD_STS_IOC_IRQ_MASK BIT(31) |
1177 |
+ #define AUD_STS_CH_STS_MASK BIT(29) |
1178 |
+@@ -370,12 +371,32 @@ static int xlnx_formatter_pcm_open(struct snd_pcm_substream *substream) |
1179 |
+ snd_soc_set_runtime_hwparams(substream, &xlnx_pcm_hardware); |
1180 |
+ runtime->private_data = stream_data; |
1181 |
+ |
1182 |
+- /* Resize the period size divisible by 64 */ |
1183 |
++ /* Resize the period bytes as divisible by 64 */ |
1184 |
+ err = snd_pcm_hw_constraint_step(runtime, 0, |
1185 |
+- SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64); |
1186 |
++ SNDRV_PCM_HW_PARAM_PERIOD_BYTES, |
1187 |
++ XLNX_AUD_ALIGN_BYTES); |
1188 |
+ if (err) { |
1189 |
+ dev_err(component->dev, |
1190 |
+- "unable to set constraint on period bytes\n"); |
1191 |
++ "Unable to set constraint on period bytes\n"); |
1192 |
++ return err; |
1193 |
++ } |
1194 |
++ |
1195 |
++ /* Resize the buffer bytes as divisible by 64 */ |
1196 |
++ err = snd_pcm_hw_constraint_step(runtime, 0, |
1197 |
++ SNDRV_PCM_HW_PARAM_BUFFER_BYTES, |
1198 |
++ XLNX_AUD_ALIGN_BYTES); |
1199 |
++ if (err) { |
1200 |
++ dev_err(component->dev, |
1201 |
++ "Unable to set constraint on buffer bytes\n"); |
1202 |
++ return err; |
1203 |
++ } |
1204 |
++ |
1205 |
++ /* Set periods as integer multiple */ |
1206 |
++ err = snd_pcm_hw_constraint_integer(runtime, |
1207 |
++ SNDRV_PCM_HW_PARAM_PERIODS); |
1208 |
++ if (err < 0) { |
1209 |
++ dev_err(component->dev, |
1210 |
++ "Unable to set constraint on periods to be integer\n"); |
1211 |
+ return err; |
1212 |
+ } |
1213 |
+ |
1214 |
+diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h |
1215 |
+index 01dee2074ab36..c29ccdf9e8bca 100644 |
1216 |
+--- a/sound/usb/quirks-table.h |
1217 |
++++ b/sound/usb/quirks-table.h |
1218 |
+@@ -25,6 +25,16 @@ |
1219 |
+ .idProduct = prod, \ |
1220 |
+ .bInterfaceClass = USB_CLASS_VENDOR_SPEC |
1221 |
+ |
1222 |
++/* A standard entry matching with vid/pid and the audio class/subclass */ |
1223 |
++#define USB_AUDIO_DEVICE(vend, prod) \ |
1224 |
++ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ |
1225 |
++ USB_DEVICE_ID_MATCH_INT_CLASS | \ |
1226 |
++ USB_DEVICE_ID_MATCH_INT_SUBCLASS, \ |
1227 |
++ .idVendor = vend, \ |
1228 |
++ .idProduct = prod, \ |
1229 |
++ .bInterfaceClass = USB_CLASS_AUDIO, \ |
1230 |
++ .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL |
1231 |
++ |
1232 |
+ /* HP Thunderbolt Dock Audio Headset */ |
1233 |
+ { |
1234 |
+ USB_DEVICE(0x03f0, 0x0269), |
1235 |
+diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile |
1236 |
+index 12631f0076a10..11e157d7533b8 100644 |
1237 |
+--- a/tools/testing/selftests/futex/Makefile |
1238 |
++++ b/tools/testing/selftests/futex/Makefile |
1239 |
+@@ -11,7 +11,7 @@ all: |
1240 |
+ @for DIR in $(SUBDIRS); do \ |
1241 |
+ BUILD_TARGET=$(OUTPUT)/$$DIR; \ |
1242 |
+ mkdir $$BUILD_TARGET -p; \ |
1243 |
+- make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ |
1244 |
++ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ |
1245 |
+ if [ -e $$DIR/$(TEST_PROGS) ]; then \ |
1246 |
+ rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/; \ |
1247 |
+ fi \ |
1248 |
+@@ -32,6 +32,6 @@ override define CLEAN |
1249 |
+ @for DIR in $(SUBDIRS); do \ |
1250 |
+ BUILD_TARGET=$(OUTPUT)/$$DIR; \ |
1251 |
+ mkdir $$BUILD_TARGET -p; \ |
1252 |
+- make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ |
1253 |
++ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ |
1254 |
+ done |
1255 |
+ endef |