Magellan Linux

Annotation of /trunk/kernel-alx-legacy/patches-4.9/0172-4.9.73-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3608 - (hide annotations) (download)
Fri Aug 14 07:34:29 2020 UTC (3 years, 8 months ago) by niro
File size: 21881 byte(s)
-added kerenl-alx-legacy pkg
1 niro 3608 diff --git a/Makefile b/Makefile
2     index 78dde51d9d74..64eb0bf614ee 100644
3     --- a/Makefile
4     +++ b/Makefile
5     @@ -1,6 +1,6 @@
6     VERSION = 4
7     PATCHLEVEL = 9
8     -SUBLEVEL = 72
9     +SUBLEVEL = 73
10     EXTRAVERSION =
11     NAME = Roaring Lionus
12    
13     diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
14     index 72c27b8d2cf3..083f92746951 100644
15     --- a/arch/powerpc/perf/core-book3s.c
16     +++ b/arch/powerpc/perf/core-book3s.c
17     @@ -401,8 +401,12 @@ static __u64 power_pmu_bhrb_to(u64 addr)
18     int ret;
19     __u64 target;
20    
21     - if (is_kernel_addr(addr))
22     - return branch_target((unsigned int *)addr);
23     + if (is_kernel_addr(addr)) {
24     + if (probe_kernel_read(&instr, (void *)addr, sizeof(instr)))
25     + return 0;
26     +
27     + return branch_target(&instr);
28     + }
29    
30     /* Userspace: need copy instruction here then translate it */
31     pagefault_disable();
32     diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
33     index 72b737b8c9d6..c8f8dd8ca0a1 100644
34     --- a/arch/x86/kvm/emulate.c
35     +++ b/arch/x86/kvm/emulate.c
36     @@ -2395,9 +2395,21 @@ static int rsm_load_seg_64(struct x86_emulate_ctxt *ctxt, u64 smbase, int n)
37     }
38    
39     static int rsm_enter_protected_mode(struct x86_emulate_ctxt *ctxt,
40     - u64 cr0, u64 cr4)
41     + u64 cr0, u64 cr3, u64 cr4)
42     {
43     int bad;
44     + u64 pcid;
45     +
46     + /* In order to later set CR4.PCIDE, CR3[11:0] must be zero. */
47     + pcid = 0;
48     + if (cr4 & X86_CR4_PCIDE) {
49     + pcid = cr3 & 0xfff;
50     + cr3 &= ~0xfff;
51     + }
52     +
53     + bad = ctxt->ops->set_cr(ctxt, 3, cr3);
54     + if (bad)
55     + return X86EMUL_UNHANDLEABLE;
56    
57     /*
58     * First enable PAE, long mode needs it before CR0.PG = 1 is set.
59     @@ -2416,6 +2428,12 @@ static int rsm_enter_protected_mode(struct x86_emulate_ctxt *ctxt,
60     bad = ctxt->ops->set_cr(ctxt, 4, cr4);
61     if (bad)
62     return X86EMUL_UNHANDLEABLE;
63     + if (pcid) {
64     + bad = ctxt->ops->set_cr(ctxt, 3, cr3 | pcid);
65     + if (bad)
66     + return X86EMUL_UNHANDLEABLE;
67     + }
68     +
69     }
70    
71     return X86EMUL_CONTINUE;
72     @@ -2426,11 +2444,11 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt, u64 smbase)
73     struct desc_struct desc;
74     struct desc_ptr dt;
75     u16 selector;
76     - u32 val, cr0, cr4;
77     + u32 val, cr0, cr3, cr4;
78     int i;
79    
80     cr0 = GET_SMSTATE(u32, smbase, 0x7ffc);
81     - ctxt->ops->set_cr(ctxt, 3, GET_SMSTATE(u32, smbase, 0x7ff8));
82     + cr3 = GET_SMSTATE(u32, smbase, 0x7ff8);
83     ctxt->eflags = GET_SMSTATE(u32, smbase, 0x7ff4) | X86_EFLAGS_FIXED;
84     ctxt->_eip = GET_SMSTATE(u32, smbase, 0x7ff0);
85    
86     @@ -2472,14 +2490,14 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt, u64 smbase)
87    
88     ctxt->ops->set_smbase(ctxt, GET_SMSTATE(u32, smbase, 0x7ef8));
89    
90     - return rsm_enter_protected_mode(ctxt, cr0, cr4);
91     + return rsm_enter_protected_mode(ctxt, cr0, cr3, cr4);
92     }
93    
94     static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase)
95     {
96     struct desc_struct desc;
97     struct desc_ptr dt;
98     - u64 val, cr0, cr4;
99     + u64 val, cr0, cr3, cr4;
100     u32 base3;
101     u16 selector;
102     int i, r;
103     @@ -2496,7 +2514,7 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase)
104     ctxt->ops->set_dr(ctxt, 7, (val & DR7_VOLATILE) | DR7_FIXED_1);
105    
106     cr0 = GET_SMSTATE(u64, smbase, 0x7f58);
107     - ctxt->ops->set_cr(ctxt, 3, GET_SMSTATE(u64, smbase, 0x7f50));
108     + cr3 = GET_SMSTATE(u64, smbase, 0x7f50);
109     cr4 = GET_SMSTATE(u64, smbase, 0x7f48);
110     ctxt->ops->set_smbase(ctxt, GET_SMSTATE(u32, smbase, 0x7f00));
111     val = GET_SMSTATE(u64, smbase, 0x7ed0);
112     @@ -2524,7 +2542,7 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase)
113     dt.address = GET_SMSTATE(u64, smbase, 0x7e68);
114     ctxt->ops->set_gdt(ctxt, &dt);
115    
116     - r = rsm_enter_protected_mode(ctxt, cr0, cr4);
117     + r = rsm_enter_protected_mode(ctxt, cr0, cr3, cr4);
118     if (r != X86EMUL_CONTINUE)
119     return r;
120    
121     diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
122     index f4d893713d54..7e28e6c877d9 100644
123     --- a/arch/x86/kvm/x86.c
124     +++ b/arch/x86/kvm/x86.c
125     @@ -7132,7 +7132,7 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
126     #endif
127    
128     kvm_rip_write(vcpu, regs->rip);
129     - kvm_set_rflags(vcpu, regs->rflags);
130     + kvm_set_rflags(vcpu, regs->rflags | X86_EFLAGS_FIXED);
131    
132     vcpu->arch.exception.pending = false;
133    
134     diff --git a/crypto/mcryptd.c b/crypto/mcryptd.c
135     index c207458d6299..a14100e74754 100644
136     --- a/crypto/mcryptd.c
137     +++ b/crypto/mcryptd.c
138     @@ -80,6 +80,7 @@ static int mcryptd_init_queue(struct mcryptd_queue *queue,
139     pr_debug("cpu_queue #%d %p\n", cpu, queue->cpu_queue);
140     crypto_init_queue(&cpu_queue->queue, max_cpu_qlen);
141     INIT_WORK(&cpu_queue->work, mcryptd_queue_worker);
142     + spin_lock_init(&cpu_queue->q_lock);
143     }
144     return 0;
145     }
146     @@ -103,15 +104,16 @@ static int mcryptd_enqueue_request(struct mcryptd_queue *queue,
147     int cpu, err;
148     struct mcryptd_cpu_queue *cpu_queue;
149    
150     - cpu = get_cpu();
151     - cpu_queue = this_cpu_ptr(queue->cpu_queue);
152     - rctx->tag.cpu = cpu;
153     + cpu_queue = raw_cpu_ptr(queue->cpu_queue);
154     + spin_lock(&cpu_queue->q_lock);
155     + cpu = smp_processor_id();
156     + rctx->tag.cpu = smp_processor_id();
157    
158     err = crypto_enqueue_request(&cpu_queue->queue, request);
159     pr_debug("enqueue request: cpu %d cpu_queue %p request %p\n",
160     cpu, cpu_queue, request);
161     + spin_unlock(&cpu_queue->q_lock);
162     queue_work_on(cpu, kcrypto_wq, &cpu_queue->work);
163     - put_cpu();
164    
165     return err;
166     }
167     @@ -160,16 +162,11 @@ static void mcryptd_queue_worker(struct work_struct *work)
168     cpu_queue = container_of(work, struct mcryptd_cpu_queue, work);
169     i = 0;
170     while (i < MCRYPTD_BATCH || single_task_running()) {
171     - /*
172     - * preempt_disable/enable is used to prevent
173     - * being preempted by mcryptd_enqueue_request()
174     - */
175     - local_bh_disable();
176     - preempt_disable();
177     +
178     + spin_lock_bh(&cpu_queue->q_lock);
179     backlog = crypto_get_backlog(&cpu_queue->queue);
180     req = crypto_dequeue_request(&cpu_queue->queue);
181     - preempt_enable();
182     - local_bh_enable();
183     + spin_unlock_bh(&cpu_queue->q_lock);
184    
185     if (!req) {
186     mcryptd_opportunistic_flush();
187     @@ -184,7 +181,7 @@ static void mcryptd_queue_worker(struct work_struct *work)
188     ++i;
189     }
190     if (cpu_queue->queue.qlen)
191     - queue_work(kcrypto_wq, &cpu_queue->work);
192     + queue_work_on(smp_processor_id(), kcrypto_wq, &cpu_queue->work);
193     }
194    
195     void mcryptd_flusher(struct work_struct *__work)
196     diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
197     index ec4f507b524f..4558cc73abf3 100644
198     --- a/drivers/acpi/apei/erst.c
199     +++ b/drivers/acpi/apei/erst.c
200     @@ -1020,7 +1020,7 @@ static ssize_t erst_reader(u64 *id, enum pstore_type_id *type, int *count,
201     /* The record may be cleared by others, try read next record */
202     if (len == -ENOENT)
203     goto skip;
204     - else if (len < sizeof(*rcd)) {
205     + else if (len < 0 || len < sizeof(*rcd)) {
206     rc = -EIO;
207     goto out;
208     }
209     diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
210     index f3bc901ac930..fe03d00de22b 100644
211     --- a/drivers/acpi/nfit/core.c
212     +++ b/drivers/acpi/nfit/core.c
213     @@ -1390,6 +1390,11 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
214     dev_name(&adev_dimm->dev));
215     return -ENXIO;
216     }
217     + /*
218     + * Record nfit_mem for the notification path to track back to
219     + * the nfit sysfs attributes for this dimm device object.
220     + */
221     + dev_set_drvdata(&adev_dimm->dev, nfit_mem);
222    
223     /*
224     * Until standardization materializes we need to consider 4
225     @@ -1446,9 +1451,11 @@ static void shutdown_dimm_notify(void *data)
226     sysfs_put(nfit_mem->flags_attr);
227     nfit_mem->flags_attr = NULL;
228     }
229     - if (adev_dimm)
230     + if (adev_dimm) {
231     acpi_remove_notify_handler(adev_dimm->handle,
232     ACPI_DEVICE_NOTIFY, acpi_nvdimm_notify);
233     + dev_set_drvdata(&adev_dimm->dev, NULL);
234     + }
235     }
236     mutex_unlock(&acpi_desc->init_mutex);
237     }
238     diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c b/drivers/clk/sunxi/clk-sun9i-mmc.c
239     index 6041bdba2e97..f69f9e8c6f38 100644
240     --- a/drivers/clk/sunxi/clk-sun9i-mmc.c
241     +++ b/drivers/clk/sunxi/clk-sun9i-mmc.c
242     @@ -16,6 +16,7 @@
243    
244     #include <linux/clk.h>
245     #include <linux/clk-provider.h>
246     +#include <linux/delay.h>
247     #include <linux/init.h>
248     #include <linux/of.h>
249     #include <linux/of_device.h>
250     @@ -83,9 +84,20 @@ static int sun9i_mmc_reset_deassert(struct reset_controller_dev *rcdev,
251     return 0;
252     }
253    
254     +static int sun9i_mmc_reset_reset(struct reset_controller_dev *rcdev,
255     + unsigned long id)
256     +{
257     + sun9i_mmc_reset_assert(rcdev, id);
258     + udelay(10);
259     + sun9i_mmc_reset_deassert(rcdev, id);
260     +
261     + return 0;
262     +}
263     +
264     static const struct reset_control_ops sun9i_mmc_reset_ops = {
265     .assert = sun9i_mmc_reset_assert,
266     .deassert = sun9i_mmc_reset_deassert,
267     + .reset = sun9i_mmc_reset_reset,
268     };
269    
270     static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
271     diff --git a/drivers/mfd/cros_ec_spi.c b/drivers/mfd/cros_ec_spi.c
272     index a518832ed5f5..59dbdaa24c28 100644
273     --- a/drivers/mfd/cros_ec_spi.c
274     +++ b/drivers/mfd/cros_ec_spi.c
275     @@ -664,6 +664,7 @@ static int cros_ec_spi_probe(struct spi_device *spi)
276     sizeof(struct ec_response_get_protocol_info);
277     ec_dev->dout_size = sizeof(struct ec_host_request);
278    
279     + ec_spi->last_transfer_ns = ktime_get_ns();
280    
281     err = cros_ec_register(ec_dev);
282     if (err) {
283     diff --git a/drivers/mfd/twl4030-audio.c b/drivers/mfd/twl4030-audio.c
284     index 0a1606480023..cc832d309599 100644
285     --- a/drivers/mfd/twl4030-audio.c
286     +++ b/drivers/mfd/twl4030-audio.c
287     @@ -159,13 +159,18 @@ unsigned int twl4030_audio_get_mclk(void)
288     EXPORT_SYMBOL_GPL(twl4030_audio_get_mclk);
289    
290     static bool twl4030_audio_has_codec(struct twl4030_audio_data *pdata,
291     - struct device_node *node)
292     + struct device_node *parent)
293     {
294     + struct device_node *node;
295     +
296     if (pdata && pdata->codec)
297     return true;
298    
299     - if (of_find_node_by_name(node, "codec"))
300     + node = of_get_child_by_name(parent, "codec");
301     + if (node) {
302     + of_node_put(node);
303     return true;
304     + }
305    
306     return false;
307     }
308     diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
309     index d66502d36ba0..dd19f17a1b63 100644
310     --- a/drivers/mfd/twl6040.c
311     +++ b/drivers/mfd/twl6040.c
312     @@ -97,12 +97,16 @@ static struct reg_sequence twl6040_patch[] = {
313     };
314    
315    
316     -static bool twl6040_has_vibra(struct device_node *node)
317     +static bool twl6040_has_vibra(struct device_node *parent)
318     {
319     -#ifdef CONFIG_OF
320     - if (of_find_node_by_name(node, "vibra"))
321     + struct device_node *node;
322     +
323     + node = of_get_child_by_name(parent, "vibra");
324     + if (node) {
325     + of_node_put(node);
326     return true;
327     -#endif
328     + }
329     +
330     return false;
331     }
332    
333     diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
334     index 6ea10a9f33e8..fa463268d019 100644
335     --- a/drivers/net/ethernet/marvell/mvneta.c
336     +++ b/drivers/net/ethernet/marvell/mvneta.c
337     @@ -1182,6 +1182,10 @@ static void mvneta_port_disable(struct mvneta_port *pp)
338     val &= ~MVNETA_GMAC0_PORT_ENABLE;
339     mvreg_write(pp, MVNETA_GMAC_CTRL_0, val);
340    
341     + pp->link = 0;
342     + pp->duplex = -1;
343     + pp->speed = 0;
344     +
345     udelay(200);
346     }
347    
348     @@ -1905,9 +1909,9 @@ static int mvneta_rx_swbm(struct mvneta_port *pp, int rx_todo,
349    
350     if (!mvneta_rxq_desc_is_first_last(rx_status) ||
351     (rx_status & MVNETA_RXD_ERR_SUMMARY)) {
352     + mvneta_rx_error(pp, rx_desc);
353     err_drop_frame:
354     dev->stats.rx_errors++;
355     - mvneta_rx_error(pp, rx_desc);
356     /* leave the descriptor untouched */
357     continue;
358     }
359     @@ -2922,7 +2926,7 @@ static void mvneta_cleanup_rxqs(struct mvneta_port *pp)
360     {
361     int queue;
362    
363     - for (queue = 0; queue < txq_number; queue++)
364     + for (queue = 0; queue < rxq_number; queue++)
365     mvneta_rxq_deinit(pp, &pp->rxqs[queue]);
366     }
367    
368     diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
369     index 71eb6c637b60..42abdd2391c9 100644
370     --- a/drivers/nvdimm/pfn_devs.c
371     +++ b/drivers/nvdimm/pfn_devs.c
372     @@ -352,9 +352,9 @@ struct device *nd_pfn_create(struct nd_region *nd_region)
373     int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
374     {
375     u64 checksum, offset;
376     - unsigned long align;
377     enum nd_pfn_mode mode;
378     struct nd_namespace_io *nsio;
379     + unsigned long align, start_pad;
380     struct nd_pfn_sb *pfn_sb = nd_pfn->pfn_sb;
381     struct nd_namespace_common *ndns = nd_pfn->ndns;
382     const u8 *parent_uuid = nd_dev_to_uuid(&ndns->dev);
383     @@ -398,6 +398,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
384    
385     align = le32_to_cpu(pfn_sb->align);
386     offset = le64_to_cpu(pfn_sb->dataoff);
387     + start_pad = le32_to_cpu(pfn_sb->start_pad);
388     if (align == 0)
389     align = 1UL << ilog2(offset);
390     mode = le32_to_cpu(pfn_sb->mode);
391     @@ -456,7 +457,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
392     return -EBUSY;
393     }
394    
395     - if ((align && !IS_ALIGNED(offset, align))
396     + if ((align && !IS_ALIGNED(nsio->res.start + offset + start_pad, align))
397     || !IS_ALIGNED(offset, PAGE_SIZE)) {
398     dev_err(&nd_pfn->dev,
399     "bad offset: %#llx dax disabled align: %#lx\n",
400     diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
401     index bc286cbbbc9b..1cced1d039d7 100644
402     --- a/drivers/parisc/lba_pci.c
403     +++ b/drivers/parisc/lba_pci.c
404     @@ -1656,3 +1656,36 @@ void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask)
405     iounmap(base_addr);
406     }
407    
408     +
409     +/*
410     + * The design of the Diva management card in rp34x0 machines (rp3410, rp3440)
411     + * seems rushed, so that many built-in components simply don't work.
412     + * The following quirks disable the serial AUX port and the built-in ATI RV100
413     + * Radeon 7000 graphics card which both don't have any external connectors and
414     + * thus are useless, and even worse, e.g. the AUX port occupies ttyS0 and as
415     + * such makes those machines the only PARISC machines on which we can't use
416     + * ttyS0 as boot console.
417     + */
418     +static void quirk_diva_ati_card(struct pci_dev *dev)
419     +{
420     + if (dev->subsystem_vendor != PCI_VENDOR_ID_HP ||
421     + dev->subsystem_device != 0x1292)
422     + return;
423     +
424     + dev_info(&dev->dev, "Hiding Diva built-in ATI card");
425     + dev->device = 0;
426     +}
427     +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RADEON_QY,
428     + quirk_diva_ati_card);
429     +
430     +static void quirk_diva_aux_disable(struct pci_dev *dev)
431     +{
432     + if (dev->subsystem_vendor != PCI_VENDOR_ID_HP ||
433     + dev->subsystem_device != 0x1291)
434     + return;
435     +
436     + dev_info(&dev->dev, "Hiding Diva built-in AUX serial device");
437     + dev->device = 0;
438     +}
439     +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX,
440     + quirk_diva_aux_disable);
441     diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
442     index 8a68e2b554e1..802997e2ddcc 100644
443     --- a/drivers/pci/pci-driver.c
444     +++ b/drivers/pci/pci-driver.c
445     @@ -953,7 +953,12 @@ static int pci_pm_thaw_noirq(struct device *dev)
446     if (pci_has_legacy_pm_support(pci_dev))
447     return pci_legacy_resume_early(dev);
448    
449     - pci_update_current_state(pci_dev, PCI_D0);
450     + /*
451     + * pci_restore_state() requires the device to be in D0 (because of MSI
452     + * restoration among other things), so force it into D0 in case the
453     + * driver's "freeze" callbacks put it into a low-power state directly.
454     + */
455     + pci_set_power_state(pci_dev, PCI_D0);
456     pci_restore_state(pci_dev);
457    
458     if (drv && drv->pm && drv->pm->thaw_noirq)
459     diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
460     index 0d34d8a4ab14..e8c08eb97530 100644
461     --- a/drivers/pinctrl/intel/pinctrl-cherryview.c
462     +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
463     @@ -1594,6 +1594,22 @@ static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)
464     clear_bit(i, chip->irq_valid_mask);
465     }
466    
467     + /*
468     + * The same set of machines in chv_no_valid_mask[] have incorrectly
469     + * configured GPIOs that generate spurious interrupts so we use
470     + * this same list to apply another quirk for them.
471     + *
472     + * See also https://bugzilla.kernel.org/show_bug.cgi?id=197953.
473     + */
474     + if (!need_valid_mask) {
475     + /*
476     + * Mask all interrupts the community is able to generate
477     + * but leave the ones that can only generate GPEs unmasked.
478     + */
479     + chv_writel(GENMASK(31, pctrl->community->nirqs),
480     + pctrl->regs + CHV_INTMASK);
481     + }
482     +
483     /* Clear all interrupts */
484     chv_writel(0xffff, pctrl->regs + CHV_INTSTAT);
485    
486     diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
487     index bc7100b93dfc..e0b9fe1d0e37 100644
488     --- a/drivers/spi/spi-xilinx.c
489     +++ b/drivers/spi/spi-xilinx.c
490     @@ -271,6 +271,7 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
491     while (remaining_words) {
492     int n_words, tx_words, rx_words;
493     u32 sr;
494     + int stalled;
495    
496     n_words = min(remaining_words, xspi->buffer_size);
497    
498     @@ -299,7 +300,17 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
499    
500     /* Read out all the data from the Rx FIFO */
501     rx_words = n_words;
502     + stalled = 10;
503     while (rx_words) {
504     + if (rx_words == n_words && !(stalled--) &&
505     + !(sr & XSPI_SR_TX_EMPTY_MASK) &&
506     + (sr & XSPI_SR_RX_EMPTY_MASK)) {
507     + dev_err(&spi->dev,
508     + "Detected stall. Check C_SPI_MODE and C_SPI_MEMORY\n");
509     + xspi_init_hw(xspi);
510     + return -EIO;
511     + }
512     +
513     if ((sr & XSPI_SR_TX_EMPTY_MASK) && (rx_words > 1)) {
514     xilinx_spi_rx(xspi);
515     rx_words--;
516     diff --git a/include/crypto/mcryptd.h b/include/crypto/mcryptd.h
517     index 4a53c0d38cd2..e045722a69aa 100644
518     --- a/include/crypto/mcryptd.h
519     +++ b/include/crypto/mcryptd.h
520     @@ -26,6 +26,7 @@ static inline struct mcryptd_ahash *__mcryptd_ahash_cast(
521    
522     struct mcryptd_cpu_queue {
523     struct crypto_queue queue;
524     + spinlock_t q_lock;
525     struct work_struct work;
526     };
527    
528     diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
529     index 8b1ebe4c6aba..d7eeebfafe8d 100644
530     --- a/kernel/bpf/verifier.c
531     +++ b/kernel/bpf/verifier.c
532     @@ -2722,11 +2722,12 @@ static bool states_equal(struct bpf_verifier_env *env,
533    
534     /* If we didn't map access then again we don't care about the
535     * mismatched range values and it's ok if our old type was
536     - * UNKNOWN and we didn't go to a NOT_INIT'ed reg.
537     + * UNKNOWN and we didn't go to a NOT_INIT'ed or pointer reg.
538     */
539     if (rold->type == NOT_INIT ||
540     (!varlen_map_access && rold->type == UNKNOWN_VALUE &&
541     - rcur->type != NOT_INIT))
542     + rcur->type != NOT_INIT &&
543     + !__is_pointer_value(env->allow_ptr_leaks, rcur)))
544     continue;
545    
546     /* Don't care about the reg->id in this case. */
547     diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
548     index b450a27588c8..16f8124b1150 100644
549     --- a/sound/core/rawmidi.c
550     +++ b/sound/core/rawmidi.c
551     @@ -579,15 +579,14 @@ static int snd_rawmidi_info_user(struct snd_rawmidi_substream *substream,
552     return 0;
553     }
554    
555     -int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info)
556     +static int __snd_rawmidi_info_select(struct snd_card *card,
557     + struct snd_rawmidi_info *info)
558     {
559     struct snd_rawmidi *rmidi;
560     struct snd_rawmidi_str *pstr;
561     struct snd_rawmidi_substream *substream;
562    
563     - mutex_lock(&register_mutex);
564     rmidi = snd_rawmidi_search(card, info->device);
565     - mutex_unlock(&register_mutex);
566     if (!rmidi)
567     return -ENXIO;
568     if (info->stream < 0 || info->stream > 1)
569     @@ -603,6 +602,16 @@ int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info
570     }
571     return -ENXIO;
572     }
573     +
574     +int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info)
575     +{
576     + int ret;
577     +
578     + mutex_lock(&register_mutex);
579     + ret = __snd_rawmidi_info_select(card, info);
580     + mutex_unlock(&register_mutex);
581     + return ret;
582     +}
583     EXPORT_SYMBOL(snd_rawmidi_info_select);
584    
585     static int snd_rawmidi_info_select_user(struct snd_card *card,
586     diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
587     index 24c897f0b571..08015c139116 100644
588     --- a/sound/usb/mixer.c
589     +++ b/sound/usb/mixer.c
590     @@ -2167,20 +2167,25 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid,
591     kctl->private_value = (unsigned long)namelist;
592     kctl->private_free = usb_mixer_selector_elem_free;
593    
594     - nameid = uac_selector_unit_iSelector(desc);
595     + /* check the static mapping table at first */
596     len = check_mapped_name(map, kctl->id.name, sizeof(kctl->id.name));
597     - if (len)
598     - ;
599     - else if (nameid)
600     - len = snd_usb_copy_string_desc(state, nameid, kctl->id.name,
601     - sizeof(kctl->id.name));
602     - else
603     - len = get_term_name(state, &state->oterm,
604     - kctl->id.name, sizeof(kctl->id.name), 0);
605     -
606     if (!len) {
607     - strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name));
608     + /* no mapping ? */
609     + /* if iSelector is given, use it */
610     + nameid = uac_selector_unit_iSelector(desc);
611     + if (nameid)
612     + len = snd_usb_copy_string_desc(state, nameid,
613     + kctl->id.name,
614     + sizeof(kctl->id.name));
615     + /* ... or pick up the terminal name at next */
616     + if (!len)
617     + len = get_term_name(state, &state->oterm,
618     + kctl->id.name, sizeof(kctl->id.name), 0);
619     + /* ... or use the fixed string "USB" as the last resort */
620     + if (!len)
621     + strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name));
622    
623     + /* and add the proper suffix */
624     if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR)
625     append_ctl_name(kctl, " Clock Source");
626     else if ((state->oterm.type & 0xff00) == 0x0100)
627     diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
628     index 7613b9e07b5c..1cd7f8b0bf77 100644
629     --- a/sound/usb/quirks.c
630     +++ b/sound/usb/quirks.c
631     @@ -1170,10 +1170,11 @@ static bool is_marantz_denon_dac(unsigned int id)
632     /* TEAC UD-501/UD-503/NT-503 USB DACs need a vendor cmd to switch
633     * between PCM/DOP and native DSD mode
634     */
635     -static bool is_teac_50X_dac(unsigned int id)
636     +static bool is_teac_dsd_dac(unsigned int id)
637     {
638     switch (id) {
639     case USB_ID(0x0644, 0x8043): /* TEAC UD-501/UD-503/NT-503 */
640     + case USB_ID(0x0644, 0x8044): /* Esoteric D-05X */
641     return true;
642     }
643     return false;
644     @@ -1206,7 +1207,7 @@ int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
645     break;
646     }
647     mdelay(20);
648     - } else if (is_teac_50X_dac(subs->stream->chip->usb_id)) {
649     + } else if (is_teac_dsd_dac(subs->stream->chip->usb_id)) {
650     /* Vendor mode switch cmd is required. */
651     switch (fmt->altsetting) {
652     case 3: /* DSD mode (DSD_U32) requested */
653     @@ -1376,7 +1377,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
654     }
655    
656     /* TEAC devices with USB DAC functionality */
657     - if (is_teac_50X_dac(chip->usb_id)) {
658     + if (is_teac_dsd_dac(chip->usb_id)) {
659     if (fp->altsetting == 3)
660     return SNDRV_PCM_FMTBIT_DSD_U32_BE;
661     }