5.15.5-rc1 review
Subsystems (11)
Greg Kroah-Hartman
maintainerPATCH 57/279 ALSA: ISA: not for M68K
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit 3c05f1477e62ea5a0a8797ba6a545b1dc751fb31 ]
On m68k, compiling drivers under SND_ISA causes build errors:
../sound/core/isadma.c: In function 'snd_dma_program':../sound/core/isadma.c:33:17: error: implicit declaration of function 'claim_dma_lock' [-Werror=implicit-function-declaration]
33 | flags = claim_dma_lock();
| ^~~~~~~~~~~~~~
../sound/core/isadma.c:41:9: error: implicit declaration of function 'release_dma_lock' [-Werror=implicit-function-declaration]
41 | release_dma_lock(flags);
| ^~~~~~~~~~~~~~~~../sound/isa/sb/sb16_main.c: In function 'snd_sb16_playback_prepare':../sound/isa/sb/sb16_main.c:253:72: error: 'DMA_AUTOINIT' undeclared (first use in this function)
253 | snd_dma_program(dma, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT);
| ^~~~~~~~~~~~../sound/isa/sb/sb16_main.c:253:72: note: each undeclared identifier is reported only once for each function it appears in ../sound/isa/sb/sb16_main.c: In function 'snd_sb16_capture_prepare':../sound/isa/sb/sb16_main.c:322:71: error: 'DMA_AUTOINIT' undeclared (first use in this function)
322 | snd_dma_program(dma, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT);
| ^~~~~~~~~~~~
and more...
--- sound/core/Makefile | 2 ++ sound/isa/Kconfig | 2 +- sound/pci/Kconfig | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
sound/core/Makefile +2 -0
@@ -9,7 +9,9 @@ ifneq ($(CONFIG_SND_PROC_FS),) snd-y += info.o snd-$(CONFIG_SND_OSSEMUL) += info_oss.o endif +ifneq ($(CONFIG_M68K),y) snd-$(CONFIG_ISA_DMA_API) += isadma.o +endif snd-$(CONFIG_SND_OSSEMUL) += sound_oss.o snd-$(CONFIG_SND_VMASTER) += vmaster.o snd-$(CONFIG_SND_JACK) += ctljack.o jack.o
sound/isa/Kconfig +1 -1
@@ -22,7 +22,7 @@ config SND_SB16_DSP menuconfig SND_ISA bool "ISA sound devices" depends on ISA || COMPILE_TEST - depends on ISA_DMA_API + depends on ISA_DMA_API && !M68K default y help Support for sound devices connected via the ISA bus.
sound/pci/Kconfig +1 -0
@@ -279,6 +279,7 @@ config SND_CS46XX_NEW_DSP config SND_CS5530 tristate "CS5530 Audio" depends on ISA_DMA_API && (X86_32 || COMPILE_TEST) + depends on !M68K select SND_SB16_DSP help Say Y here to include support for audio on Cyrix/NatSemi CS5530 chips.
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 226/279 drm/cma-helper: Release non-coherent memory with dma_free_noncoherent()
In reply to Greg Kroah-HartmanFrom: Thomas Zimmermann <[email protected]>
commit 995f54ea962e03ec08b8bc6a4fe11a32b420edd3 upstream.
The GEM CMA helpers allocate non-coherent (i.e., cached) backing storage with dma_alloc_noncoherent(), but release it with dma_free_wc(). Fix this with a call to dma_free_noncoherent(). Writecombining storage is still released with dma_free_wc().
--- drivers/gpu/drm/drm_gem_cma_helper.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_gem_cma_helper.c +7 -2
@@ -210,8 +210,13 @@ void drm_gem_cma_free_object(struct drm_dma_buf_vunmap (gem_obj->import_attach->dmabuf, &map);drm_prime_gem_destroy (gem_obj, cma_obj->sgt); }else if (cma_obj->vaddr) { -dma_free_wc (gem_obj->dev->dev, cma_obj->base.size, - cma_obj->vaddr, cma_obj->paddr); +if (cma_obj->map_noncoherent) +dma_free_noncoherent (gem_obj->dev->dev, cma_obj->base.size, + cma_obj->vaddr, cma_obj->paddr, +DMA_TO_DEVICE ); +else +dma_free_wc (gem_obj->dev->dev, cma_obj->base.size, + cma_obj->vaddr, cma_obj->paddr); }drm_gem_object_release (gem_obj);
Greg Kroah-Hartman
maintainerPATCH 247/279 drm/prime: Fix use after free in mmap with drm_gem_ttm_mmap
In reply to Greg Kroah-HartmanFrom: Anand K Mistry <[email protected]>
commit 8244a3bc27b3efd057da154b8d7e414670d5044f upstream.
drm_gem_ttm_mmap() drops a reference to the gem object on success. If the gem object's refcount == 1 on entry to drm_gem_prime_mmap(), that drop will free the gem object, and the subsequent drm_gem_object_get() will be a UAF. Fix by grabbing a reference before calling the mmap helper.
This issue was forseen when the reference dropping was adding in commit 9786b65bc61ac ("drm/ttm: fix mmap refcounting"):
"For that to work properly the drm_gem_object_get() call in drm_gem_ttm_mmap() must be moved so it happens before calling obj->funcs->mmap(), otherwise the gem refcount would go down to zero."
--- drivers/gpu/drm/drm_prime.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_prime.c +4 -2
@@ -719,11 +719,13 @@ int drm_gem_prime_mmap(struct drm_gem_obif (obj->funcs && obj->funcs->mmap) { vma->vm_ops = obj->funcs->vm_ops; +drm_gem_object_get (obj); ret = obj->funcs->mmap (obj, vma); -if (ret) +if (ret) { +drm_gem_object_put (obj);return ret; + } vma->vm_private_data = obj; -drm_gem_object_get (obj);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 258/279 signal/powerpc: On swapcontext failure force SIGSEGV
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
commit 83a1f27ad773b1d8f0460d3a676114c7651918cc upstream.
If the register state may be partial and corrupted instead of calling do_exit, call force_sigsegv(SIGSEGV). Which properly kills the process with SIGSEGV and does not let any more userspace code execute, instead of just killing one thread of the process and potentially confusing everything.
Cc: Michael Ellerman <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: [email protected]
History-tree: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
--- arch/powerpc/kernel/signal_32.c | 6 ++++-- arch/powerpc/kernel/signal_64.c | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-)
arch/powerpc/kernel/signal_32.c +4 -2
@@ -1062,8 +1062,10 @@ SYSCALL_DEFINE3(swapcontext, struct ucon* or if another thread unmaps the region containing the context. * We kill the task with a SIGSEGV in this situation. */ -if (do_setcontext (new_ctx, regs,0 )) -do_exit (SIGSEGV ); +if (do_setcontext (new_ctx, regs,0 )) { +force_sigsegv (SIGSEGV ); +return -EFAULT ; + }set_thread_flag (TIF_RESTOREALL );return 0 ;
arch/powerpc/kernel/signal_64.c +6 -3
@@ -703,15 +703,18 @@ SYSCALL_DEFINE3(swapcontext, struct ucon* We kill the task with a SIGSEGV in this situation. */ -if (__get_user_sigset (&set, &new_ctx->uc_sigmask)) -do_exit (SIGSEGV ); +if (__get_user_sigset (&set, &new_ctx->uc_sigmask)) { +force_sigsegv (SIGSEGV ); +return -EFAULT ; + }set_current_blocked (&set);if (!user_read_access_begin (new_ctx, ctx_size))return -EFAULT ;if (__unsafe_restore_sigcontext (current,NULL ,0 , &new_ctx->uc_mcontext)) {user_read_access_end (); -do_exit (SIGSEGV ); +force_sigsegv (SIGSEGV ); +return -EFAULT ; }user_read_access_end ();
Greg Kroah-Hartman
maintainerPATCH 10/279 ARM: dts: NSP: Fix mpcore, mmc node names
In reply to Greg Kroah-HartmanFrom: Matthew Hagan <[email protected]>
[ Upstream commit 15a563d008ef9d04df525f0c476cd7d7127bb883 ]
Running dtbs_check yielded the issues with bcm-nsp.dtsi.
Firstly this patch fixes the following message by appending "-bus" to
the mpcore node name:
mpcore@19000000: $nodename:0: 'mpcore@19000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
Secondly mmc node name. The label name can remain as is. sdhci@21000: $nodename:0: 'sdhci@21000' does not match '^mmc(@.*)?$'
--- arch/arm/boot/dts/bcm-nsp.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/bcm-nsp.dtsi +2 -2
@@ -77,7 +77,7 @@ interrupt-affinity = <&cpu0>, <&cpu1>; }; - mpcore@19000000 { + mpcore-bus@19000000 { compatible = "simple-bus"; ranges = <0x00000000 0x19000000 0x00023000>; #address-cells = <1>;
@@ -219,7 +219,7 @@ status = "disabled"; }; - sdio: sdhci@21000 { + sdio: mmc@21000 { compatible = "brcm,sdhci-iproc-cygnus"; reg = <0x21000 0x100>; interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 11/279 arm64: dts: broadcom: bcm4908: Move reboot syscon out of bus
In reply to Greg Kroah-HartmanFrom: Rafał Miłecki <[email protected]>
[ Upstream commit 6cf9f70255b90b540b9cbde062f18fea29024a75 ]
This fixes following error for every bcm4908 DTS file:
bus@ff800000: reboot: {'type': 'object'} is not allowed for {'compatible': ['syscon-reboot'], 'regmap': [[15]], 'offset': [[52]], 'mask': [[1]]}
--- arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +6 -6
@@ -326,12 +326,12 @@ #reset-cells = <1>; }; }; + }; - reboot { - compatible = "syscon-reboot"; - regmap = <&timer>; - offset = <0x34>; - mask = <1>; - }; + reboot { + compatible = "syscon-reboot"; + regmap = <&timer>; + offset = <0x34>; + mask = <1>; }; };
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 12/279 scsi: pm80xx: Fix memory leak during rmmod
In reply to Greg Kroah-HartmanFrom: Ajish Koshy <[email protected]>
[ Upstream commit 51e6ed83bb4ade7c360551fa4ae55c4eacea354b ]
Driver failed to release all memory allocated. This would lead to memory leak during driver removal.
Properly free memory when the module is removed.
--- drivers/scsi/pm8001/pm8001_init.c | 11 +++++++++++ drivers/scsi/pm8001/pm8001_sas.h | 1 + 2 files changed, 12 insertions(+)
drivers/scsi/pm8001/pm8001_init.c +11 -0
@@ -1198,6 +1198,7 @@ pm8001_init_ccb_tag(struct pm8001_hba_info *pm8001_ha, struct Scsi_Host *shost, goto err_out;/* Memory region for ccb_info*/ + pm8001_ha->ccb_count = ccb_count; pm8001_ha->ccb_info =kcalloc (ccb_count,sizeof (struct pm8001_ccb_info ),GFP_KERNEL );if (!pm8001_ha->ccb_info) {
@@ -1259,6 +1260,16 @@ static void pm8001_pci_remove(struct pci_dev *pdev)tasklet_kill (&pm8001_ha->tasklet[j]);#endif scsi_host_put (pm8001_ha->shost); + +for (i =0 ; i < pm8001_ha->ccb_count; i++) { +dma_free_coherent (&pm8001_ha->pdev->dev, +sizeof (struct pm8001_prd ) *PM8001_MAX_DMA_SG , + pm8001_ha->ccb_info[i].buf_prd, + pm8001_ha->ccb_info[i].ccb_dma_handle); + } +kfree (pm8001_ha->ccb_info); +kfree (pm8001_ha->devices); +pm8001_free (pm8001_ha);kfree (sha->sas_phy);kfree (sha->sas_port);
drivers/scsi/pm8001/pm8001_sas.h +1 -0
@@ -517,6 +517,7 @@ struct pm8001_hba_info {u32 iomb_size;/* SPC and SPCV IOMB size */ struct pm8001_device *devices;struct pm8001_ccb_info *ccb_info; +u32 ccb_count;#ifdef PM8001_USE_MSIX int number_of_intr;/*will be used in remove()*/ char intr_drvname[PM8001_MAX_MSIX_VEC ]
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 13/279 scsi: lpfc: Fix list_add() corruption in lpfc_drain_txq()
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 99154581b05c8fb22607afb7c3d66c1bace6aa5d ]
When parsing the txq list in lpfc_drain_txq(), the driver attempts to pass the requests to the adapter. If such an attempt fails, a local "fail_msg" string is set and a log message output. The job is then added to a completions list for cancellation.
Processing of any further jobs from the txq list continues, but since "fail_msg" remains set, jobs are added to the completions list regardless of whether a wqe was passed to the adapter. If successfully added to txcmplq, jobs are added to both lists resulting in list corruption.
Fix by clearing the fail_msg string after adding a job to the completions list. This stops the subsequent jobs from being added to the completions list unless they had an appropriate failure.
--- drivers/scsi/lpfc/lpfc_sli.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_sli.c +1 -0
@@ -21162,6 +21162,7 @@ lpfc_drain_txq(struct lpfc_hba *phba) fail_msg, piocbq->iotag, piocbq->sli4_xritag);list_add_tail (&piocbq->list, &completions); + fail_msg =NULL ; }spin_unlock_irqrestore (&pring->ring_lock, iflags); }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 2/279 arm64: zynqmp: Fix serial compatible string
In reply to Greg Kroah-HartmanFrom: Michal Simek <[email protected]>
[ Upstream commit 812fa2f0e9d33564bd0131a69750e0d165f4c82a ]
Based on commit 65a2c14d4f00 ("dt-bindings: serial: convert Cadence UART bindings to YAML") compatible string should look like differently that's why fix it to be aligned with dt binding.
--- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +2 -2
@@ -792,7 +792,7 @@ }; uart0: serial@ff000000 { - compatible = "cdns,uart-r1p12", "xlnx,xuartps"; + compatible = "xlnx,zynqmp-uart", "cdns,uart-r1p12"; status = "disabled"; interrupt-parent = <&gic>; interrupts = <0 21 4>;
@@ -802,7 +802,7 @@ }; uart1: serial@ff010000 { - compatible = "cdns,uart-r1p12", "xlnx,xuartps"; + compatible = "xlnx,zynqmp-uart", "cdns,uart-r1p12"; status = "disabled"; interrupt-parent = <&gic>; interrupts = <0 22 4>;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 1/279 arm64: zynqmp: Do not duplicate flash partition label property
In reply to Greg Kroah-HartmanFrom: Amit Kumar Mahapatra <[email protected]>
[ Upstream commit 167721a5909f867f8c18c8e78ea58e705ad9bbd4 ]
In kernel 5.4, support has been added for reading MTD devices via the nvmem API.
For this the mtd devices are registered as read-only NVMEM providers under sysfs with the same name as the flash partition label property.
So if flash partition label property of multiple flash devices are identical then the second mtd device fails to get registered as a NVMEM provider.
This patch fixes the issue by having different label property for different flashes.
--- arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts +2 -2
@@ -131,7 +131,7 @@ reg = <0>; partition@0 { - label = "data"; + label = "spi0-data"; reg = <0x0 0x100000>; }; };
@@ -149,7 +149,7 @@ reg = <0>; partition@0 { - label = "data"; + label = "spi1-data"; reg = <0x0 0x84000>; }; };
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 3/279 clk: sunxi-ng: Unregister clocks/resets when unbinding
In reply to Greg Kroah-HartmanFrom: Samuel Holland <[email protected]>
[ Upstream commit 9bec2b9c6134052994115d2d3374e96f2ccb9b9d ]
Currently, unbinding a CCU driver unmaps the device's MMIO region, while leaving its clocks/resets and their providers registered. This can cause a page fault later when some clock operation tries to perform MMIO. Fix this by separating the CCU initialization from the memory allocation, and then using a devres callback to unregister the clocks and resets.
This also fixes a memory leak of the struct ccu_reset, and uses the correct owner (the specific platform driver) for the clocks and resets.
Early OF clock providers are never unregistered, and limited error handling is possible, so they are mostly unchanged. The error reporting is made more consistent by moving the message inside of_sunxi_ccu_probe.
--- drivers/clk/sunxi-ng/ccu-sun4i-a10.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-a100-r.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-a100.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-h616.c | 4 +- drivers/clk/sunxi-ng/ccu-sun5i.c | 2 +- drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-a83t.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-r.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-r40.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 2 +- drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c | 3 +- drivers/clk/sunxi-ng/ccu-sun9i-a80-usb.c | 3 +- drivers/clk/sunxi-ng/ccu-sun9i-a80.c | 2 +- drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c | 2 +- drivers/clk/sunxi-ng/ccu_common.c | 89 ++++++++++++++++++++---- drivers/clk/sunxi-ng/ccu_common.h | 6 +- 23 files changed, 100 insertions(+), 41 deletions(-)
drivers/clk/sunxi-ng/ccu-sun4i-a10.c +1 -1
@@ -1464,7 +1464,7 @@ static void __init sun4i_ccu_init(struct device_node *node, val &= ~GENMASK (7 ,6 );writel (val | (2 <<6 ), reg +SUN4I_AHB_REG ); -sunxi_ccu_probe (node, reg, desc); +of_sunxi_ccu_probe (node, reg, desc); }static void __init sun4i_a10_ccu_setup (struct device_node *node)
drivers/clk/sunxi-ng/ccu-sun50i-a100-r.c +1 -1
@@ -196,7 +196,7 @@ static int sun50i_a100_r_ccu_probe(struct platform_device *pdev)if (IS_ERR (reg))return PTR_ERR (reg); -return sunxi_ccu_probe (pdev->dev.of_node, reg, &sun50i_a100_r_ccu_desc); +return devm_sunxi_ccu_probe (&pdev->dev, reg, &sun50i_a100_r_ccu_desc); }static const struct of_device_id sun50i_a100_r_ccu_ids[] = {
drivers/clk/sunxi-ng/ccu-sun50i-a100.c +1 -1
@@ -1247,7 +1247,7 @@ static int sun50i_a100_ccu_probe(struct platform_device *pdev)writel (val, reg + sun50i_a100_usb2_clk_regs[i]); } - ret =sunxi_ccu_probe (pdev->dev.of_node, reg, &sun50i_a100_ccu_desc); + ret =devm_sunxi_ccu_probe (&pdev->dev, reg, &sun50i_a100_ccu_desc);if (ret)return ret;
drivers/clk/sunxi-ng/ccu-sun50i-a64.c +1 -1
@@ -955,7 +955,7 @@ static int sun50i_a64_ccu_probe(struct platform_device *pdev)writel (0x515 , reg +SUN50I_A64_PLL_MIPI_REG ); - ret =sunxi_ccu_probe (pdev->dev.of_node, reg, &sun50i_a64_ccu_desc); + ret =devm_sunxi_ccu_probe (&pdev->dev, reg, &sun50i_a64_ccu_desc);if (ret)return ret;
drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c +1 -1
@@ -232,7 +232,7 @@ static void __init sunxi_r_ccu_init(struct device_node *node,return ; } -sunxi_ccu_probe (node, reg, desc); +of_sunxi_ccu_probe (node, reg, desc); }static void __init sun50i_h6_r_ccu_setup (struct device_node *node)
drivers/clk/sunxi-ng/ccu-sun50i-h6.c +1 -1
@@ -1240,7 +1240,7 @@ static int sun50i_h6_ccu_probe(struct platform_device *pdev) val |=BIT (24 );writel (val, reg +SUN50I_H6_HDMI_CEC_CLK_REG ); -return sunxi_ccu_probe (pdev->dev.of_node, reg, &sun50i_h6_ccu_desc); +return devm_sunxi_ccu_probe (&pdev->dev, reg, &sun50i_h6_ccu_desc); }static const struct of_device_id sun50i_h6_ccu_ids[] = {
drivers/clk/sunxi-ng/ccu-sun50i-h616.c +1 -3
@@ -1141,9 +1141,7 @@ static void __init sun50i_h616_ccu_setup(struct device_node *node) val |=BIT (24 );writel (val, reg +SUN50I_H616_HDMI_CEC_CLK_REG ); - i =sunxi_ccu_probe (node, reg, &sun50i_h616_ccu_desc); -if (i) -pr_err ("%pOF: probing clocks fails: %d\n" , node, i); +of_sunxi_ccu_probe (node, reg, &sun50i_h616_ccu_desc); } CLK_OF_DECLARE(sun50i_h616_ccu, "allwinner,sun50i-h616-ccu",
drivers/clk/sunxi-ng/ccu-sun5i.c +1 -1
@@ -1012,7 +1012,7 @@ static void __init sun5i_ccu_init(struct device_node *node, val &= ~GENMASK (7 ,6 );writel (val | (2 <<6 ), reg +SUN5I_AHB_REG ); -sunxi_ccu_probe (node, reg, desc); +of_sunxi_ccu_probe (node, reg, desc); }static void __init sun5i_a10s_ccu_setup (struct device_node *node)
drivers/clk/sunxi-ng/ccu-sun6i-a31.c +1 -1
@@ -1257,7 +1257,7 @@ static void __init sun6i_a31_ccu_setup(struct device_node *node) val |=0x3 <<12 ;writel (val, reg +SUN6I_A31_AHB1_REG ); -sunxi_ccu_probe (node, reg, &sun6i_a31_ccu_desc); +of_sunxi_ccu_probe (node, reg, &sun6i_a31_ccu_desc);ccu_mux_notifier_register (pll_cpu_clk.common.hw.clk, &sun6i_a31_cpu_nb);
drivers/clk/sunxi-ng/ccu-sun8i-a23.c +1 -1
@@ -745,7 +745,7 @@ static void __init sun8i_a23_ccu_setup(struct device_node *node) val &= ~BIT (16 );writel (val, reg +SUN8I_A23_PLL_MIPI_REG ); -sunxi_ccu_probe (node, reg, &sun8i_a23_ccu_desc); +of_sunxi_ccu_probe (node, reg, &sun8i_a23_ccu_desc); }CLK_OF_DECLARE (sun8i_a23_ccu,"allwinner,sun8i-a23-ccu" , sun8i_a23_ccu_setup);
drivers/clk/sunxi-ng/ccu-sun8i-a33.c +1 -1
@@ -805,7 +805,7 @@ static void __init sun8i_a33_ccu_setup(struct device_node *node) val &= ~BIT (16 );writel (val, reg +SUN8I_A33_PLL_MIPI_REG ); -sunxi_ccu_probe (node, reg, &sun8i_a33_ccu_desc); +of_sunxi_ccu_probe (node, reg, &sun8i_a33_ccu_desc);/* Gate then ungate PLL CPU after any rate changes */ ccu_pll_notifier_register (&sun8i_a33_pll_cpu_nb);
drivers/clk/sunxi-ng/ccu-sun8i-a83t.c +1 -1
@@ -906,7 +906,7 @@ static int sun8i_a83t_ccu_probe(struct platform_device *pdev)sun8i_a83t_cpu_pll_fixup (reg +SUN8I_A83T_PLL_C0CPUX_REG );sun8i_a83t_cpu_pll_fixup (reg +SUN8I_A83T_PLL_C1CPUX_REG ); -return sunxi_ccu_probe (pdev->dev.of_node, reg, &sun8i_a83t_ccu_desc); +return devm_sunxi_ccu_probe (&pdev->dev, reg, &sun8i_a83t_ccu_desc); }static const struct of_device_id sun8i_a83t_ccu_ids[] = {
drivers/clk/sunxi-ng/ccu-sun8i-de2.c +1 -1
@@ -342,7 +342,7 @@ static int sunxi_de2_clk_probe(struct platform_device *pdev) goto err_disable_mod_clk; } - ret =sunxi_ccu_probe (pdev->dev.of_node, reg, ccu_desc); + ret =devm_sunxi_ccu_probe (&pdev->dev, reg, ccu_desc);if (ret) goto err_assert_reset;
drivers/clk/sunxi-ng/ccu-sun8i-h3.c +1 -1
@@ -1154,7 +1154,7 @@ static void __init sunxi_h3_h5_ccu_init(struct device_node *node, val &= ~GENMASK (19 ,16 );writel (val | (0 <<16 ), reg +SUN8I_H3_PLL_AUDIO_REG ); -sunxi_ccu_probe (node, reg, desc); +of_sunxi_ccu_probe (node, reg, desc);/* Gate then ungate PLL CPU after any rate changes */ ccu_pll_notifier_register (&sun8i_h3_pll_cpu_nb);
drivers/clk/sunxi-ng/ccu-sun8i-r.c +1 -1
@@ -265,7 +265,7 @@ static void __init sunxi_r_ccu_init(struct device_node *node,return ; } -sunxi_ccu_probe (node, reg, desc); +of_sunxi_ccu_probe (node, reg, desc); }static void __init sun8i_a83t_r_ccu_setup (struct device_node *node)
drivers/clk/sunxi-ng/ccu-sun8i-r40.c +1 -1
@@ -1346,7 +1346,7 @@ static int sun8i_r40_ccu_probe(struct platform_device *pdev)if (IS_ERR (regmap))return PTR_ERR (regmap); - ret =sunxi_ccu_probe (pdev->dev.of_node, reg, &sun8i_r40_ccu_desc); + ret =devm_sunxi_ccu_probe (&pdev->dev, reg, &sun8i_r40_ccu_desc);if (ret)return ret;
drivers/clk/sunxi-ng/ccu-sun8i-v3s.c +1 -1
@@ -822,7 +822,7 @@ static void __init sun8i_v3_v3s_ccu_init(struct device_node *node, val &= ~GENMASK (19 ,16 );writel (val, reg +SUN8I_V3S_PLL_AUDIO_REG ); -sunxi_ccu_probe (node, reg, ccu_desc); +of_sunxi_ccu_probe (node, reg, ccu_desc); }static void __init sun8i_v3s_ccu_setup (struct device_node *node)
drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c +1 -2
@@ -246,8 +246,7 @@ static int sun9i_a80_de_clk_probe(struct platform_device *pdev) goto err_disable_clk; } - ret =sunxi_ccu_probe (pdev->dev.of_node, reg, - &sun9i_a80_de_clk_desc); + ret =devm_sunxi_ccu_probe (&pdev->dev, reg, &sun9i_a80_de_clk_desc);if (ret) goto err_assert_reset;
drivers/clk/sunxi-ng/ccu-sun9i-a80-usb.c +1 -2
@@ -117,8 +117,7 @@ static int sun9i_a80_usb_clk_probe(struct platform_device *pdev)return ret; } - ret =sunxi_ccu_probe (pdev->dev.of_node, reg, - &sun9i_a80_usb_clk_desc); + ret =devm_sunxi_ccu_probe (&pdev->dev, reg, &sun9i_a80_usb_clk_desc);if (ret) goto err_disable_clk;
drivers/clk/sunxi-ng/ccu-sun9i-a80.c +1 -1
@@ -1231,7 +1231,7 @@ static int sun9i_a80_ccu_probe(struct platform_device *pdev)sun9i_a80_cpu_pll_fixup (reg +SUN9I_A80_PLL_C0CPUX_REG );sun9i_a80_cpu_pll_fixup (reg +SUN9I_A80_PLL_C1CPUX_REG ); -return sunxi_ccu_probe (pdev->dev.of_node, reg, &sun9i_a80_ccu_desc); +return devm_sunxi_ccu_probe (&pdev->dev, reg, &sun9i_a80_ccu_desc); }static const struct of_device_id sun9i_a80_ccu_ids[] = {
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c +1 -1
@@ -538,7 +538,7 @@ static void __init suniv_f1c100s_ccu_setup(struct device_node *node) val &= ~GENMASK (19 ,16 );writel (val | (3 <<16 ), reg +SUNIV_PLL_AUDIO_REG ); -sunxi_ccu_probe (node, reg, &suniv_ccu_desc); +of_sunxi_ccu_probe (node, reg, &suniv_ccu_desc);/* Gate then ungate PLL CPU after any rate changes */ ccu_pll_notifier_register (&suniv_pll_cpu_nb);
drivers/clk/sunxi-ng/ccu_common.c +75 -14
137 lines not on this page · raw message
drivers/clk/sunxi-ng/ccu_common.h +4 -2
@@ -63,7 +63,9 @@ struct ccu_pll_nb {int ccu_pll_notifier_register (struct ccu_pll_nb *pll_nb); -int sunxi_ccu_probe (struct device_node *node,void __iomem *reg, -const struct sunxi_ccu_desc *desc); +int devm_sunxi_ccu_probe (struct device *dev,void __iomem *reg, +const struct sunxi_ccu_desc *desc); +void of_sunxi_ccu_probe (struct device_node *node,void __iomem *reg, +const struct sunxi_ccu_desc *desc);#endif /* _COMMON_H_ */
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 4/279 ARM: dts: sunxi: Fix OPPs node name
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit ffbe853a3f5a37fa0a511265b21abf097ffdbe45 ]
The operating-points-v2 nodes are named inconsistently, but mostly either opp_table0 or gpu-opp-table. However, the underscore is an invalid character for a node name and the thermal zone binding explicitly requires that zones are called opp-table-*. Let's fix it.
--- arch/arm/boot/dts/sun8i-a33.dtsi | 4 ++-- arch/arm/boot/dts/sun8i-a83t.dtsi | 4 ++-- arch/arm/boot/dts/sun8i-h3.dtsi | 4 ++-- arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi | 2 +- arch/arm64/boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi | 2 +- arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-)
arch/arm/boot/dts/sun8i-a33.dtsi +2 -2
@@ -46,7 +46,7 @@ #include <dt-bindings/thermal/thermal.h> / { - cpu0_opp_table: opp_table0 { + cpu0_opp_table: opp-table-cpu { compatible = "operating-points-v2"; opp-shared;
@@ -164,7 +164,7 @@ io-channels = <&ths>; }; - mali_opp_table: gpu-opp-table { + mali_opp_table: opp-table-gpu { compatible = "operating-points-v2"; opp-144000000 {
arch/arm/boot/dts/sun8i-a83t.dtsi +2 -2
@@ -200,7 +200,7 @@ status = "disabled"; }; - cpu0_opp_table: opp_table0 { + cpu0_opp_table: opp-table-cluster0 { compatible = "operating-points-v2"; opp-shared;
@@ -253,7 +253,7 @@ }; }; - cpu1_opp_table: opp_table1 { + cpu1_opp_table: opp-table-cluster1 { compatible = "operating-points-v2"; opp-shared;
arch/arm/boot/dts/sun8i-h3.dtsi +2 -2
@@ -44,7 +44,7 @@ #include <dt-bindings/thermal/thermal.h> / { - cpu0_opp_table: opp_table0 { + cpu0_opp_table: opp-table-cpu { compatible = "operating-points-v2"; opp-shared;
@@ -112,7 +112,7 @@ }; }; - gpu_opp_table: gpu-opp-table { + gpu_opp_table: opp-table-gpu { compatible = "operating-points-v2"; opp-120000000 {
arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi +1 -1
@@ -4,7 +4,7 @@ */ / { - cpu0_opp_table: opp_table0 { + cpu0_opp_table: opp-table-cpu { compatible = "operating-points-v2"; opp-shared;
arch/arm64/boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi +1 -1
@@ -2,7 +2,7 @@ // Copyright (C) 2020 Chen-Yu Tsai <[email protected]> / { - cpu_opp_table: cpu-opp-table { + cpu_opp_table: opp-table-cpu { compatible = "operating-points-v2"; opp-shared;
arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi +1 -1
@@ -3,7 +3,7 @@ // Copyright (C) 2020 Clément Péron <[email protected]> / { - cpu_opp_table: cpu-opp-table { + cpu_opp_table: opp-table-cpu { compatible = "allwinner,sun50i-h6-operating-points"; nvmem-cells = <&cpu_speed_grade>; opp-shared;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 6/279 arm64: dts: allwinner: a100: Fix thermal zone node name
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit 5c34c4e46e601554bfa370b23c8ae3c3c734e9f7 ]
The thermal zones one the A100 are called $device-thermal-zone.
However, the thermal zone binding explicitly requires that zones are called *-thermal. Let's fix it.
--- arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi +3 -3
@@ -343,19 +343,19 @@ }; thermal-zones { - cpu-thermal-zone { + cpu-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 0>; }; - ddr-thermal-zone { + ddr-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 2>; }; - gpu-thermal-zone { + gpu-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 1>;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 9/279 ARM: dts: BCM5301X: Fix MDIO mux binding
In reply to Greg Kroah-HartmanFrom: Rafał Miłecki <[email protected]>
[ Upstream commit 6ee0b56f7530e0ebb496fe15d0b54c5f3a1b5e17 ]
This fixes following error for all BCM5301X dts files:
mdio-bus-mux@18003000: compatible: ['mdio-mux-mmioreg'] is too short
--- arch/arm/boot/dts/bcm5301x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/bcm5301x.dtsi +1 -1
@@ -370,7 +370,7 @@ }; mdio-mux@18003000 { - compatible = "mdio-mux-mmioreg"; + compatible = "mdio-mux-mmioreg", "mdio-mux"; mdio-parent-bus = <&mdio>; #address-cells = <1>; #size-cells = <0>;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 5/279 arm64: dts: allwinner: h5: Fix GPU thermal zone node name
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit 94a0f2b0e4e0953d8adf319c44244ef7a57de32c ]
The GPU thermal zone is named gpu_thermal. However, the underscore is an invalid character for a node name and the thermal zone binding explicitly requires that zones are called *-thermal. Let's fix it.
--- arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +1 -1
@@ -217,7 +217,7 @@ }; }; - gpu_thermal { + gpu-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 1>;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 7/279 staging: wfx: ensure IRQ is ready before enabling it
In reply to Greg Kroah-HartmanFrom: Jérôme Pouiller <[email protected]>
[ Upstream commit 5e57c668dc097c6c27c973504706edec53f79281 ]
Since commit 5561770f80b1 ("staging: wfx: repair external IRQ for SDIO"), wfx_sdio_irq_subscribe() enforce the device to use IRQs. However, there is currently a race in this code. An IRQ may happen before the IRQ has been registered.
The problem has observed during debug session when the device crashes before the IRQ set up:
[ 1.546] wfx-sdio mmc0:0001:1: started firmware 3.12.2 "WF200_ASIC_WFM_(Jenkins)_FW3.12.2" (API: 3.7, keyset: C0, caps: 0x00000002)
[ 2.559] wfx-sdio mmc0:0001:1: time out while polling control register
[ 3.565] wfx-sdio mmc0:0001:1: chip is abnormally long to answer
[ 6.563] wfx-sdio mmc0:0001:1: chip did not answer
[ 6.568] wfx-sdio mmc0:0001:1: hardware request CONFIGURATION (0x09) on vif 2 returned error -110
[ 6.577] wfx-sdio mmc0:0001:1: PDS bytes 0 to 12: chip didn't reply (corrupted file?)
[ 6.585] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 6.592] pgd = c0004000
[ 6.595] [00000000] *pgd=00000000
[ 6.598] Internal error: Oops - BUG: 17 [#1] THUMB2
[ 6.603] Modules linked in:
[ 6.606] CPU: 0 PID: 23 Comm: kworker/u2:1 Not tainted 3.18.19 #78
[ 6.612] Workqueue: kmmcd mmc_rescan
[ 6.616] task: c176d100 ti: c0e50000 task.ti: c0e50000
[ 6.621] PC is at wake_up_process+0xa/0x14
[ 6.625] LR is at sdio_irq+0x61/0x250
[ 6.629] pc : [<c001e8ae>] lr : [<c00ec5bd>] psr: 600001b3
[ 6.629] sp : c0e51bd8 ip : c0e51cc8 fp : 00000001
[ 6.640] r10: 00000003 r9 : 00000000 r8 : c0003c34
[ 6.644] r7 : c0e51bd8 r6 : c0003c30 r5 : 00000001 r4 : c0e78c00
[ 6.651] r3 : 00000000 r2 : 00000000 r1 : 00000003 r0 : 00000000
[ 6.657] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment kernel
[ 6.664] Control: 50c53c7d Table: 11fd8059 DAC: 00000015
[ 6.670] Process kworker/u2:1 (pid: 23, stack limit = 0xc0e501b0)
[ 6.676] Stack: (0xc0e51bd8 to 0xc0e52000)
[...]
[ 6.949] [<c001e8ae>] (wake_up_process) from [<c00ec5bd>] (sdio_irq+0x61/0x250)
[ 6.956] [<c00ec5bd>] (sdio_irq) from [<c0025099>] (handle_irq_event_percpu+0x17/0x92)
[ 6.964] [<c0025099>] (handle_irq_event_percpu) from [<c002512f>] (handle_irq_event+0x1b/0x24)
[ 6.973] [<c002512f>] (handle_irq_event) from [<c0026577>] (handle_level_irq+0x5d/0x76)
[ 6.981] [<c0026577>] (handle_level_irq) from [<c0024cc3>] (generic_handle_irq+0x13/0x1c)
[ 6.989] [<c0024cc3>] (generic_handle_irq) from [<c0024dd9>] (__handle_domain_irq+0x31/0x48)
[ 6.997] [<c0024dd9>] (__handle_domain_irq) from [<c0008359>] (ov_handle_irq+0x31/0xe0)
[ 7.005] [<c0008359>] (ov_handle_irq) from [<c000af5b>] (__irq_svc+0x3b/0x5c)
[ 7.013] Exception stack(0xc0e51c68 to 0xc0e51cb0)
[...]
[ 7.038] [<c000af5b>] (__irq_svc) from [<c01775aa>] (wait_for_common+0x9e/0xc4)
[ 7.045] [<c01775aa>] (wait_for_common) from [<c00e1dc3>] (mmc_wait_for_req+0x4b/0xdc)
[ 7.053] [<c00e1dc3>] (mmc_wait_for_req) from [<c00e1e83>] (mmc_wait_for_cmd+0x2f/0x34)
[ 7.061] [<c00e1e83>] (mmc_wait_for_cmd) from [<c00e7b2b>] (mmc_io_rw_direct_host+0x71/0xac)
[ 7.070] [<c00e7b2b>] (mmc_io_rw_direct_host) from [<c00e8f79>] (sdio_claim_irq+0x6b/0x116)
[ 7.078] [<c00e8f79>] (sdio_claim_irq) from [<c00d8415>] (wfx_sdio_irq_subscribe+0x19/0x94)
[ 7.086] [<c00d8415>] (wfx_sdio_irq_subscribe) from [<c00d5229>] (wfx_probe+0x189/0x2ac)
[ 7.095] [<c00d5229>] (wfx_probe) from [<c00d83bf>] (wfx_sdio_probe+0x8f/0xcc)
[ 7.102] [<c00d83bf>] (wfx_sdio_probe) from [<c00e7fbb>] (sdio_bus_probe+0x5f/0xa8)
[ 7.109] [<c00e7fbb>] (sdio_bus_probe) from [<c00be229>] (driver_probe_device+0x59/0x134)
[ 7.118] [<c00be229>] (driver_probe_device) from [<c00bd4d7>] (bus_for_each_drv+0x3f/0x4a)
[ 7.126] [<c00bd4d7>] (bus_for_each_drv) from [<c00be1a5>] (device_attach+0x3b/0x52)
[ 7.134] [<c00be1a5>] (device_attach) from [<c00bdc2b>] (bus_probe_device+0x17/0x4c)
[ 7.141] [<c00bdc2b>] (bus_probe_device) from [<c00bcd69>] (device_add+0x2c5/0x334)
[ 7.149] [<c00bcd69>] (device_add) from [<c00e80bf>] (sdio_add_func+0x23/0x44)
[ 7.156] [<c00e80bf>] (sdio_add_func) from [<c00e79eb>] (mmc_attach_sdio+0x187/0x1ec)
[ 7.164] [<c00e79eb>] (mmc_attach_sdio) from [<c00e31bd>] (mmc_rescan+0x18d/0x1fc)
[ 7.172] [<c00e31bd>] (mmc_rescan) from [<c001a14f>] (process_one_work+0xd7/0x170)
[ 7.179] [<c001a14f>] (process_one_work) from [<c001a59b>] (worker_thread+0x103/0x1bc)
[ 7.187] [<c001a59b>] (worker_thread) from [<c001c731>] (kthread+0x7d/0x90)
[ 7.194] [<c001c731>] (kthread) from [<c0008ce1>] (ret_from_fork+0x11/0x30)
[ 7.201] Code: 2103 b580 2200 af00 (681b) 46bd
[ 7.206] ---[ end trace 3ab50aced42eedb4 ]------ drivers/staging/wfx/bus_sdio.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/staging/wfx/bus_sdio.c +10 -7
@@ -120,19 +120,22 @@ static int wfx_sdio_irq_subscribe(void *priv)return ret; } + flags =irq_get_trigger_type (bus->of_irq); +if (!flags) + flags =IRQF_TRIGGER_HIGH ; + flags |=IRQF_ONESHOT ; + ret =devm_request_threaded_irq (&bus->func->dev, bus->of_irq,NULL , + wfx_sdio_irq_handler_ext, flags, +"wfx" , bus); +if (ret) +return ret;sdio_claim_host (bus->func); cccr =sdio_f0_readb (bus->func, SDIO_CCCR_IENx,NULL ); cccr |=BIT (0 ); cccr |=BIT (bus->func->num);sdio_f0_writeb (bus->func, cccr, SDIO_CCCR_IENx,NULL );sdio_release_host (bus->func); - flags =irq_get_trigger_type (bus->of_irq); -if (!flags) - flags =IRQF_TRIGGER_HIGH ; - flags |=IRQF_ONESHOT ; -return devm_request_threaded_irq (&bus->func->dev, bus->of_irq,NULL , - wfx_sdio_irq_handler_ext, flags, -"wfx" , bus); +return 0 ; }static int wfx_sdio_irq_unsubscribe (void *priv)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 8/279 ARM: dts: BCM5301X: Fix nodes names
In reply to Greg Kroah-HartmanFrom: Rafał Miłecki <[email protected]>
[ Upstream commit 9dba049b6d32e95c0dd2a0d607f593ea288ac140 ]
This fixes following errors for all BCM5301X dts files:
chipcommonA@18000000: $nodename:0: 'chipcommonA@18000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' mpcore@19000000: $nodename:0: 'mpcore@19000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' mdio-bus-mux@18003000: $nodename:0: 'mdio-bus-mux@18003000' does not match '^mdio-mux[\\-@]?'
dmu@1800c000: $nodename:0: 'dmu@1800c000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
--- arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 2 +- arch/arm/boot/dts/bcm5301x.dtsi | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/bcm47094-linksys-panamera.dts +1 -1
@@ -129,7 +129,7 @@ }; }; - mdio-bus-mux@18003000 { + mdio-mux@18003000 { /* BIT(9) = 1 => external mdio */ mdio@200 {
arch/arm/boot/dts/bcm5301x.dtsi +4 -4
@@ -19,7 +19,7 @@ #size-cells = <1>; interrupt-parent = <&gic>; - chipcommonA@18000000 { + chipcommon-a-bus@18000000 { compatible = "simple-bus"; ranges = <0x00000000 0x18000000 0x00001000>; #address-cells = <1>;
@@ -44,7 +44,7 @@ }; }; - mpcore@19000000 { + mpcore-bus@19000000 { compatible = "simple-bus"; ranges = <0x00000000 0x19000000 0x00023000>; #address-cells = <1>;
@@ -369,7 +369,7 @@ #address-cells = <1>; }; - mdio-bus-mux@18003000 { + mdio-mux@18003000 { compatible = "mdio-mux-mmioreg"; mdio-parent-bus = <&mdio>; #address-cells = <1>;
@@ -415,7 +415,7 @@ status = "disabled"; }; - dmu@1800c000 { + dmu-bus@1800c000 { compatible = "simple-bus"; ranges = <0 0x1800c000 0x1000>; #address-cells = <1>;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainercover 5.15.5-rc1 review
This is the start of the stable review cycle for the 5.15.5 release. There are 279 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 26 Nov 2021 11:56:36 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.5-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.15.5-rc1
Randy Dunlap <[email protected]>
x86/Kconfig: Fix an unused variable error in dell-smm-hwmon
Eric Dumazet <[email protected]>
net: add and use skb_unclone_keeptruesize() helper
Josef Bacik <[email protected]>
btrfs: update device path inode time instead of bd_inode
Josef Bacik <[email protected]>
fs: export an inode_update_time helper
Leon Romanovsky <[email protected]>
ice: Delete always true check of PF pointer
Brett Creeley <[email protected]>
ice: Fix VF true promiscuous mode
Uwe Kleine-König <[email protected]>
usb: max-3421: Use driver data instead of maintaining a list of bound devices
Kuninori Morimoto <[email protected]>
ASoC: rsnd: fixup DMAEngine API
Takashi Iwai <[email protected]>
ASoC: DAPM: Cover regression by kctl change notification fix
Ondrej Mosnacek <[email protected]>
selinux: fix NULL-pointer dereference when hashtab allocation fails
Dmitrii Banshchikov <[email protected]>
bpf: Forbid bpf_ktime_get_coarse_ns and bpf_timer_* in tracing progs
Leon Romanovsky <[email protected]>
RDMA/netlink: Add __maybe_unused to static inline in C file
Nadav Amit <[email protected]>
hugetlbfs: flush TLBs correctly after huge_pmd_unshare
Eric W. Biederman <[email protected]>
signal: Replace force_fatal_sig with force_exit_sig when in doubt
Eric W. Biederman <[email protected]>
signal: Don't always set SA_IMMUTABLE for forced signals
Eric W. Biederman <[email protected]>
signal: Replace force_sigsegv(SIGSEGV) with force_fatal_sig(SIGSEGV)
Eric W. Biederman <[email protected]>
signal/x86: In emulate_vsyscall force a signal instead of calling do_exit
Eric W. Biederman <[email protected]>
signal/vm86_32: Properly send SIGSEGV when the vm86 state cannot be saved.
Eric W. Biederman <[email protected]>
signal/sparc32: In setup_rt_frame and setup_fram use force_fatal_sig
Eric W. Biederman <[email protected]>
signal/sparc32: Exit with a fatal signal when try_to_clear_window_buffer fails
Eric W. Biederman <[email protected]>
signal/s390: Use force_sigsegv in default_trap_handler
Eric W. Biederman <[email protected]>
signal/powerpc: On swapcontext failure force SIGSEGV
Eric W. Biederman <[email protected]>
exit/syscall_user_dispatch: Send ordinary signals on failure
Eric W. Biederman <[email protected]>
signal: Implement force_fatal_sig
Evan Quan <[email protected]>
drm/amd/pm: avoid duplicate powergate/ungate setting
hongao <[email protected]>
drm/amdgpu: fix set scaling mode Full/Full aspect/Center not works on vga and dvi connectors
Ville Syrjälä <[email protected]>
drm/i915: Fix type1 DVI DP dual mode adapter heuristic for modern platforms
Imre Deak <[email protected]>
drm/i915/dp: Ensure max link params are always valid
Imre Deak <[email protected]>
drm/i915/dp: Ensure sink rate values are always valid
Jeremy Cline <[email protected]>
drm/nouveau: clean up all clients on device removal
Jeremy Cline <[email protected]>
drm/nouveau: use drm_dev_unplug() during device removal
Jeremy Cline <[email protected]>
drm/nouveau: Add a dedicated mutex for the clients list
Anand K Mistry <[email protected]>
drm/prime: Fix use after free in mmap with drm_gem_ttm_mmap
Johan Hovold <[email protected]>
drm/udl: fix control-message timeout
Matthew Brost <[email protected]>
drm/i915/guc: Unwind context requests in reverse order
Matthew Brost <[email protected]>
drm/i915/guc: Don't drop ce->guc_active.lock when unwinding context
Matthew Brost <[email protected]>
drm/i915/guc: Workaround reset G2H is received after schedule done G2H
Matthew Brost <[email protected]>
drm/i915/guc: Don't enable scheduling on a banned context, guc_id invalid, not registered
Matthew Brost <[email protected]>
drm/i915/guc: Fix outstanding G2H accounting
Roman Li <[email protected]>
drm/amd/display: Limit max DSC target bpp for specific monitors
Alvin Lee <[email protected]>
drm/amd/display: Update swizzle mode enums
Felix Fietkau <[email protected]>
mac80211: drop check for DONT_REORDER in __ieee80211_select_queue
Johannes Berg <[email protected]>
mac80211: fix radiotap header generation
Nguyen Dinh Phi <[email protected]>
cfg80211: call cfg80211_stop_ap when switch from P2P_GO type
Sven Schnelle <[email protected]>
parisc/sticon: fix reverse colors
Thomas Gleixner <[email protected]>
net: stmmac: Fix signed/unsigned wreckage
Christian Brauner <[email protected]>
fs: handle circular mappings correctly
Nikolay Borisov <[email protected]>
btrfs: fix memory ordering between normal and ordered work functions
Boqun Feng <[email protected]>
Drivers: hv: balloon: Use VMBUS_RING_SIZE() wrapper for dm_ring_size
Meng Li <[email protected]>
net: stmmac: socfpga: add runtime suspend/resume callback for stratix10 platform
Michael Walle <[email protected]>
spi: fix use-after-free of the add_lock mutex
Jan Kara <[email protected]>
udf: Fix crash after seekdir
Nicholas Piggin <[email protected]>
printk: restore flushing of NMI buffers on remote CPUs after NMI backtraces
Thomas Zimmermann <[email protected]>
drm/cma-helper: Release non-coherent memory with dma_free_noncoherent()
Maxim Levitsky <[email protected]>
KVM: nVMX: don't use vcpu->arch.efer when checking host state on nested state load
Sean Christopherson <[email protected]>
KVM: SEV: Disallow COPY_ENC_CONTEXT_FROM if target has created vCPUs
Javier Martinez Canillas <[email protected]>
fbdev: Prevent probing generic drivers if a FB is already registered
Alistair Delva <[email protected]>
block: Check ADMIN before NICE for IOPRIO_CLASS_RT
Alexander Egorenkov <[email protected]>
s390/dump: fix copying to user-space of swapped kdump oldmem
Baoquan He <[email protected]>
s390/kexec: fix memory leak of ipl report buffer
Sven Schnelle <[email protected]>
s390/vdso: filter out -mstack-guard and -mstack-size
Vasily Gorbik <[email protected]>
s390/boot: simplify and fix kernel memory layout setup
Vasily Gorbik <[email protected]>
s390/setup: avoid reserving memory above identity mapping
Sergio Paracuellos <[email protected]>
pinctrl: ralink: include 'ralink_regs.h' in 'pinctrl-mt7620.c'
Ewan D. Milne <[email protected]>
scsi: qla2xxx: Fix mailbox direction flags in qla2xxx_get_adapter_id()
Damien Le Moal <[email protected]>
ata: libata: add missing ata_identify_page_supported() calls
Damien Le Moal <[email protected]>
ata: libata: improve ata_read_log_page() error message
Helge Deller <[email protected]>
Revert "parisc: Reduce sigreturn trampoline to 3 instructions"
Vandita Kulkarni <[email protected]>
Revert "drm/i915/tgl/dsi: Gate the ddi clocks after pll mapping"
Christophe Leroy <[email protected]>
powerpc/8xx: Fix pinned TLBs with CONFIG_STRICT_KERNEL_RWX
Cédric Le Goater <[email protected]>
powerpc/xive: Change IRQ domain to a tree domain
Christophe Leroy <[email protected]>
powerpc/signal32: Fix sigset_t copy
David Woodhouse <[email protected]>
KVM: x86/xen: Fix get_attr of KVM_XEN_ATTR_TYPE_SHARED_INFO
Maxim Levitsky <[email protected]>
KVM: x86/mmu: include EFER.LMA in extended mmu role
黄乐 <[email protected]>
KVM: x86: Fix uninitialized eoi_exit_bitmap usage in vcpu_load_eoi_exitmap()
Tom Lendacky <[email protected]>
KVM: x86: Assume a 64-bit hypercall for guests with protected state
Sean Christopherson <[email protected]>
x86/hyperv: Fix NULL deref in set_hv_tscchange_cb() if Hyper-V setup fails
Reinette Chatre <[email protected]>
x86/sgx: Fix free page accounting
Borislav Petkov <[email protected]>
x86/boot: Pull up cmdline preparation and early param parsing
SeongJae Park <[email protected]>
mm/damon/dbgfs: fix missed use of damon_dbgfs_lock
SeongJae Park <[email protected]>
mm/damon/dbgfs: use '__GFP_NOWARN' for user-specified size buffer allocation
Ard Biesheuvel <[email protected]>
kmap_local: don't assume kmap PTEs are linear arrays in memory
Mina Almasry <[email protected]>
hugetlb, userfaultfd: fix reservation restore on userfaultfd error
Rustam Kovhaev <[email protected]>
mm: kmemleak: slob: respect SLAB_NOLEAKTRACE flag
Alexander Mikhalitsyn <[email protected]>
shm: extend forced shm destroy to support objects from several IPC nses
Alexander Mikhalitsyn <[email protected]>
ipc: WARN if trying to remove ipc object which is absent
Tadeusz Struk <[email protected]>
tipc: check for null after calling kmemdup
Nathan Chancellor <[email protected]>
hexagon: clean up timer-regs.h
Nathan Chancellor <[email protected]>
hexagon: export raw I/O routines for modules
Geert Uytterhoeven <[email protected]>
pstore/blk: Use "%lu" to format unsigned long
Kees Cook <[email protected]>
Revert "mark pstore-blk as broken"
Nicolas Dichtel <[email protected]>
tun: fix bonding active backup with arp monitoring
Arnd Bergmann <[email protected]>
dmaengine: remove debugfs #ifdef
Yu Kuai <[email protected]>
blk-cgroup: fix missing put device in error path from blkg_conf_pref()
Heiko Carstens <[email protected]>
s390/kexec: fix return code handling
Alexander Antonov <[email protected]>
perf/x86/intel/uncore: Fix IIO event constraints for Snowridge
Alexander Antonov <[email protected]>
perf/x86/intel/uncore: Fix IIO event constraints for Skylake Server
Alexander Antonov <[email protected]>
perf/x86/intel/uncore: Fix filter_tid mask for CHA events on Skylake Server
Bjorn Andersson <[email protected]>
pinctrl: qcom: sm8350: Correct UFS and SDC offsets
Bjorn Andersson <[email protected]>
pinctrl: qcom: sdm845: Enable dual edge errata
Nicholas Piggin <[email protected]>
powerpc/pseries: Fix numa FORM2 parsing fallback code
Nicholas Piggin <[email protected]>
powerpc/pseries: rename numa_dist_table to form2_distances
Masahiro Yamada <[email protected]>
powerpc: clean vdso32 and vdso64 directories
Michael Ellerman <[email protected]>
KVM: PPC: Book3S HV: Use GLOBAL_TOC for kvmppc_h_set_dabr/xdabr()
Andreas Schwab <[email protected]>
riscv: fix building external modules
Arnaldo Carvalho de Melo <[email protected]>
tools build: Fix removal of feature-sync-compare-and-swap feature detection
Sohaib Mohamed <[email protected]>
perf bench: Fix two memory leaks detected with ASan
Dan Carpenter <[email protected]>
ptp: ocp: Fix a couple NULL vs IS_ERR() checks
Jesse Brandeburg <[email protected]>
e100: fix device suspend/resume
Lin Ma <[email protected]>
NFC: add NCI_UNREG flag to eliminate the race
Lin Ma <[email protected]>
NFC: reorder the logic in nfc_{un,}register_device
Lin Ma <[email protected]>
NFC: reorganize the functions in nci_request
Grzegorz Szczurek <[email protected]>
i40e: Fix display error code in dmesg
Jedrzej Jagielski <[email protected]>
i40e: Fix creation of first queue by omitting it if is not power of two
Karen Sornek <[email protected]>
i40e: Fix warning message and call stack during rmmod i40e driver
Jack Wang <[email protected]>
RDMA/mlx4: Do not fail the registration on port stats
Eryk Rybak <[email protected]>
i40e: Fix ping is lost after configuring ADq on VF
Eryk Rybak <[email protected]>
i40e: Fix changing previously set num_queue_pairs for PFs
Michal Maloszewski <[email protected]>
i40e: Fix NULL ptr dereference on VSI filter sync
Eryk Rybak <[email protected]>
i40e: Fix correct max_pkt_size on VF RX queue
Jonathan Davies <[email protected]>
net: virtio_net_hdr_to_skb: count transport header in UFO
Pavel Skripkin <[email protected]>
net: dpaa2-eth: fix use-after-free in dpaa2_eth_remove
Xin Long <[email protected]>
net: sched: act_mirred: drop dst for the direction from egress to ingress
Marcin Wojtas <[email protected]>
net: mvmdio: fix compilation warning
Adrian Hunter <[email protected]>
scsi: ufs: core: Fix another task management completion race
Adrian Hunter <[email protected]>
scsi: ufs: core: Fix task management completion timeout race
Mike Christie <[email protected]>
scsi: core: sysfs: Fix hang when device state is set via sysfs
Bart Van Assche <[email protected]>
scsi: ufs: core: Improve SCSI abort handling
Raed Salem <[email protected]>
net/mlx5: E-Switch, return error if encap isn't supported
Maher Sanalla <[email protected]>
net/mlx5: Lag, update tracker when state change event received
Roi Dayan <[email protected]>
net/mlx5e: CT, Fix multiple allocations and memleak of mod acts
Mark Bloch <[email protected]>
net/mlx5: E-Switch, rebuild lag only when needed
Neta Ostrovsky <[email protected]>
net/mlx5: Update error handler for UCTX and UMEM
Valentine Fatiev <[email protected]>
net/mlx5e: nullify cq->dbg pointer in mlx5_debug_cq_remove()
Paul Blakey <[email protected]>
net/mlx5: E-Switch, Fix resetting of encap mode when entering switchdev
Vlad Buslov <[email protected]>
net/mlx5e: Wait for concurrent flow deletion during neigh/fib events
Tariq Toukan <[email protected]>
net/mlx5e: kTLS, Fix crash in RX resync flow
Leon Romanovsky <[email protected]>
RDMA/core: Set send and receive CQ before forwarding to the driver
Colin Ian King <[email protected]>
btrfs: make 1-bit bit-fields of scrub_page unsigned int
Cong Wang <[email protected]>
udp: Validate checksum in udp_read_sock()
Alex Williamson <[email protected]>
platform/x86: think-lmi: Abort probe on analyze failure
Christophe JAILLET <[email protected]>
platform/x86: hp_accel: Fix an error handling path in 'lis3lv02d_probe()'
Randy Dunlap <[email protected]>
gpio: rockchip: needs GENERIC_IRQ_CHIP to fix build errors
Randy Dunlap <[email protected]>
mips: lantiq: add support for clk_get_parent()
Randy Dunlap <[email protected]>
mips: bcm63xx: add support for clk_get_parent()
Colin Ian King <[email protected]>
MIPS: generic/yamon-dt: fix uninitialized variable error
Daniel Borkmann <[email protected]>
bpf: Fix toctou on read-only map's constant scalar tracking
Akeem G Abodunrin <[email protected]>
iavf: Restore VLAN filters after link down
Grzegorz Szczurek <[email protected]>
iavf: Fix for setting queues to 0
Surabhi Boob <[email protected]>
iavf: Fix for the false positive ASQ/ARQ errors while issuing VF reset
Mitch Williams <[email protected]>
iavf: validate pointers
Jacob Keller <[email protected]>
iavf: prevent accidental free of filter structure
Piotr Marczak <[email protected]>
iavf: Fix failure to exit out from last all-multicast mode
Nicholas Nunley <[email protected]>
iavf: don't clear a lock we don't hold
Nicholas Nunley <[email protected]>
iavf: free q_vectors before queues in iavf_disable_vf
Nicholas Nunley <[email protected]>
iavf: check for null in iavf_fix_features
Mateusz Palczewski <[email protected]>
iavf: Fix return of set the new channel count
Chuck Lever <[email protected]>
NFSD: Fix exposure in nfsd4_decode_bitmap()
Wen Gu <[email protected]>
net/smc: Make sure the link_id is unique
Tetsuo Handa <[email protected]>
sock: fix /proc/net/sockstat underflow in sk_clone_lock()
Xin Long <[email protected]>
tipc: only accept encrypted MSG_CRYPTO msgs
Sriharsha Basavapatna <[email protected]>
bnxt_en: reject indirect blk offload when hw-tc-offload is off
Pavel Skripkin <[email protected]>
net: bnx2x: fix variable dereferenced before check
Li Zhijian <[email protected]>
selftests: gpio: fix gpio compiling error
Alex Elder <[email protected]>
net: ipa: disable HOLB drop when updating timer
Alex Elder <[email protected]>
net: ipa: HOLB register sometimes must be written twice
Johannes Berg <[email protected]>
mac80211: fix monitor_sdata RCU/locking assertions
Johannes Berg <[email protected]>
nl80211: fix radio statistics in survey dump
Steven Rostedt (VMware) <[email protected]>
tracing: Add length protection to histogram string copies
Arjun Roy <[email protected]>
tcp: Fix uninitialized access in skb frags array for Rx 0cp.
Konrad Dybcio <[email protected]>
net/ipa: ipa_resource: Fix wrong for loop range
Jakub Kicinski <[email protected]>
selftests: net: switch to socat in the GSO GRE test
Kumar Kartikeya Dwivedi <[email protected]>
samples/bpf: Fix incorrect use of strlen in xdp_redirect_cpu
Alexander Lobakin <[email protected]>
samples/bpf: Fix summary per-sec stats in xdp_sample_user
Alexei Starovoitov <[email protected]>
bpf: Fix inner map state pruning regression.
Hans Verkuil <[email protected]>
drm/nouveau: hdmigv100.c: fix corrupted HDMI Vendor InfoFrame
James Clark <[email protected]>
perf tests: Remove bash construct from record+zstd_comp_decomp.sh
Sohaib Mohamed <[email protected]>
perf bench futex: Fix memory leak of perf_cpu_map__new()
Ian Rogers <[email protected]>
perf bpf: Avoid memory leak from perf_env__insert_btf()
Masami Hiramatsu <[email protected]>
tracing/histogram: Do not copy the fixed-size char array field over the field size
Laibin Qiu <[email protected]>
blkcg: Remove extra blkcg_bio_issue_init
Like Xu <[email protected]>
perf/x86/vlbr: Add c->flags to vlbr event constraints
Mathias Krause <[email protected]>
sched/fair: Prevent dead task groups from regaining cfs_rq's
Vincent Donnefort <[email protected]>
sched/core: Mitigate race cpus_share_cache()/update_top_cache_domain()
Randy Dunlap <[email protected]>
MIPS: boot/compressed/: add __bswapdi2() to target for ZSTD decompression
Randy Dunlap <[email protected]>
mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set
Quentin Perret <[email protected]>
KVM: arm64: Fix host stage-2 finalization
Dmitry Baryshkov <[email protected]>
clk: qcom: gcc-msm8996: Drop (again) gcc_aggre1_pnoc_ahb_clk
Joel Stanley <[email protected]>
clk/ast2600: Fix soc revision for AHB
Paul Cercueil <[email protected]>
clk: ingenic: Fix bugs with divided dividers
Chao Yu <[email protected]>
f2fs: fix incorrect return value in f2fs_sanity_check_ckpt()
Hyeong-Jun Kim <[email protected]>
f2fs: compress: disallow disabling compress on non-empty compressed file
Randy Dunlap <[email protected]>
sh: define __BIG_ENDIAN for math-emu
Randy Dunlap <[email protected]>
sh: math-emu: drop unused functions
Randy Dunlap <[email protected]>
sh: fix kconfig unmet dependency warning for FRAME_POINTER
Chao Yu <[email protected]>
f2fs: fix wrong condition to trigger background checkpoint correctly
Keoseong Park <[email protected]>
f2fs: fix to use WHINT_MODE
Gao Xiang <[email protected]>
f2fs: fix up f2fs_lookup tracepoints
Lu Wei <[email protected]>
maple: fix wrong return value of maple_bus_init().
Nick Desaulniers <[email protected]>
sh: check return code of request_irq
Christophe Leroy <[email protected]>
powerpc/8xx: Fix Oops with STRICT_KERNEL_RWX without DEBUG_RODATA_TEST
Michael Ellerman <[email protected]>
powerpc/dcr: Use cmplwi instead of 3-argument cmpli
Sven Peter <[email protected]>
iommu/dart: Initialize DART_STREAMS_ENABLE
Claudiu Beznea <[email protected]>
clk: at91: sama7g5: remove prescaler part of master clock
Chengfeng Ye <[email protected]>
ALSA: usb-audio: fix null pointer dereference on pointer cs_desc
Chengfeng Ye <[email protected]>
ALSA: gus: fix null pointer dereference on pointer block
Stephan Gerhold <[email protected]>
arm64: dts: qcom: Fix node name of rpm-msg-ram device nodes
David Heidelberg <[email protected]>
ARM: dts: qcom: fix memory and mdio nodes naming for RB3011
Anatolij Gustschin <[email protected]>
powerpc/5200: dts: fix memory node unit name
Dmitry Osipenko <[email protected]>
memory: tegra20-emc: Add runtime dependency on devfreq governor module
James Smart <[email protected]>
scsi: lpfc: Allow fabric node recovery if recovery is in progress before devloss
James Smart <[email protected]>
scsi: lpfc: Fix link down processing to address NULL pointer dereference
James Smart <[email protected]>
scsi: lpfc: Fix use-after-free in lpfc_unreg_rpi() routine
wangyugui <[email protected]>
RDMA/core: Use kvzalloc when allocating the struct ib_port
Teng Qi <[email protected]>
iio: imu: st_lsm6dsx: Avoid potential array overflow in st_lsm6dsx_set_odr()
Mike Christie <[email protected]>
scsi: target: Fix alua_tg_pt_gps_count tracking
Mike Christie <[email protected]>
scsi: target: Fix ordered tag handling
Ye Bin <[email protected]>
scsi: scsi_debug: Fix out-of-bound read in resp_report_tgtpgs()
Ye Bin <[email protected]>
scsi: scsi_debug: Fix out-of-bound read in resp_readcap16()
Bart Van Assche <[email protected]>
MIPS: sni: Fix the build
Guanghui Feng <[email protected]>
tty: tty_buffer: Fix the softlockup issue in flush_to_ldisc
Tvrtko Ursulin <[email protected]>
iommu/vt-d: Do not falsely log intel_iommu is unsupported kernel option
Randy Dunlap <[email protected]>
ALSA: ISA: not for M68K
Li Yang <[email protected]>
ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for flash
Li Yang <[email protected]>
ARM: dts: ls1021a: move thermal-zones node out of soc/
Derek Fang <[email protected]>
ASoC: rt5682: fix a little pop while playback
Yang Yingliang <[email protected]>
usb: host: ohci-tmio: check return value after calling platform_get_resource()
Roger Quadros <[email protected]>
ARM: dts: omap: fix gpmc,mux-add-data type
William Overton <[email protected]>
ALSA: usb-audio: Add support for the Pioneer DJM 750MK2 Mixer/Soundcard
José Expósito <[email protected]>
HID: multitouch: disable sticky fingers for UPERFECT Y
Dmitry Osipenko <[email protected]>
cpuidle: tegra: Check whether PMC is ready
Luis Chamberlain <[email protected]>
firmware_loader: fix pre-allocated buf built-in firmware use
Pierre-Louis Bossart <[email protected]>
ASoC: Intel: sof_sdw: add missing quirk for Dell SKU 0A45
Pierre-Louis Bossart <[email protected]>
ASoC: Intel: soc-acpi: add missing quirk for TGL SDCA single amp
Pierre-Louis Bossart <[email protected]>
ALSA: intel-dsp-config: add quirk for APL/GLK/TGL devices based on ES8336 codec
Frieder Schrempf <[email protected]>
arm64: dts: imx8mm-kontron: Fix reset delays for ethernet PHY
Mahesh Rajashekhara <[email protected]>
scsi: smartpqi: Add controller handshake during kdump
Guo Zhi <[email protected]>
scsi: advansys: Fix kernel pointer leak
Hans de Goede <[email protected]>
ASoC: nau8824: Add DMI quirk mechanism for active-high jack-detect
Hans de Goede <[email protected]>
ASoC: rt5651: Use IRQF_NO_AUTOEN when requesting the IRQ
Hans de Goede <[email protected]>
ASoC: es8316: Use IRQF_NO_AUTOEN when requesting the IRQ
Stefan Riedmueller <[email protected]>
clk: imx: imx6ul: Move csi_sel mux to correct base register
Geraldo Nascimento <[email protected]>
ALSA: usb-audio: disable implicit feedback sync for Behringer UFX1204 and UFX1604
Damien Le Moal <[email protected]>
scsi: core: Fix scsi_mode_sense() buffer length handling
Pierre-Louis Bossart <[email protected]>
ASoC: SOF: Intel: hda-dai: fix potential locking issue
Bob Pearson <[email protected]>
RDMA/rxe: Separate HW and SW l/rkeys
Kuldeep Singh <[email protected]>
arm64: dts: ls1012a: Add serial alias for ls1012a-rdb
Michael Walle <[email protected]>
arm64: dts: freescale: fix arm,sp805 compatible string
Stephan Gerhold <[email protected]>
arm64: dts: qcom: msm8916: Add unit name for /soc node
Shawn Guo <[email protected]>
arm64: dts: qcom: sdm845: Fix qcom,controlled-remotely property
Shawn Guo <[email protected]>
arm64: dts: qcom: ipq8074: Fix qcom,controlled-remotely property
Shawn Guo <[email protected]>
arm64: dts: qcom: ipq6018: Fix qcom,controlled-remotely property
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: qcom: msm8998: Fix CPU/L2 idle state latency and residency
Christian Lamparter <[email protected]>
ARM: BCM53016: Specify switch ports for Meraki MR32
Hans de Goede <[email protected]>
staging: rtl8723bs: remove a third possible deadlock
Hans de Goede <[email protected]>
staging: rtl8723bs: remove a second possible deadlock
Fabio Aiuto <[email protected]>
staging: rtl8723bs: remove possible deadlock when disconnect (v2)
Linus Walleij <[email protected]>
ARM: dts: ux500: Skomer regulator fixes
Sven Peter <[email protected]>
usb: typec: tipd: Remove WARN_ON in tps6598x_block_read
Yang Yingliang <[email protected]>
usb: musb: tusb6010: check return value after calling platform_get_resource()
Tony Lindgren <[email protected]>
bus: ti-sysc: Use context lost quirk for otg
Tony Lindgren <[email protected]>
bus: ti-sysc: Add quirk handling for reinit on context lost
Selvin Xavier <[email protected]>
RDMA/bnxt_re: Check if the vlan is valid before reporting
Michael Walle <[email protected]>
arm64: dts: hisilicon: fix arm,sp805 compatible string
Matthias Brugger <[email protected]>
arm64: dts: rockchip: Disable CDN DP on Pinebook Pro
Bixuan Cui <[email protected]>
ASoC: mediatek: mt8195: Add missing of_node_put()
James Smart <[email protected]>
scsi: lpfc: Fix list_add() corruption in lpfc_drain_txq()
Ajish Koshy <[email protected]>
scsi: pm80xx: Fix memory leak during rmmod
Rafał Miłecki <[email protected]>
arm64: dts: broadcom: bcm4908: Move reboot syscon out of bus
Matthew Hagan <[email protected]>
ARM: dts: NSP: Fix mpcore, mmc node names
Rafał Miłecki <[email protected]>
ARM: dts: BCM5301X: Fix MDIO mux binding
Rafał Miłecki <[email protected]>
ARM: dts: BCM5301X: Fix nodes names
Jérôme Pouiller <[email protected]>
staging: wfx: ensure IRQ is ready before enabling it
Maxime Ripard <[email protected]>
arm64: dts: allwinner: a100: Fix thermal zone node name
Maxime Ripard <[email protected]>
arm64: dts: allwinner: h5: Fix GPU thermal zone node name
Maxime Ripard <[email protected]>
ARM: dts: sunxi: Fix OPPs node name
Samuel Holland <[email protected]>
clk: sunxi-ng: Unregister clocks/resets when unbinding
Michal Simek <[email protected]>
arm64: zynqmp: Fix serial compatible string
Amit Kumar Mahapatra <[email protected]>
arm64: zynqmp: Do not duplicate flash partition label property
-------------
Diffstat:
Makefile | 4 +- arch/arc/kernel/process.c | 2 +- arch/arm/Kconfig | 1 + arch/arm/boot/dts/bcm-nsp.dtsi | 4 +- arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 2 +- arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 22 +++ arch/arm/boot/dts/bcm5301x.dtsi | 10 +- arch/arm/boot/dts/ls1021a-tsn.dts | 2 +- arch/arm/boot/dts/ls1021a.dtsi | 66 +++---- arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi | 2 +- arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi | 2 +- arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 6 +- arch/arm/boot/dts/ste-ux500-samsung-skomer.dts | 8 +- arch/arm/boot/dts/sun8i-a33.dtsi | 4 +- arch/arm/boot/dts/sun8i-a83t.dtsi | 4 +- arch/arm/boot/dts/sun8i-h3.dtsi | 4 +- arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 6 +- .../boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi | 2 +- .../boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi | 2 +- arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 2 +- .../boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi | 2 +- arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi | 12 +- arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 16 +- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 16 +- .../boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 4 +- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 4 +- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 2 +- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 +- arch/arm64/boot/dts/qcom/msm8994.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8998.dtsi | 22 ++- arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 +- .../boot/dts/rockchip/rk3399-pinebook-pro.dts | 4 - .../boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts | 4 +- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 +- arch/arm64/kvm/hyp/nvhe/setup.c | 14 +- arch/hexagon/include/asm/timer-regs.h | 26 --- arch/hexagon/include/asm/timex.h | 3 +- arch/hexagon/kernel/time.c | 12 +- arch/hexagon/lib/io.c | 4 + arch/m68k/kernel/traps.c | 2 +- arch/mips/Kconfig | 3 + arch/mips/bcm63xx/clk.c | 6 + arch/mips/boot/compressed/Makefile | 6 + arch/mips/generic/yamon-dt.c | 2 +- arch/mips/lantiq/clk.c | 6 + arch/mips/sni/time.c | 4 +- arch/parisc/include/asm/rt_sigframe.h | 2 +- arch/parisc/kernel/signal.c | 13 +- arch/parisc/kernel/signal32.h | 2 +- arch/powerpc/boot/dts/charon.dts | 2 +- arch/powerpc/boot/dts/digsy_mtc.dts | 2 +- arch/powerpc/boot/dts/lite5200.dts | 2 +- arch/powerpc/boot/dts/lite5200b.dts | 2 +- arch/powerpc/boot/dts/media5200.dts | 2 +- arch/powerpc/boot/dts/mpc5200b.dtsi | 2 +- arch/powerpc/boot/dts/o2d.dts | 2 +- arch/powerpc/boot/dts/o2d.dtsi | 2 +- arch/powerpc/boot/dts/o2dnt2.dts | 2 +- arch/powerpc/boot/dts/o3dnt.dts | 2 +- arch/powerpc/boot/dts/pcm032.dts | 2 +- arch/powerpc/boot/dts/tqm5200.dts | 2 +- arch/powerpc/kernel/Makefile | 3 + arch/powerpc/kernel/head_8xx.S | 13 +- arch/powerpc/kernel/signal.h | 10 +- arch/powerpc/kernel/signal_32.c | 6 +- arch/powerpc/kernel/signal_64.c | 9 +- arch/powerpc/kernel/watchdog.c | 6 + arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 +- arch/powerpc/mm/numa.c | 44 +++-- arch/powerpc/sysdev/dcr-low.S | 2 +- arch/powerpc/sysdev/xive/Kconfig | 1 - arch/powerpc/sysdev/xive/common.c | 3 +- arch/riscv/Makefile | 2 + arch/s390/Kconfig | 2 +- arch/s390/Makefile | 10 +- arch/s390/boot/startup.c | 88 ++++------ arch/s390/include/asm/kexec.h | 6 + arch/s390/kernel/crash_dump.c | 4 +- arch/s390/kernel/ipl.c | 3 +- arch/s390/kernel/machine_kexec_file.c | 18 +- arch/s390/kernel/setup.c | 10 +- arch/s390/kernel/traps.c | 2 +- arch/s390/kernel/vdso64/Makefile | 5 +- arch/sh/Kconfig.debug | 1 + arch/sh/include/asm/sfp-machine.h | 8 + arch/sh/kernel/cpu/sh4a/smp-shx3.c | 5 +- arch/sh/math-emu/math.c | 103 ----------- arch/sparc/kernel/signal_32.c | 4 +- arch/sparc/kernel/windows.c | 6 +- arch/um/kernel/trap.c | 2 +- arch/x86/Kconfig | 3 +- arch/x86/entry/vsyscall/vsyscall_64.c | 3 +- arch/x86/events/intel/core.c | 4 +- arch/x86/events/intel/uncore_snbep.c | 12 ++ arch/x86/hyperv/hv_init.c | 3 + arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kernel/cpu/sgx/main.c | 12 +- arch/x86/kernel/setup.c | 66 ++++--- arch/x86/kernel/vm86_32.c | 4 +- arch/x86/kvm/hyperv.c | 4 +- arch/x86/kvm/mmu/mmu.c | 1 + arch/x86/kvm/svm/sev.c | 7 +- arch/x86/kvm/vmx/nested.c | 22 ++- arch/x86/kvm/x86.c | 10 +- arch/x86/kvm/x86.h | 12 ++ arch/x86/kvm/xen.c | 4 +- block/blk-cgroup.c | 9 +- block/blk-core.c | 4 +- block/ioprio.c | 9 +- drivers/ata/libata-core.c | 11 +- drivers/base/firmware_loader/main.c | 13 +- drivers/bus/ti-sysc.c | 110 +++++++++++- drivers/clk/at91/sama7g5.c | 11 +- drivers/clk/clk-ast2600.c | 12 +- drivers/clk/imx/clk-imx6ul.c | 2 +- drivers/clk/ingenic/cgu.c | 6 +- drivers/clk/qcom/gcc-msm8996.c | 15 -- drivers/clk/sunxi-ng/ccu-sun4i-a10.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-a100-r.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-a100.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-h616.c | 4 +- drivers/clk/sunxi-ng/ccu-sun5i.c | 2 +- drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-a83t.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-r.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-r40.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 2 +- drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c | 3 +- drivers/clk/sunxi-ng/ccu-sun9i-a80-usb.c | 3 +- drivers/clk/sunxi-ng/ccu-sun9i-a80.c | 2 +- drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c | 2 +- drivers/clk/sunxi-ng/ccu_common.c | 89 ++++++++-- drivers/clk/sunxi-ng/ccu_common.h | 6 +- drivers/cpuidle/cpuidle-tegra.c | 3 + drivers/dma/xilinx/xilinx_dpdma.c | 15 +- drivers/gpio/Kconfig | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 + .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 35 ++++ .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 4 +- .../drm/amd/display/dc/dml/display_mode_enums.h | 4 +- drivers/gpu/drm/amd/include/amd_shared.h | 3 +- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 10 ++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 8 + drivers/gpu/drm/drm_gem_cma_helper.c | 9 +- drivers/gpu/drm/drm_prime.c | 6 +- drivers/gpu/drm/i915/display/icl_dsi.c | 10 +- drivers/gpu/drm/i915/display/intel_bios.c | 85 ++++++--- drivers/gpu/drm/i915/display/intel_dp.c | 29 +++- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 154 ++++++++++------- drivers/gpu/drm/nouveau/nouveau_drm.c | 42 ++++- drivers/gpu/drm/nouveau/nouveau_drv.h | 5 + .../gpu/drm/nouveau/nvkm/engine/disp/hdmigv100.c | 1 - drivers/gpu/drm/udl/udl_connector.c | 2 +- drivers/hid/hid-ids.h | 3 + drivers/hid/hid-multitouch.c | 13 ++ drivers/hv/hv_balloon.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 +- drivers/infiniband/core/sysfs.c | 4 +- drivers/infiniband/core/verbs.c | 3 + drivers/infiniband/hw/bnxt_re/ib_verbs.c | 12 +- drivers/infiniband/hw/mlx4/main.c | 18 +- drivers/infiniband/sw/rxe/rxe_loc.h | 1 + drivers/infiniband/sw/rxe/rxe_mr.c | 69 ++++++-- drivers/infiniband/sw/rxe/rxe_mw.c | 30 ++-- drivers/infiniband/sw/rxe/rxe_req.c | 14 +- drivers/infiniband/sw/rxe/rxe_verbs.h | 18 +- drivers/iommu/apple-dart.c | 5 + drivers/iommu/intel/iommu.c | 6 +- drivers/memory/tegra/tegra20-emc.c | 1 + .../net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h | 4 +- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 +- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +- drivers/net/ethernet/intel/e100.c | 18 +- drivers/net/ethernet/intel/i40e/i40e.h | 2 + drivers/net/ethernet/intel/i40e/i40e_main.c | 160 +++++++++++------ drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 121 +++++-------- drivers/net/ethernet/intel/iavf/iavf.h | 1 + drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 30 +++- drivers/net/ethernet/intel/iavf/iavf_main.c | 55 ++++-- drivers/net/ethernet/intel/ice/ice.h | 5 +- drivers/net/ethernet/intel/ice/ice_main.c | 3 - drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 78 ++++----- drivers/net/ethernet/marvell/mvmdio.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/cq.c | 5 +- drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 26 ++- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h | 2 + .../net/ethernet/mellanox/mlx5/core/en/tc_priv.h | 1 + .../ethernet/mellanox/mlx5/core/en/tc_tun_encap.c | 8 +- .../ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c | 23 ++- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 21 ++- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 9 +- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 28 ++- .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 24 ++- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 23 ++- drivers/net/ipa/ipa_endpoint.c | 5 + drivers/net/ipa/ipa_resource.c | 2 +- drivers/net/tun.c | 5 + drivers/pinctrl/qcom/pinctrl-sdm845.c | 1 + drivers/pinctrl/qcom/pinctrl-sm8350.c | 8 +- drivers/pinctrl/ralink/pinctrl-mt7620.c | 1 + drivers/platform/x86/hp_accel.c | 2 + drivers/platform/x86/think-lmi.c | 13 +- drivers/platform/x86/think-lmi.h | 1 - drivers/ptp/ptp_ocp.c | 9 +- drivers/scsi/advansys.c | 4 +- drivers/scsi/lpfc/lpfc_crtn.h | 2 + drivers/scsi/lpfc/lpfc_disc.h | 12 +- drivers/scsi/lpfc/lpfc_els.c | 7 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 112 +++++++++++- drivers/scsi/lpfc/lpfc_init.c | 12 +- drivers/scsi/lpfc/lpfc_scsi.c | 10 +- drivers/scsi/lpfc/lpfc_sli.c | 15 +- drivers/scsi/pm8001/pm8001_init.c | 11 ++ drivers/scsi/pm8001/pm8001_sas.h | 1 + drivers/scsi/qla2xxx/qla_mbx.c | 6 +- drivers/scsi/scsi_debug.c | 11 +- drivers/scsi/scsi_lib.c | 25 +-- drivers/scsi/scsi_sysfs.c | 30 ++-- drivers/scsi/smartpqi/smartpqi_init.c | 41 ++++- drivers/scsi/smartpqi/smartpqi_sis.c | 51 ++++++ drivers/scsi/smartpqi/smartpqi_sis.h | 1 + drivers/scsi/ufs/ufshcd.c | 9 +- drivers/sh/maple/maple.c | 5 +- drivers/spi/spi.c | 12 +- drivers/staging/rtl8723bs/core/rtw_mlme.c | 12 +- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 11 +- drivers/staging/rtl8723bs/core/rtw_recv.c | 10 +- drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 33 ++-- drivers/staging/rtl8723bs/core/rtw_xmit.c | 16 +- drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 - drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 - drivers/staging/wfx/bus_sdio.c | 17 +- drivers/target/target_core_alua.c | 1 - drivers/target/target_core_device.c | 2 + drivers/target/target_core_internal.h | 1 + drivers/target/target_core_transport.c | 76 ++++++--- drivers/tty/tty_buffer.c | 3 + drivers/usb/host/max3421-hcd.c | 25 +-- drivers/usb/host/ohci-tmio.c | 2 +- drivers/usb/musb/tusb6010.c | 5 + drivers/usb/typec/tipd/core.c | 2 +- drivers/video/console/sticon.c | 12 +- drivers/video/fbdev/efifb.c | 11 ++ drivers/video/fbdev/simplefb.c | 11 ++ fs/attr.c | 4 +- fs/btrfs/async-thread.c | 14 ++ fs/btrfs/scrub.c | 4 +- fs/btrfs/volumes.c | 21 ++- fs/exec.c | 2 +- fs/f2fs/f2fs.h | 3 +- fs/f2fs/segment.c | 2 +- fs/f2fs/super.c | 4 +- fs/inode.c | 7 +- fs/nfsd/nfs4xdr.c | 7 +- fs/pstore/Kconfig | 1 - fs/pstore/blk.c | 2 +- fs/udf/dir.c | 32 +++- fs/udf/namei.c | 3 + fs/udf/super.c | 2 + include/linux/bpf.h | 3 +- include/linux/dmaengine.h | 2 - include/linux/fs.h | 2 + include/linux/ipc_namespace.h | 15 ++ include/linux/mlx5/eswitch.h | 4 +- include/linux/platform_data/ti-sysc.h | 1 + include/linux/printk.h | 4 + include/linux/sched/signal.h | 2 + include/linux/sched/task.h | 2 +- include/linux/skbuff.h | 16 ++ include/linux/trace_events.h | 2 +- include/linux/virtio_net.h | 7 +- include/net/nfc/nci_core.h | 1 + include/rdma/rdma_netlink.h | 2 +- include/target/target_core_base.h | 6 +- include/trace/events/f2fs.h | 12 +- ipc/shm.c | 189 ++++++++++++++++----- ipc/util.c | 6 +- kernel/bpf/cgroup.c | 2 + kernel/bpf/helpers.c | 2 - kernel/bpf/syscall.c | 57 ++++--- kernel/bpf/verifier.c | 27 ++- kernel/entry/syscall_user_dispatch.c | 12 +- kernel/printk/printk.c | 5 + kernel/sched/autogroup.c | 2 +- kernel/sched/core.c | 47 ++++- kernel/sched/fair.c | 4 +- kernel/sched/rt.c | 12 +- kernel/sched/sched.h | 3 +- kernel/signal.c | 60 +++++-- kernel/trace/bpf_trace.c | 2 - kernel/trace/trace_events_hist.c | 14 +- lib/nmi_backtrace.c | 6 + mm/Kconfig | 3 + mm/damon/dbgfs.c | 15 +- mm/highmem.c | 32 ++-- mm/hugetlb.c | 30 +++- mm/slab.h | 2 +- net/core/filter.c | 6 + net/core/skbuff.c | 14 +- net/core/sock.c | 6 +- net/ipv4/bpf_tcp_ca.c | 2 + net/ipv4/tcp.c | 3 + net/ipv4/tcp_output.c | 6 +- net/ipv4/udp.c | 11 ++ net/mac80211/cfg.c | 12 +- net/mac80211/iface.c | 4 +- net/mac80211/rx.c | 2 +- net/mac80211/util.c | 7 +- net/mac80211/wme.c | 3 +- net/nfc/core.c | 32 ++-- net/nfc/nci/core.c | 30 +++- net/sched/act_mirred.c | 11 +- net/smc/smc_core.c | 3 +- net/tipc/crypto.c | 4 + net/tipc/link.c | 7 +- net/wireless/nl80211.c | 34 ++-- net/wireless/nl80211.h | 6 +- net/wireless/util.c | 1 + samples/bpf/xdp_redirect_cpu_user.c | 5 +- samples/bpf/xdp_sample_user.c | 28 +-- security/selinux/ss/hashtab.c | 17 +- sound/core/Makefile | 2 + sound/hda/intel-dsp-config.c | 22 ++- sound/isa/Kconfig | 2 +- sound/isa/gus/gus_dma.c | 2 + sound/pci/Kconfig | 1 + sound/soc/codecs/es8316.c | 7 +- sound/soc/codecs/nau8824.c | 40 +++++ sound/soc/codecs/rt5651.c | 7 +- sound/soc/codecs/rt5682.c | 56 +++++- sound/soc/codecs/rt5682.h | 20 +++ sound/soc/intel/boards/sof_sdw.c | 10 ++ sound/soc/intel/common/soc-acpi-intel-tgl-match.c | 41 +++++ .../mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c | 6 +- sound/soc/sh/rcar/dma.c | 2 +- sound/soc/soc-dapm.c | 29 +++- sound/soc/sof/intel/hda-dai.c | 7 +- sound/usb/clock.c | 4 + sound/usb/implicit.c | 2 - sound/usb/mixer_quirks.c | 34 ++++ sound/usb/quirks-table.h | 58 +++++++ tools/build/feature/test-all.c | 1 - tools/perf/bench/futex-lock-pi.c | 1 + tools/perf/bench/futex-requeue.c | 1 + tools/perf/bench/futex-wake-parallel.c | 1 + tools/perf/bench/futex-wake.c | 1 + tools/perf/bench/sched-messaging.c | 4 + tools/perf/tests/shell/record+zstd_comp_decomp.sh | 2 +- tools/perf/util/bpf-event.c | 6 +- tools/perf/util/env.c | 5 +- tools/perf/util/env.h | 2 +- tools/testing/selftests/gpio/Makefile | 1 + tools/testing/selftests/net/gre_gso.sh | 16 +- 371 files changed, 3095 insertions(+), 1545 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 15/279 arm64: dts: rockchip: Disable CDN DP on Pinebook Pro
From: Matthias Brugger <[email protected]>
[ Upstream commit 2513fa5c25d42f55ca5f0f0ab247af7c9fbfa3b1 ]
The CDN DP needs a PHY and a extcon to work correctly. But no extcon is provided by the device-tree, which leads to an error:
cdn-dp fec00000.dp: [drm:cdn_dp_probe [rockchipdrm]] *ERROR* missing extcon or phy
cdn-dp: probe of fec00000.dp failed with error -22
Disable the CDN DP to make graphic work on the Pinebook Pro.
--- arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 4 ---- 1 file changed, 4 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +0 -4
@@ -385,10 +385,6 @@ }; }; -&cdn_dp { - status = "okay"; -}; - &cpu_b0 { cpu-supply = <&vdd_cpu_b>; };
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 25/279 staging: rtl8723bs: remove a third possible deadlock
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit bdc1bbdbaa92df19a14d4c1902088c8432b46c6f ]
The assoc_timer takes the pmlmepriv->lock and various functions which take the pmlmepriv->scanned_queue.lock first take the pmlmepriv->lock, this means that we cannot have code which waits for the timer (timer_del_sync) while holding the pmlmepriv->scanned_queue.lock to avoid a triangle deadlock:
[ 363.139361] ======================================================
[ 363.139377] WARNING: possible circular locking dependency detected
[ 363.139396] 5.15.0-rc1+ #470 Tainted: G C E
[ 363.139413] ------------------------------------------------------
[ 363.139424] RTW_CMD_THREAD/2466 is trying to acquire lock:
[ 363.139441] ffffbacd00699038 (&pmlmepriv->lock){+.-.}-{2:2}, at: _rtw_join_timeout_handler+0x3c/0x160 [r8723bs]
[ 363.139598]
but task is already holding lock:
[ 363.139610] ffffbacd00128ea0 ((&pmlmepriv->assoc_timer)){+.-.}-{0:0}, at: call_timer_fn+0x5/0x260
[ 363.139673]
which lock already depends on the new lock.[ 363.139684]
the existing dependency chain (in reverse order) is:
[ 363.139696]
-> #2 ((&pmlmepriv->assoc_timer)){+.-.}-{0:0}:
[ 363.139734] del_timer_sync+0x59/0x100
[ 363.139762] rtw_joinbss_event_prehandle+0x342/0x640 [r8723bs]
[ 363.139870] report_join_res+0xdf/0x110 [r8723bs]
[ 363.139980] OnAssocRsp+0x17a/0x200 [r8723bs]
[ 363.140092] rtw_recv_entry+0x190/0x1120 [r8723bs]
[ 363.140209] rtl8723b_process_phy_info+0x3f9/0x750 [r8723bs]
[ 363.140318] tasklet_action_common.constprop.0+0xe8/0x110
[ 363.140345] __do_softirq+0xde/0x485
[ 363.140372] __irq_exit_rcu+0xd0/0x100
[ 363.140393] irq_exit_rcu+0xa/0x20
[ 363.140413] common_interrupt+0x83/0xa0
[ 363.140440] asm_common_interrupt+0x1e/0x40
[ 363.140463] finish_task_switch.isra.0+0x157/0x3d0
[ 363.140492] __schedule+0x447/0x1880
[ 363.140516] schedule+0x59/0xc0
[ 363.140537] smpboot_thread_fn+0x161/0x1c0
[ 363.140565] kthread+0x143/0x160
[ 363.140585] ret_from_fork+0x22/0x30
[ 363.140614]
-> #1 (&pmlmepriv->scanned_queue.lock){+.-.}-{2:2}:
[ 363.140653] _raw_spin_lock_bh+0x34/0x40
[ 363.140675] rtw_free_network_queue+0x31/0x80 [r8723bs]
[ 363.140776] rtw_sitesurvey_cmd+0x79/0x1e0 [r8723bs]
[ 363.140869] rtw_cfg80211_surveydone_event_callback+0x3cf/0x470 [r8723bs]
[ 363.140973] rdev_scan+0x42/0x1a0 [cfg80211]
[ 363.141307] nl80211_trigger_scan+0x566/0x660 [cfg80211]
[ 363.141635] genl_family_rcv_msg_doit+0xcd/0x110
[ 363.141661] genl_rcv_msg+0xce/0x1c0
[ 363.141680] netlink_rcv_skb+0x50/0xf0
[ 363.141699] genl_rcv+0x24/0x40
[ 363.141717] netlink_unicast+0x16d/0x230
[ 363.141736] netlink_sendmsg+0x22b/0x450
[ 363.141755] sock_sendmsg+0x5e/0x60
[ 363.141781] ____sys_sendmsg+0x22f/0x270
[ 363.141803] ___sys_sendmsg+0x81/0xc0
[ 363.141828] __sys_sendmsg+0x49/0x80
[ 363.141851] do_syscall_64+0x3b/0x90
[ 363.141873] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 363.141895]
-> #0 (&pmlmepriv->lock){+.-.}-{2:2}:
[ 363.141930] __lock_acquire+0x1158/0x1de0
[ 363.141954] lock_acquire+0xb5/0x2b0
[ 363.141974] _raw_spin_lock_bh+0x34/0x40
[ 363.141993] _rtw_join_timeout_handler+0x3c/0x160 [r8723bs]
[ 363.142097] call_timer_fn+0x94/0x260
[ 363.142122] __run_timers.part.0+0x1bf/0x290
[ 363.142147] run_timer_softirq+0x26/0x50
[ 363.142171] __do_softirq+0xde/0x485
[ 363.142193] __irq_exit_rcu+0xd0/0x100
[ 363.142215] irq_exit_rcu+0xa/0x20
[ 363.142235] sysvec_apic_timer_interrupt+0x72/0x90
[ 363.142260] asm_sysvec_apic_timer_interrupt+0x12/0x20
[ 363.142283] __module_address.part.0+0x0/0xd0
[ 363.142309] is_module_address+0x25/0x40
[ 363.142334] static_obj+0x4f/0x60
[ 363.142361] lockdep_init_map_type+0x47/0x220
[ 363.142382] __init_swait_queue_head+0x45/0x60
[ 363.142408] mmc_wait_for_req+0x4a/0xc0 [mmc_core]
[ 363.142504] mmc_wait_for_cmd+0x55/0x70 [mmc_core]
[ 363.142592] mmc_io_rw_direct+0x75/0xe0 [mmc_core]
[ 363.142691] sdio_writeb+0x2e/0x50 [mmc_core]
[ 363.142788] _sd_cmd52_write+0x62/0x80 [r8723bs]
[ 363.142885] sd_cmd52_write+0x6c/0xb0 [r8723bs]
[ 363.142981] rtl8723bs_set_hal_ops+0x982/0x9b0 [r8723bs]
[ 363.143089] rtw_write16+0x1e/0x30 [r8723bs]
[ 363.143184] SetHwReg8723B+0xcc9/0xd30 [r8723bs]
[ 363.143294] mlmeext_joinbss_event_callback+0x17a/0x1a0 [r8723bs]
[ 363.143405] rtw_joinbss_event_callback+0x11/0x20 [r8723bs]
[ 363.143507] mlme_evt_hdl+0x4d/0x70 [r8723bs]
[ 363.143620] rtw_cmd_thread+0x168/0x3c0 [r8723bs]
[ 363.143712] kthread+0x143/0x160
[ 363.143732] ret_from_fork+0x22/0x30
[ 363.143757]
other info that might help us debug this:[ 363.143768] Chain exists of:
&pmlmepriv->lock --> &pmlmepriv->scanned_queue.lock --> (&pmlmepriv->assoc_timer)[ 363.143809] Possible unsafe locking scenario:
[ 363.143819] CPU0 CPU1
[ 363.143831] ---- ----
[ 363.143841] lock((&pmlmepriv->assoc_timer));
[ 363.143862] lock(&pmlmepriv->scanned_queue.lock);
[ 363.143882] lock((&pmlmepriv->assoc_timer));
[ 363.143902] lock(&pmlmepriv->lock);
[ 363.143921]
*** DEADLOCK ***Make rtw_joinbss_event_prehandle() release the scanned_queue.lock before it deletes the timer to avoid this (it is still holding pmlmepriv->lock protecting against racing the timer).
--- drivers/staging/rtl8723bs/core/rtw_mlme.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme.c +2 -5
@@ -1234,16 +1234,13 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)rtw_indicate_connect (adapter); } +spin_unlock_bh (&pmlmepriv->scanned_queue.lock); +/* s5. Cancel assoc_timer */ del_timer_sync (&pmlmepriv->assoc_timer); - }else {spin_unlock_bh (&(pmlmepriv->scanned_queue.lock)); - goto ignore_joinbss_callback; } - -spin_unlock_bh (&(pmlmepriv->scanned_queue.lock)); - }else if (pnetwork->join_res ==-4 ) {rtw_reset_securitypriv (adapter);_set_timer (&pmlmepriv->assoc_timer,1 );
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 28/279 arm64: dts: qcom: ipq6018: Fix qcom,controlled-remotely property
In reply to Greg Kroah-HartmanFrom: Shawn Guo <[email protected]>
[ Upstream commit 3509de752ea14c7e5781b3a56a4a0bf832f5723a ]
Property qcom,controlled-remotely should be boolean. Fix it.
--- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/ipq6018.dtsi +1 -1
@@ -200,7 +200,7 @@ clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <1>; - qcom,controlled-remotely = <1>; + qcom,controlled-remotely; qcom,config-pipe-trust-reg = <0>; };
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 27/279 arm64: dts: qcom: msm8998: Fix CPU/L2 idle state latency and residency
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit 3f1dcaff642e75c1d2ad03f783fa8a3b1f56dd50 ]
The entry/exit latency and minimum residency in state for the idle states of MSM8998 were ..bad: first of all, for all of them the timings were written for CPU sleep but the min-residency-us param was miscalculated (supposedly, while porting this from downstream); Then, the power collapse states are setting PC on both the CPU cluster *and* the L2 cache, which have different timings: in the specific case of L2 the times are higher so these ones should be taken into account instead of the CPU ones.
This parameter misconfiguration was not giving particular issues because on MSM8998 there was no CPU scaling at all, so cluster/L2 power collapse was rarely (if ever) hit.
When CPU scaling is enabled, though, the wrong timings will produce SoC unstability shown to the user as random, apparently error-less, sudden reboots and/or lockups.
This set of parameters are stabilizing the SoC when CPU scaling is ON and when power collapse is frequently hit.
--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/qcom/msm8998.dtsi +12 -8
@@ -308,38 +308,42 @@ LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 { compatible = "arm,idle-state"; idle-state-name = "little-retention"; + /* CPU Retention (C2D), L2 Active */ arm,psci-suspend-param = <0x00000002>; entry-latency-us = <81>; exit-latency-us = <86>; - min-residency-us = <200>; + min-residency-us = <504>; }; LITTLE_CPU_SLEEP_1: cpu-sleep-0-1 { compatible = "arm,idle-state"; idle-state-name = "little-power-collapse"; + /* CPU + L2 Power Collapse (C3, D4) */ arm,psci-suspend-param = <0x40000003>; - entry-latency-us = <273>; - exit-latency-us = <612>; - min-residency-us = <1000>; + entry-latency-us = <814>; + exit-latency-us = <4562>; + min-residency-us = <9183>; local-timer-stop; }; BIG_CPU_SLEEP_0: cpu-sleep-1-0 { compatible = "arm,idle-state"; idle-state-name = "big-retention"; + /* CPU Retention (C2D), L2 Active */ arm,psci-suspend-param = <0x00000002>; entry-latency-us = <79>; exit-latency-us = <82>; - min-residency-us = <200>; + min-residency-us = <1302>; }; BIG_CPU_SLEEP_1: cpu-sleep-1-1 { compatible = "arm,idle-state"; idle-state-name = "big-power-collapse"; + /* CPU + L2 Power Collapse (C3, D4) */ arm,psci-suspend-param = <0x40000003>; - entry-latency-us = <336>; - exit-latency-us = <525>; - min-residency-us = <1000>; + entry-latency-us = <724>; + exit-latency-us = <2027>; + min-residency-us = <9419>; local-timer-stop; }; };
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 26/279 ARM: BCM53016: Specify switch ports for Meraki MR32
In reply to Greg Kroah-HartmanFrom: Christian Lamparter <[email protected]>
[ Upstream commit 6abc4ca5a28070945e0d68cb4160b309bfbf4b8b ]
the switch identifies itself as a BCM53012 (rev 5)... This patch has been tested & verified on OpenWrt's snapshot with Linux 5.10 (didn't test any older kernels). The MR32 is able to "talk to the network" as before with OpenWrt's SWITCHDEV b53 driver.
| b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 5 | libphy: dsa slave smi: probed | b53-srab-switch 18007000.ethernet-switch poe (uninitialized): | PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL) | b53-srab-switch 18007000.ethernet-switch: Using legacy PHYLIB callbacks. | Please migrate to PHYLINK! | DSA: tree 0 setup
--- arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
arch/arm/boot/dts/bcm53016-meraki-mr32.dts +22 -0
@@ -195,3 +195,25 @@ }; }; }; + +&srab { + status = "okay"; + + ports { + port@0 { + reg = <0>; + label = "poe"; + }; + + port@5 { + reg = <5>; + label = "cpu"; + ethernet = <&gmac0>; + + fixed-link { + speed = <1000>; + duplex-full; + }; + }; + }; +};
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 29/279 arm64: dts: qcom: ipq8074: Fix qcom,controlled-remotely property
In reply to Greg Kroah-HartmanFrom: Shawn Guo <[email protected]>
[ Upstream commit 8c97f0ac4dc8f1743eb8e8a49f66189e13ae45e9 ]
Property qcom,controlled-remotely should be boolean. Fix it.
--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +1 -1
@@ -220,7 +220,7 @@ clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <1>; - qcom,controlled-remotely = <1>; + qcom,controlled-remotely; status = "disabled"; };
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 30/279 arm64: dts: qcom: sdm845: Fix qcom,controlled-remotely property
In reply to Greg Kroah-HartmanFrom: Shawn Guo <[email protected]>
[ Upstream commit 1c8bf398b6b51eb085a49036ad8f9c000171cce1 ]
Property qcom,controlled-remotely should be boolean. Fix it.
--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -1
@@ -2320,7 +2320,7 @@ clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <0>; - qcom,controlled-remotely = <1>; + qcom,controlled-remotely; iommus = <&apps_smmu 0x704 0x1>, <&apps_smmu 0x706 0x1>, <&apps_smmu 0x714 0x1>,
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 31/279 arm64: dts: qcom: msm8916: Add unit name for /soc node
In reply to Greg Kroah-HartmanFrom: Stephan Gerhold <[email protected]>
[ Upstream commit 7a62bfebc8c94bdb6eb8f54f49889dc6b5b79601 ]
This fixes the following warning when building with W=1:
Warning (unit_address_vs_reg): /soc: node has a reg or ranges property, but no unit name
--- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8916.dtsi +1 -1
@@ -414,7 +414,7 @@ }; }; - soc: soc { + soc: soc@0 { #address-cells = <1>; #size-cells = <1>; ranges = <0 0 0 0xffffffff>;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 32/279 arm64: dts: freescale: fix arm,sp805 compatible string
In reply to Greg Kroah-HartmanFrom: Michael Walle <[email protected]>
[ Upstream commit 99a7cacc66cae92db40139b57689be2af75fc6b8 ]
According to Documentation/devicetree/bindings/watchdog/arm,sp805.yaml the compatible is:
compatible = "arm,sp805", "arm,primecell";
The current compatible string doesn't exist at all. Fix it.
--- arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 16 ++++++++-------- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-)
arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi +8 -8
@@ -847,7 +847,7 @@ }; cluster1_core0_watchdog: wdt@c000000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc000000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(16)>,
@@ -857,7 +857,7 @@ }; cluster1_core1_watchdog: wdt@c010000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc010000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(16)>,
@@ -867,7 +867,7 @@ }; cluster1_core2_watchdog: wdt@c020000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc020000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(16)>,
@@ -877,7 +877,7 @@ }; cluster1_core3_watchdog: wdt@c030000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc030000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(16)>,
@@ -887,7 +887,7 @@ }; cluster2_core0_watchdog: wdt@c100000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc100000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(16)>,
@@ -897,7 +897,7 @@ }; cluster2_core1_watchdog: wdt@c110000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc110000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(16)>,
@@ -907,7 +907,7 @@ }; cluster2_core2_watchdog: wdt@c120000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc120000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(16)>,
@@ -917,7 +917,7 @@ }; cluster2_core3_watchdog: wdt@c130000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc130000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(16)>,
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi +8 -8
@@ -387,7 +387,7 @@ }; cluster1_core0_watchdog: wdt@c000000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc000000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>,
@@ -397,7 +397,7 @@ }; cluster1_core1_watchdog: wdt@c010000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc010000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>,
@@ -407,7 +407,7 @@ }; cluster2_core0_watchdog: wdt@c100000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc100000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>,
@@ -417,7 +417,7 @@ }; cluster2_core1_watchdog: wdt@c110000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc110000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>,
@@ -427,7 +427,7 @@ }; cluster3_core0_watchdog: wdt@c200000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc200000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>,
@@ -437,7 +437,7 @@ }; cluster3_core1_watchdog: wdt@c210000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc210000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>,
@@ -447,7 +447,7 @@ }; cluster4_core0_watchdog: wdt@c300000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc300000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>,
@@ -457,7 +457,7 @@ }; cluster4_core1_watchdog: wdt@c310000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xc310000 0x0 0x1000>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>,
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 24/279 staging: rtl8723bs: remove a second possible deadlock
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit a7ac783c338bafc04d3259600646350dba989043 ]
Lockdep complains about rtw_free_assoc_resources() taking the sta_hash_lock followed by it calling rtw_free_stainfo() which takes xmitpriv->lock. While the rtl8723bs_xmit_thread takes the sta_hash_lock while already holding the xmitpriv->lock:
[ 103.849756] ======================================================
[ 103.849761] WARNING: possible circular locking dependency detected
[ 103.849767] 5.15.0-rc1+ #470 Tainted: G C E
[ 103.849773] ------------------------------------------------------
[ 103.849776] wpa_supplicant/695 is trying to acquire lock:
[ 103.849781] ffffa5d0c0562b00 (&pxmitpriv->lock){+.-.}-{2:2}, at: rtw_free_stainfo+0x8a/0x510 [r8723bs]
[ 103.849840]
but task is already holding lock:
[ 103.849843] ffffa5d0c05636a8 (&pstapriv->sta_hash_lock){+.-.}-{2:2}, at: rtw_free_assoc_resources+0x48/0x110 [r8723bs]
[ 103.849881]
which lock already depends on the new lock.[ 103.849884]
the existing dependency chain (in reverse order) is:
[ 103.849887]
-> #1 (&pstapriv->sta_hash_lock){+.-.}-{2:2}:
[ 103.849898] _raw_spin_lock_bh+0x34/0x40
[ 103.849913] rtw_get_stainfo+0x93/0x110 [r8723bs]
[ 103.849948] rtw_make_wlanhdr+0x14a/0x270 [r8723bs]
[ 103.849983] rtw_xmitframe_coalesce+0x5c/0x6c0 [r8723bs]
[ 103.850019] rtl8723bs_xmit_thread+0x4ac/0x620 [r8723bs]
[ 103.850050] kthread+0x143/0x160
[ 103.850058] ret_from_fork+0x22/0x30
[ 103.850067]
-> #0 (&pxmitpriv->lock){+.-.}-{2:2}:
[ 103.850077] __lock_acquire+0x1158/0x1de0
[ 103.850084] lock_acquire+0xb5/0x2b0
[ 103.850090] _raw_spin_lock_bh+0x34/0x40
[ 103.850095] rtw_free_stainfo+0x8a/0x510 [r8723bs]
[ 103.850130] rtw_free_assoc_resources+0x53/0x110 [r8723bs]
[ 103.850159] PHY_IQCalibrate_8723B+0x122b/0x36a0 [r8723bs]
[ 103.850189] cfg80211_disconnect+0x173/0x320 [cfg80211]
[ 103.850331] nl80211_disconnect+0x6e/0xb0 [cfg80211]
[ 103.850422] genl_family_rcv_msg_doit+0xcd/0x110
[ 103.850430] genl_rcv_msg+0xce/0x1c0
[ 103.850435] netlink_rcv_skb+0x50/0xf0
[ 103.850441] genl_rcv+0x24/0x40
[ 103.850446] netlink_unicast+0x16d/0x230
[ 103.850452] netlink_sendmsg+0x22b/0x450
[ 103.850457] sock_sendmsg+0x5e/0x60
[ 103.850465] ____sys_sendmsg+0x22f/0x270
[ 103.850472] ___sys_sendmsg+0x81/0xc0
[ 103.850479] __sys_sendmsg+0x49/0x80
[ 103.850485] do_syscall_64+0x3b/0x90
[ 103.850493] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 103.850500]
other info that might help us debug this:[ 103.850504] Possible unsafe locking scenario:
[ 103.850507] CPU0 CPU1
[ 103.850510] ---- ----
[ 103.850512] lock(&pstapriv->sta_hash_lock);
[ 103.850518] lock(&pxmitpriv->lock);
[ 103.850524] lock(&pstapriv->sta_hash_lock);
[ 103.850530] lock(&pxmitpriv->lock);
[ 103.850535]
*** DEADLOCK ***Push the taking of sta_hash_lock down into rtw_free_stainfo(), where the critical section is, this allows taking the lock after rtw_free_stainfo() has released pxmitpriv->lock.
This requires changing rtw_free_all_stainfo() so that it does its freeing in 2 steps, first moving all stainfo-s to free to a local list while holding the sta_hash_lock and then walking that list to call rtw_free_stainfo() on them without holding the sta_hash_lock.
Pushing the taking of sta_hash_lock down into rtw_free_stainfo(), also fixes a whole bunch of callers of rtw_free_stainfo() which were not holding that lock even though they should.
Note that this also fixes the deadlock from the "remove possible deadlock when disconnect" patch in a different way. But the changes from that patch offer a nice locking cleanup regardless.
--- drivers/staging/rtl8723bs/core/rtw_mlme.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 ---- drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 11 +++++++++-- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 -- 4 files changed, 9 insertions(+), 13 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme.c +0 -5
@@ -897,7 +897,6 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue) {struct mlme_priv *pmlmepriv = &adapter->mlmepriv;struct wlan_network *tgt_network = &pmlmepriv->cur_network; -struct sta_priv *pstapriv = &adapter->stapriv;struct dvobj_priv *psdpriv = adapter->dvobj;struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
@@ -905,11 +904,7 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)struct sta_info *psta; psta =rtw_get_stainfo (&adapter->stapriv, tgt_network->network.mac_address); -spin_lock_bh (&(pstapriv->sta_hash_lock));rtw_free_stainfo (adapter, psta); - -spin_unlock_bh (&(pstapriv->sta_hash_lock)); - }if (check_fwstate (pmlmepriv,WIFI_ADHOC_STATE |WIFI_ADHOC_MASTER_STATE |WIFI_AP_STATE )) {
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -4
@@ -1489,9 +1489,7 @@ unsigned int OnDeAuth(struct adapter *padapter, union recv_frame *precv_frame)struct sta_info *psta;struct sta_priv *pstapriv = &padapter->stapriv; -/* spin_lock_bh(&(pstapriv->sta_hash_lock)); */ /* rtw_free_stainfo(padapter, psta); */ -/* spin_unlock_bh(&(pstapriv->sta_hash_lock)); */ netdev_dbg(padapter->pnetdev, "ap recv deauth reason code(%d) sta:%pM\n", reason,
@@ -1565,9 +1563,7 @@ unsigned int OnDisassoc(struct adapter *padapter, union recv_frame *precv_frame)struct sta_info *psta;struct sta_priv *pstapriv = &padapter->stapriv; -/* spin_lock_bh(&(pstapriv->sta_hash_lock)); */ /* rtw_free_stainfo(padapter, psta); */ -/* spin_unlock_bh(&(pstapriv->sta_hash_lock)); */ netdev_dbg(padapter->pnetdev, "ap recv disassoc reason code(%d) sta:%pM\n",
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c +9 -2
@@ -263,7 +263,6 @@ exit:return psta; } -/* using pstapriv->sta_hash_lock to protect */ u32 rtw_free_stainfo (struct adapter *padapter,struct sta_info *psta) {int i;
@@ -334,8 +333,10 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)spin_unlock_bh (&pxmitpriv->lock); +spin_lock_bh (&pstapriv->sta_hash_lock);list_del_init (&psta->hash_list); pstapriv->asoc_sta_count--; +spin_unlock_bh (&pstapriv->sta_hash_lock);/* re-init sta_info; 20061114 will be init in alloc_stainfo */ /* _rtw_init_sta_xmit_priv(&psta->sta_xmitpriv); */
@@ -430,6 +431,7 @@ void rtw_free_all_stainfo(struct adapter *padapter)struct sta_info *psta =NULL ;struct sta_priv *pstapriv = &padapter->stapriv;struct sta_info *pbcmc_stainfo =rtw_get_bcmc_stainfo (padapter); +LIST_HEAD (stainfo_free_list);if (pstapriv->asoc_sta_count ==1 )return ;
@@ -442,11 +444,16 @@ void rtw_free_all_stainfo(struct adapter *padapter) psta = list_entry(plist, struct sta_info, hash_list);if (pbcmc_stainfo != psta) -rtw_free_stainfo (padapter, psta); +list_move (&psta->hash_list, &stainfo_free_list); } }spin_unlock_bh (&pstapriv->sta_hash_lock); + +list_for_each_safe (plist, tmp, &stainfo_free_list) { + psta = list_entry(plist, struct sta_info, hash_list); +rtw_free_stainfo (padapter, psta); + } }/* any station allocated can be searched by hash list */
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0 -2
@@ -835,9 +835,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) psta =rtw_get_stainfo (pstapriv, param->sta_addr);if (psta) { -spin_lock_bh (&(pstapriv->sta_hash_lock));rtw_free_stainfo (padapter, psta); -spin_unlock_bh (&(pstapriv->sta_hash_lock)); psta =NULL ; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 33/279 arm64: dts: ls1012a: Add serial alias for ls1012a-rdb
In reply to Greg Kroah-HartmanFrom: Kuldeep Singh <[email protected]>
[ Upstream commit 7f31ae6e01da140e34d6513815253e811019f016 ]
U-boot atempts to read serial alias value for ls1012a-rdb but couldn't do so as it is not initialised and thus, FDT_ERR_NOTFOUND error is reported while booting linux.
Loading fdt from FIT Image at a0000000 ...
Description: ls1012ardb-dtb
Type: Flat Device Tree
Data Start: 0xab111474
Data Size: 11285 Bytes = 11 KiB
Architecture: AArch64
Load Address: 0x90000000
Loading fdt from 0xab111474 to 0x90000000
Booting using the fdt blob at 0x90000000
Uncompressing Kernel Image
Loading Device Tree to 000000008fffa000, end 000000008ffffc14 ... OK
WARNING: fdt_fixup_stdout: could not read serial0 alias: FDT_ERR_NOTFOUND
NOTICE: RNG: INSTANTIATEDStarting kernel ...
Fix the above error by specifying serial value to duart.
--- arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts +1 -0
@@ -15,6 +15,7 @@ compatible = "fsl,ls1012a-rdb", "fsl,ls1012a"; aliases { + serial0 = &duart0; mmc0 = &esdhc0; mmc1 = &esdhc1; };
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 16/279 arm64: dts: hisilicon: fix arm,sp805 compatible string
In reply to Greg Kroah-HartmanFrom: Michael Walle <[email protected]>
[ Upstream commit 894d4f1f77d0e88f1f81af2e1e37333c1c41b631 ]
According to Documentation/devicetree/bindings/watchdog/arm,sp805.yaml the compatible is:
compatible = "arm,sp805", "arm,primecell";
The current compatible string doesn't exist at all. Fix it.
--- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 4 ++-- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/hisilicon/hi3660.dtsi +2 -2
@@ -1087,7 +1087,7 @@ }; watchdog0: watchdog@e8a06000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xe8a06000 0x0 0x1000>; interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; clocks = <&crg_ctrl HI3660_OSC32K>,
@@ -1096,7 +1096,7 @@ }; watchdog1: watchdog@e8a07000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xe8a07000 0x0 0x1000>; interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>; clocks = <&crg_ctrl HI3660_OSC32K>,
arch/arm64/boot/dts/hisilicon/hi6220.dtsi +1 -1
@@ -840,7 +840,7 @@ }; watchdog0: watchdog@f8005000 { - compatible = "arm,sp805-wdt", "arm,primecell"; + compatible = "arm,sp805", "arm,primecell"; reg = <0x0 0xf8005000 0x0 0x1000>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; clocks = <&ao_ctrl HI6220_WDT0_PCLK>,
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 34/279 RDMA/rxe: Separate HW and SW l/rkeys
In reply to Greg Kroah-HartmanFrom: Bob Pearson <[email protected]>
[ Upstream commit 001345339f4ca85790a1644a74e33ae77ac116be ]
Separate software and simulated hardware lkeys and rkeys for MRs and MWs. This makes struct ib_mr and struct ib_mw isolated from hardware changes triggered by executing work requests.
This change fixes a bug seen in blktest.
--- drivers/infiniband/sw/rxe/rxe_loc.h | 1 + drivers/infiniband/sw/rxe/rxe_mr.c | 69 ++++++++++++++++++++++----- drivers/infiniband/sw/rxe/rxe_mw.c | 30 ++++++------ drivers/infiniband/sw/rxe/rxe_req.c | 14 ++---- drivers/infiniband/sw/rxe/rxe_verbs.h | 18 ++----- 5 files changed, 81 insertions(+), 51 deletions(-)
drivers/infiniband/sw/rxe/rxe_loc.h +1 -0
@@ -86,6 +86,7 @@ struct rxe_mr *lookup_mr(struct rxe_pd *pd, int access, u32 key,int mr_check_range (struct rxe_mr *mr,u64 iova,size_t length);int advance_dma_data (struct rxe_dma_info *dma,unsigned int length);int rxe_invalidate_mr (struct rxe_qp *qp,u32 rkey); +int rxe_reg_fast_mr (struct rxe_qp *qp,struct rxe_send_wqe *wqe);int rxe_dereg_mr (struct ib_mr *ibmr,struct ib_udata *udata);void rxe_mr_cleanup (struct rxe_pool_entry *arg);
drivers/infiniband/sw/rxe/rxe_mr.c +58 -11
99 lines not on this page · raw message
drivers/infiniband/sw/rxe/rxe_mw.c +14 -16
@@ -21,7 +21,7 @@ int rxe_alloc_mw(struct ib_mw *ibmw, struct ib_udata *udata) }rxe_add_index (mw); - ibmw->rkey = (mw->pelem.index <<8 ) |rxe_get_next_key (-1 ); + mw->rkey = ibmw->rkey = (mw->pelem.index <<8 ) |rxe_get_next_key (-1 ); mw->state = (mw->ibmw.type ==IB_MW_TYPE_2 ) ?RXE_MW_STATE_FREE :RXE_MW_STATE_VALID ;spin_lock_init (&mw->lock);
@@ -71,6 +71,8 @@ int rxe_dealloc_mw(struct ib_mw *ibmw)static int rxe_check_bind_mw (struct rxe_qp *qp,struct rxe_send_wqe *wqe,struct rxe_mw *mw,struct rxe_mr *mr) { +u32 key = wqe->wr.wr.mw.rkey &0xff ; +if (mw->ibmw.type ==IB_MW_TYPE_1 ) {if (unlikely (mw->state !=RXE_MW_STATE_VALID )) { pr_err_once(
@@ -108,7 +110,7 @@ static int rxe_check_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe, } } -if (unlikely ((wqe->wr.wr.mw.rkey &0xff ) == (mw->ibmw.rkey &0xff ))) { +if (unlikely (key == (mw->rkey &0xff ))) {pr_err_once ("attempt to bind MW with same key\n" );return -EINVAL ; }
@@ -161,13 +163,9 @@ static int rxe_check_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe,static void rxe_do_bind_mw (struct rxe_qp *qp,struct rxe_send_wqe *wqe,struct rxe_mw *mw,struct rxe_mr *mr) { -u32 rkey; -u32 new_rkey; - - rkey = mw->ibmw.rkey; - new_rkey = (rkey &0xffffff00 ) | (wqe->wr.wr.mw.rkey &0x000000ff ); +u32 key = wqe->wr.wr.mw.rkey &0xff ; - mw->ibmw.rkey = new_rkey; + mw->rkey = (mw->rkey & ~0xff ) | key; mw->access = wqe->wr.wr.mw.access; mw->state =RXE_MW_STATE_VALID ; mw->addr = wqe->wr.wr.mw.addr;
@@ -197,29 +195,29 @@ int rxe_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe)struct rxe_mw *mw;struct rxe_mr *mr;struct rxe_dev *rxe =to_rdev (qp->ibqp.device); +u32 mw_rkey = wqe->wr.wr.mw.mw_rkey; +u32 mr_lkey = wqe->wr.wr.mw.mr_lkey;unsigned long flags; - mw =rxe_pool_get_index (&rxe->mw_pool, - wqe->wr.wr.mw.mw_rkey >>8 ); + mw =rxe_pool_get_index (&rxe->mw_pool, mw_rkey >>8 );if (unlikely (!mw)) { ret = -EINVAL ; goto err; } -if (unlikely (mw->ibmw.rkey != wqe->wr.wr.mw.mw_rkey)) { +if (unlikely (mw->rkey != mw_rkey)) { ret = -EINVAL ; goto err_drop_mw; }if (likely (wqe->wr.wr.mw.length)) { - mr =rxe_pool_get_index (&rxe->mr_pool, - wqe->wr.wr.mw.mr_lkey >>8 ); + mr =rxe_pool_get_index (&rxe->mr_pool, mr_lkey >>8 );if (unlikely (!mr)) { ret = -EINVAL ; goto err_drop_mw; } -if (unlikely (mr->ibmr.lkey != wqe->wr.wr.mw.mr_lkey)) { +if (unlikely (mr->lkey != mr_lkey)) { ret = -EINVAL ; goto err_drop_mr; }
@@ -292,7 +290,7 @@ int rxe_invalidate_mw(struct rxe_qp *qp, u32 rkey) goto err; } -if (rkey != mw->ibmw.rkey) { +if (rkey != mw->rkey) { ret = -EINVAL ; goto err_drop_ref; }
@@ -323,7 +321,7 @@ struct rxe_mw *rxe_lookup_mw(struct rxe_qp *qp, int access, u32 rkey)if (!mw)return NULL ; - if (unlikely((rxe_mw_rkey(mw) != rkey) || rxe_mw_pd(mw) != pd || + if (unlikely((mw->rkey != rkey) || rxe_mw_pd(mw) != pd || (mw->ibmw.type == IB_MW_TYPE_2 && mw->qp != qp) || (mw->length == 0) || (access && !(access & mw->access)) ||
drivers/infiniband/sw/rxe/rxe_req.c +5 -9
@@ -572,7 +572,6 @@ static void update_state(struct rxe_qp *qp, struct rxe_send_wqe *wqe,static int rxe_do_local_ops (struct rxe_qp *qp,struct rxe_send_wqe *wqe) {u8 opcode = wqe->wr.opcode; -struct rxe_mr *mr;u32 rkey;int ret;
@@ -590,14 +589,11 @@ static int rxe_do_local_ops(struct rxe_qp *qp, struct rxe_send_wqe *wqe) }break ;case IB_WR_REG_MR : - mr =to_rmr (wqe->wr.wr.reg.mr); -rxe_add_ref (mr); - mr->state =RXE_MR_STATE_VALID ; - mr->access = wqe->wr.wr.reg.access; - mr->ibmr.lkey = wqe->wr.wr.reg.key; - mr->ibmr.rkey = wqe->wr.wr.reg.key; - mr->iova = wqe->wr.wr.reg.mr->iova; -rxe_drop_ref (mr); + ret =rxe_reg_fast_mr (qp, wqe); +if (unlikely (ret)) { + wqe->status =IB_WC_LOC_QP_OP_ERR ; +return ret; + }break ;case IB_WR_BIND_MW : ret =rxe_bind_mw (qp, wqe);
drivers/infiniband/sw/rxe/rxe_verbs.h +3 -15
@@ -313,6 +313,8 @@ struct rxe_mr {struct ib_umem *umem; +u32 lkey; +u32 rkey;enum rxe_mr_state state;enum rxe_mr_type type;u64 va;
@@ -350,6 +352,7 @@ struct rxe_mw {enum rxe_mw_state state;struct rxe_qp *qp;/* Type 2 only */ struct rxe_mr *mr; +u32 rkey;int access;u64 addr;u64 length;
@@ -474,26 +477,11 @@ static inline struct rxe_pd *mr_pd(struct rxe_mr *mr)return to_rpd (mr->ibmr.pd); } -static inline u32 mr_lkey (struct rxe_mr *mr) -{ -return mr->ibmr.lkey; -} - -static inline u32 mr_rkey (struct rxe_mr *mr) -{ -return mr->ibmr.rkey; -} -static inline struct rxe_pd *rxe_mw_pd (struct rxe_mw *mw) {return to_rpd (mw->ibmw.pd); } -static inline u32 rxe_mw_rkey (struct rxe_mw *mw) -{ -return mw->ibmw.rkey; -} -int rxe_register_device (struct rxe_dev *rxe,const char *ibdev_name);void rxe_mc_cleanup (struct rxe_pool_entry *arg);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 39/279 ASoC: es8316: Use IRQF_NO_AUTOEN when requesting the IRQ
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 1cf2aa665901054b140eb71748661ceae99b6b5a ]
Use the new IRQF_NO_AUTOEN flag when requesting the IRQ, rather then disabling it immediately after requesting it.
This fixes a possible race where the IRQ might trigger between requesting and disabling it; and this also leads to a small code cleanup.
--- sound/soc/codecs/es8316.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
sound/soc/codecs/es8316.c +2 -5
@@ -811,12 +811,9 @@ static int es8316_i2c_probe(struct i2c_client *i2c_client,mutex_init (&es8316->lock); ret =devm_request_threaded_irq (dev, es8316->irq,NULL , es8316_irq, -IRQF_TRIGGER_HIGH |IRQF_ONESHOT , +IRQF_TRIGGER_HIGH |IRQF_ONESHOT |IRQF_NO_AUTOEN ,"es8316" , es8316); -if (ret ==0 ) { -/* Gets re-enabled by es8316_set_jack() */ -disable_irq (es8316->irq); - }else { +if (ret) {dev_warn (dev,"Failed to get IRQ %d: %d\n" , es8316->irq, ret); es8316->irq = -ENXIO ; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 37/279 ALSA: usb-audio: disable implicit feedback sync for Behringer UFX1204 and UFX1604
In reply to Greg Kroah-HartmanFrom: Geraldo Nascimento <[email protected]>
[ Upstream commit 28c369e60827f706cef4604a3e2848198f25bd26 ]
Behringer UFX1204 and UFX1604 have Synchronous endpoints to which current ALSA code applies implicit feedback sync as if they were Asynchronous endpoints. This breaks UAC compliance and is unneeded.
The commit 5e35dc0338d85ccebacf3f77eca1e5dea73155e8 and subsequent 1a15718b41df026cffd0e42cfdc38a1384ce19f9 were meant to clear up noise.
Unfortunately, noise persisted for those using higher sample rates and this was only solved by commit d2e8f641257d0d3af6e45d6ac2d6f9d56b8ea964
Since there are no more reports of noise, let's get rid of the implicit-fb quirks breaking UAC compliance.
--- sound/usb/implicit.c | 2 -- 1 file changed, 2 deletions(-)
sound/usb/implicit.c +0 -2
@@ -54,8 +54,6 @@ static const struct snd_usb_implicit_fb_match playback_implicit_fb_quirks[] = {/* Fixed EP */ /* FIXME: check the availability of generic matching */ -IMPLICIT_FB_FIXED_DEV (0x1397 ,0x0001 ,0x81 ,1 ),/* Behringer UFX1604 */ -IMPLICIT_FB_FIXED_DEV (0x1397 ,0x0002 ,0x81 ,1 ),/* Behringer UFX1204 */ IMPLICIT_FB_FIXED_DEV (0x2466 ,0x8010 ,0x81 ,2 ),/* Fractal Audio Axe-Fx III */ IMPLICIT_FB_FIXED_DEV (0x31e9 ,0x0001 ,0x81 ,2 ),/* Solid State Logic SSL2 */ IMPLICIT_FB_FIXED_DEV(0x31e9, 0x0002, 0x81, 2), /* Solid State Logic SSL2+ */
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 38/279 clk: imx: imx6ul: Move csi_sel mux to correct base register
In reply to Greg Kroah-HartmanFrom: Stefan Riedmueller <[email protected]>
[ Upstream commit 2f9d61869640f732599ec36b984c2b5c46067519 ]
The csi_sel mux register is located in the CCM register base and not the CCM_ANALOG register base. So move it to the correct position in code.
Otherwise changing the parent of the csi clock can lead to a complete system failure due to the CCM_ANALOG_PLL_SYS_TOG register being falsely modified.
Also remove the SET_RATE_PARENT flag since one possible supply for the csi_sel mux is the system PLL which we don't want to modify.
--- drivers/clk/imx/clk-imx6ul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk-imx6ul.c +1 -1
@@ -161,7 +161,6 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node) hws[IMX6UL_PLL5_BYPASS ] =imx_clk_hw_mux_flags ("pll5_bypass" , base +0xa0 ,16 ,1 , pll5_bypass_sels,ARRAY_SIZE (pll5_bypass_sels),CLK_SET_RATE_PARENT ); hws[IMX6UL_PLL6_BYPASS ] =imx_clk_hw_mux_flags ("pll6_bypass" , base +0xe0 ,16 ,1 , pll6_bypass_sels,ARRAY_SIZE (pll6_bypass_sels),CLK_SET_RATE_PARENT ); hws[IMX6UL_PLL7_BYPASS ] =imx_clk_hw_mux_flags ("pll7_bypass" , base +0x20 ,16 ,1 , pll7_bypass_sels,ARRAY_SIZE (pll7_bypass_sels),CLK_SET_RATE_PARENT ); - hws[IMX6UL_CLK_CSI_SEL ] =imx_clk_hw_mux_flags ("csi_sel" , base +0x3c ,9 ,2 , csi_sels,ARRAY_SIZE (csi_sels),CLK_SET_RATE_PARENT );/* Do not bypass PLLs initially */ clk_set_parent (hws[IMX6UL_PLL1_BYPASS ]->clk, hws[IMX6UL_CLK_PLL1 ]->clk);
@@ -270,6 +269,7 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node) hws[IMX6UL_CLK_ECSPI_SEL ] =imx_clk_hw_mux ("ecspi_sel" , base +0x38 ,18 ,1 , ecspi_sels,ARRAY_SIZE (ecspi_sels)); hws[IMX6UL_CLK_LCDIF_PRE_SEL ] =imx_clk_hw_mux_flags ("lcdif_pre_sel" , base +0x38 ,15 ,3 , lcdif_pre_sels,ARRAY_SIZE (lcdif_pre_sels),CLK_SET_RATE_PARENT ); hws[IMX6UL_CLK_LCDIF_SEL ] =imx_clk_hw_mux ("lcdif_sel" , base +0x38 ,9 ,3 , lcdif_sels,ARRAY_SIZE (lcdif_sels)); + hws[IMX6UL_CLK_CSI_SEL ] =imx_clk_hw_mux ("csi_sel" , base +0x3c ,9 ,2 , csi_sels,ARRAY_SIZE (csi_sels)); hws[IMX6UL_CLK_LDB_DI0_DIV_SEL ] =imx_clk_hw_mux ("ldb_di0" , base +0x20 ,10 ,1 , ldb_di0_div_sels,ARRAY_SIZE (ldb_di0_div_sels)); hws[IMX6UL_CLK_LDB_DI1_DIV_SEL ] =imx_clk_hw_mux ("ldb_di1" , base +0x20 ,11 ,1 , ldb_di1_div_sels,ARRAY_SIZE (ldb_di1_div_sels));
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 36/279 scsi: core: Fix scsi_mode_sense() buffer length handling
In reply to Greg Kroah-HartmanFrom: Damien Le Moal <[email protected]>
[ Upstream commit 17b49bcbf8351d3dbe57204468ac34f033ed60bc ]
Several problems exist with scsi_mode_sense() buffer length handling:
1) The allocation length field of the MODE SENSE(10) command is 16-bits, occupying bytes 7 and 8 of the CDB. With this command, access to mode pages larger than 255 bytes is thus possible. However, the CDB allocation length field is set by assigning len to byte 8 only, thus truncating buffer length larger than 255.
2) If scsi_mode_sense() is called with len smaller than 8 with sdev->use_10_for_ms set, or smaller than 4 otherwise, the buffer length is increased to 8 and 4 respectively, and the buffer is zero filled with these increased values, thus corrupting the memory following the buffer.
Fix these 2 problems by using put_unaligned_be16() to set the allocation length field of MODE SENSE(10) CDB and by returning an error when len is too small.
Furthermore, if len is larger than 255B, always try MODE SENSE(10) first, even if the device driver did not set sdev->use_10_for_ms. In case of invalid opcode error for MODE SENSE(10), access to mode pages larger than 255 bytes are not retried using MODE SENSE(6). To avoid buffer length overflows for the MODE_SENSE(10) case, check that len is smaller than 65535 bytes.
While at it, also fix the folowing:
* Use get_unaligned_be16() to retrieve the mode data length and block descriptor length fields of the mode sense reply header instead of using an open coded calculation.
* Fix the kdoc dbd argument explanation: the DBD bit stands for Disable Block Descriptor, which is the opposite of what the dbd argument description was.
--- drivers/scsi/scsi_lib.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)
drivers/scsi/scsi_lib.c +15 -10
@@ -2074,7 +2074,7 @@ EXPORT_SYMBOL_GPL(scsi_mode_select);/** * scsi_mode_sense - issue a mode sense, falling back from 10 to six bytes if necessary. * @sdev: SCSI device to be queried -* @dbd: set if mode sense will allow block descriptors to be returned +* @dbd: set to prevent mode sense from returning block descriptors * @modepage: mode page being requested * @buffer: request buffer (may not be smaller than eight bytes) * @len: length of request buffer.
@@ -2109,18 +2109,18 @@ scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, sshdr = &my_sshdr; retry: - use_10_for_ms = sdev->use_10_for_ms; + use_10_for_ms = sdev->use_10_for_ms || len >255 ;if (use_10_for_ms) { -if (len <8 ) - len =8 ; +if (len <8 || len >65535 ) +return -EINVAL ; cmd[0 ] =MODE_SENSE_10 ; - cmd[8 ] = len; +put_unaligned_be16 (len, &cmd[7 ]); header_length =8 ; }else {if (len <4 ) - len =4 ; +return -EINVAL ; cmd[0 ] =MODE_SENSE ; cmd[4 ] = len;
@@ -2144,9 +2144,15 @@ scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage,if ((sshdr->sense_key ==ILLEGAL_REQUEST ) && (sshdr->asc ==0x20 ) && (sshdr->ascq ==0 )) {/* -* Invalid command operation code +* Invalid command operation code: retry using +* MODE SENSE(6) if this was a MODE SENSE(10) +* request, except if the request mode page is +* too large for MODE SENSE single byte +* allocation length field. */ if (use_10_for_ms) { +if (len >255 ) +return -EIO ; sdev->use_10_for_ms =0 ; goto retry; }
@@ -2170,12 +2176,11 @@ scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, data->longlba =0 ; data->block_descriptor_length =0 ; }else if (use_10_for_ms) { - data->length = buffer[0 ]*256 + buffer[1 ] +2 ; + data->length =get_unaligned_be16 (&buffer[0 ]) +2 ; data->medium_type = buffer[2 ]; data->device_specific = buffer[3 ]; data->longlba = buffer[4 ] &0x01 ; - data->block_descriptor_length = buffer[6 ]*256 - + buffer[7 ]; + data->block_descriptor_length =get_unaligned_be16 (&buffer[6 ]); }else { data->length = buffer[0 ] +1 ; data->medium_type = buffer[1 ];
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 35/279 ASoC: SOF: Intel: hda-dai: fix potential locking issue
In reply to Greg Kroah-HartmanFrom: Pierre-Louis Bossart <[email protected]>
[ Upstream commit a20f3b10de61add5e14b6ce4df982f4df2a4cbbc ]
The initial hdac_stream code was adapted a third time with the same locking issues. Move the spin_lock outside the loops and make sure the fields are protected on read/write.
--- sound/soc/sof/intel/hda-dai.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/sof/intel/hda-dai.c +4 -3
@@ -68,6 +68,7 @@ static struct hdac_ext_stream *return NULL ; } +spin_lock_irq (&bus->reg_lock);list_for_each_entry (stream, &bus->stream_list, list) {struct hdac_ext_stream *hstream =stream_to_hdac_ext_stream (stream);
@@ -107,12 +108,12 @@ static struct hdac_ext_stream ** is updated in snd_hdac_ext_stream_decouple(). */ if (!res->decoupled) -snd_hdac_ext_stream_decouple (bus, res, true); -spin_lock_irq (&bus->reg_lock); +snd_hdac_ext_stream_decouple_locked (bus, res, true); + res->link_locked =1 ; res->link_substream = substream; -spin_unlock_irq (&bus->reg_lock); } +spin_unlock_irq (&bus->reg_lock);return res; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 40/279 ASoC: rt5651: Use IRQF_NO_AUTOEN when requesting the IRQ
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 6e037b72cf4ea6c28a131ea021d63ee4e7e6fa64 ]
Use the new IRQF_NO_AUTOEN flag when requesting the IRQ, rather then disabling it immediately after requesting it.
This fixes a possible race where the IRQ might trigger between requesting and disabling it; and this also leads to a small code cleanup.
--- sound/soc/codecs/rt5651.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
sound/soc/codecs/rt5651.c +2 -5
@@ -2261,11 +2261,8 @@ static int rt5651_i2c_probe(struct i2c_client *i2c, ret =devm_request_irq (&i2c->dev, rt5651->irq, rt5651_irq,IRQF_TRIGGER_RISING |IRQF_TRIGGER_FALLING - |IRQF_ONESHOT ,"rt5651" , rt5651); -if (ret ==0 ) { -/* Gets re-enabled by rt5651_set_jack() */ -disable_irq (rt5651->irq); - }else { + |IRQF_ONESHOT |IRQF_NO_AUTOEN ,"rt5651" , rt5651); +if (ret) {dev_warn (&i2c->dev,"Failed to reguest IRQ %d: %d\n" , rt5651->irq, ret); rt5651->irq = -ENXIO ;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 43/279 scsi: smartpqi: Add controller handshake during kdump
In reply to Greg Kroah-HartmanFrom: Mahesh Rajashekhara <[email protected]>
[ Upstream commit 9ee5d6e9ac52a3c8625697535f8e35864d9fd38c ]
Correct kdump hangs when controller is locked up.
There are occasions when a controller reboot (controller soft reset) is issued when a controller firmware crash dump is in progress.
This leads to incomplete controller firmware crash dump:
- When the controller crash dump is in progress, and a kdump is initiated, the driver issues inbound doorbell reset to bring back the controller in SIS mode.
- If the controller is in locked up state, the inbound doorbell reset does not work causing controller initialization failures. This results in the driver hanging waiting for SIS mode.
To avoid an incomplete controller crash dump, add in a controller crash dump handshake:
- Controller will indicate start and end of the controller crash dump by setting some register bits.
- Driver will look these bits when a kdump is initiated. If a controller crash dump is in progress, the driver will wait for the controller crash dump to complete before issuing the controller soft reset then complete driver initialization.
--- drivers/scsi/smartpqi/smartpqi_init.c | 41 +++++++++++++++++++-- drivers/scsi/smartpqi/smartpqi_sis.c | 51 +++++++++++++++++++++++++++ drivers/scsi/smartpqi/smartpqi_sis.h | 1 + 3 files changed, 91 insertions(+), 2 deletions(-)
drivers/scsi/smartpqi/smartpqi_init.c +39 -2
@@ -234,15 +234,46 @@ static inline bool pqi_is_hba_lunid(u8 *scsi3addr)return pqi_scsi3addr_equal (scsi3addr,RAID_CTLR_LUNID ); } +#define PQI_DRIVER_SCRATCH_PQI_MODE 0x1 +#define PQI_DRIVER_SCRATCH_FW_TRIAGE_SUPPORTED 0x2 +static inline enum pqi_ctrl_mode pqi_get_ctrl_mode (struct pqi_ctrl_info *ctrl_info) { -return sis_read_driver_scratch (ctrl_info); +return sis_read_driver_scratch (ctrl_info) &PQI_DRIVER_SCRATCH_PQI_MODE ?PQI_MODE :SIS_MODE ; }static inline void pqi_save_ctrl_mode (struct pqi_ctrl_info *ctrl_info,enum pqi_ctrl_mode mode) { -sis_write_driver_scratch (ctrl_info, mode); +u32 driver_scratch; + + driver_scratch =sis_read_driver_scratch (ctrl_info); + +if (mode ==PQI_MODE ) + driver_scratch |=PQI_DRIVER_SCRATCH_PQI_MODE ; +else + driver_scratch &= ~PQI_DRIVER_SCRATCH_PQI_MODE ; + +sis_write_driver_scratch (ctrl_info, driver_scratch); +} + +static inline bool pqi_is_fw_triage_supported (struct pqi_ctrl_info *ctrl_info) +{ +return (sis_read_driver_scratch (ctrl_info) &PQI_DRIVER_SCRATCH_FW_TRIAGE_SUPPORTED ) !=0 ; +} + +static inline void pqi_save_fw_triage_setting (struct pqi_ctrl_info *ctrl_info,bool is_supported) +{ +u32 driver_scratch; + + driver_scratch =sis_read_driver_scratch (ctrl_info); + +if (is_supported) + driver_scratch |=PQI_DRIVER_SCRATCH_FW_TRIAGE_SUPPORTED ; +else + driver_scratch &= ~PQI_DRIVER_SCRATCH_FW_TRIAGE_SUPPORTED ; + +sis_write_driver_scratch (ctrl_info, driver_scratch); }static inline void pqi_ctrl_block_scan (struct pqi_ctrl_info *ctrl_info)
@@ -7301,6 +7332,7 @@ static void pqi_ctrl_update_feature_flags(struct pqi_ctrl_info *ctrl_info, ctrl_info->unique_wwid_in_report_phys_lun_supported = firmware_feature->enabled;break ; +pqi_save_fw_triage_setting (ctrl_info, firmware_feature->enabled); }pqi_firmware_feature_status (ctrl_info, firmware_feature);
@@ -7627,6 +7659,11 @@ static int pqi_ctrl_init(struct pqi_ctrl_info *ctrl_info)u32 product_id;if (reset_devices) { +if (pqi_is_fw_triage_supported (ctrl_info)) { + rc =sis_wait_for_fw_triage_completion (ctrl_info); +if (rc) +return rc; + }sis_soft_reset (ctrl_info);msleep (PQI_POST_RESET_DELAY_SECS *PQI_HZ ); }else {
drivers/scsi/smartpqi/smartpqi_sis.c +51 -0
75 lines not on this page · raw message
drivers/scsi/smartpqi/smartpqi_sis.h +1 -0
@@ -28,5 +28,6 @@ void sis_write_driver_scratch(struct pqi_ctrl_info *ctrl_info, u32 value);u32 sis_read_driver_scratch (struct pqi_ctrl_info *ctrl_info);void sis_soft_reset (struct pqi_ctrl_info *ctrl_info);u32 sis_get_product_id (struct pqi_ctrl_info *ctrl_info); +int sis_wait_for_fw_triage_completion (struct pqi_ctrl_info *ctrl_info);#endif /* _SMARTPQI_SIS_H */
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 42/279 scsi: advansys: Fix kernel pointer leak
In reply to Greg Kroah-HartmanFrom: Guo Zhi <[email protected]>
[ Upstream commit d4996c6eac4c81b8872043e9391563f67f13e406 ]
Pointers should be printed with %p or %px rather than cast to 'unsigned long' and printed with %lx.
Change %lx to %p to print the hashed pointer.
--- drivers/scsi/advansys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/advansys.c +2 -2
@@ -3308,8 +3308,8 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost) shost->host_no);seq_printf (m, -" iop_base 0x%lx, cable_detect: %X, err_code %u\n" , - (unsigned long )v->iop_base, +" iop_base 0x%p, cable_detect: %X, err_code %u\n" , + v->iop_base,AdvReadWordRegister (iop_base,IOPW_SCSI_CFG1 ) &CABLE_DETECT , v->err_code);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 41/279 ASoC: nau8824: Add DMI quirk mechanism for active-high jack-detect
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 92d3360108f1839ca40451bad20ff67dd24a1964 ]
Add a quirk mechanism to allow specifying that active-high jack-detection should be used on platforms where this info is not available in devicetree.
And add an entry for the Cyberbook T116 tablet to the DMI table, so that jack-detection will work properly on this tablet.
--- sound/soc/codecs/nau8824.c | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
sound/soc/codecs/nau8824.c +40 -0
@@ -8,6 +8,7 @@#include <linux/module.h> #include <linux/delay.h> +#include <linux/dmi.h> #include <linux/init.h> #include <linux/i2c.h> #include <linux/regmap.h>
@@ -27,6 +28,12 @@#include "nau8824.h" +#define NAU8824_JD_ACTIVE_HIGH BIT(0) + +static int nau8824_quirk; +static int quirk_override =-1 ; +module_param_named (quirk, quirk_override, uint,0444 ); +MODULE_PARM_DESC (quirk,"Board-specific quirk override" );static int nau8824_config_sysclk (struct nau8824 *nau8824,int clk_id,unsigned int freq);
@@ -1845,6 +1852,34 @@ static int nau8824_read_device_properties(struct device *dev,return 0 ; } +/* Please keep this list alphabetically sorted */ +static const struct dmi_system_id nau8824_quirk_table[] = { + { +/* Cyberbook T116 rugged tablet */ + .matches = { +DMI_EXACT_MATCH (DMI_BOARD_VENDOR ,"Default string" ), +DMI_EXACT_MATCH (DMI_BOARD_NAME ,"Cherry Trail CR" ), +DMI_EXACT_MATCH (DMI_PRODUCT_SKU ,"20170531" ), + }, + .driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH ), + }, + {} +}; + +static void nau8824_check_quirks (void ) +{ +const struct dmi_system_id *dmi_id; + +if (quirk_override !=-1 ) { + nau8824_quirk = quirk_override; +return ; + } + + dmi_id =dmi_first_match (nau8824_quirk_table); +if (dmi_id) + nau8824_quirk = (unsigned long )dmi_id->driver_data; +} +static int nau8824_i2c_probe (struct i2c_client *i2c,const struct i2c_device_id *id) {
@@ -1869,6 +1904,11 @@ static int nau8824_i2c_probe(struct i2c_client *i2c, nau8824->irq = i2c->irq;sema_init (&nau8824->jd_sem,1 ); +nau8824_check_quirks (); + +if (nau8824_quirk &NAU8824_JD_ACTIVE_HIGH ) + nau8824->jkdet_polarity =0 ; +nau8824_print_device_properties (nau8824); ret =regmap_read (nau8824->regmap,NAU8824_REG_I2C_DEVICE_ID , &value);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 17/279 RDMA/bnxt_re: Check if the vlan is valid before reporting
In reply to Greg Kroah-HartmanFrom: Selvin Xavier <[email protected]>
[ Upstream commit 6bda39149d4b8920fdb8744090653aca3daa792d ]
When VF is configured with default vlan, HW strips the vlan from the packet and driver receives it in Rx completion. VLAN needs to be reported for UD work completion only if the vlan is configured on the host. Add a check for valid vlan in the UD receive path.
--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +9 -3
@@ -3354,8 +3354,11 @@ static void bnxt_re_process_res_ud_wc(struct bnxt_re_qp *qp,struct ib_wc *wc, struct bnxt_qplib_cqe *cqe) { + struct bnxt_re_dev *rdev; +u16 vlan_id =0 ;u8 nw_type; + rdev = qp->rdev; wc->opcode =IB_WC_RECV ; wc->status =__rc_to_ib_wc_status (cqe->status);
@@ -3367,9 +3370,12 @@ static void bnxt_re_process_res_ud_wc(struct bnxt_re_qp *qp,memcpy (wc->smac, cqe->smac,ETH_ALEN ); wc->wc_flags |=IB_WC_WITH_SMAC ;if (cqe->flags &CQ_RES_UD_FLAGS_META_FORMAT_VLAN ) { - wc->vlan_id = (cqe->cfa_meta &0xFFF ); -if (wc->vlan_id <0x1000 ) - wc->wc_flags |=IB_WC_WITH_VLAN ; + vlan_id = (cqe->cfa_meta &0xFFF ); + } +/* Mark only if vlan_id is non zero */ +if (vlan_id &&bnxt_re_check_if_vlan_valid (rdev, vlan_id)) { + wc->vlan_id = vlan_id; + wc->wc_flags |=IB_WC_WITH_VLAN ; } nw_type = (cqe->flags &CQ_RES_UD_FLAGS_ROCE_IP_VER_MASK ) >>CQ_RES_UD_FLAGS_ROCE_IP_VER_SFT ;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 44/279 arm64: dts: imx8mm-kontron: Fix reset delays for ethernet PHY
In reply to Greg Kroah-HartmanFrom: Frieder Schrempf <[email protected]>
[ Upstream commit 315e7b884190a6c9c28e95ad3b724dde9e922b99 ]
According to the datasheet the VSC8531 PHY expects a reset pulse of 100 ns and a delay of 15 ms after the reset has been deasserted. Set the matching values in the devicetree.
--- arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts +2 -2
@@ -123,8 +123,8 @@ ethphy: ethernet-phy@0 { reg = <0>; - reset-assert-us = <100>; - reset-deassert-us = <100>; + reset-assert-us = <1>; + reset-deassert-us = <15000>; reset-gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; }; };
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 45/279 ALSA: intel-dsp-config: add quirk for APL/GLK/TGL devices based on ES8336 codec
In reply to Greg Kroah-HartmanFrom: Pierre-Louis Bossart <[email protected]>
[ Upstream commit 9d36ceab94151f07cf3fcb067213ac87937adf12 ]
These devices are based on an I2C/I2S device, we need to force the use of the SOF driver otherwise the legacy HDaudio driver will be loaded - only HDMI will be supported.
--- sound/hda/intel-dsp-config.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
sound/hda/intel-dsp-config.c +20 -2
@@ -31,6 +31,7 @@ struct config_entry {u16 device;u8 acpi_hid[ACPI_ID_LEN ];const struct dmi_system_id *dmi_table; +u8 codec_hid[ACPI_ID_LEN ]; };/*
@@ -56,7 +57,7 @@ static const struct config_entry config_table[] = {/* * Apollolake (Broxton-P) * the legacy HDAudio driver is used except on Up Squared (SOF) and -* Chromebooks (SST) +* Chromebooks (SST), as well as devices based on the ES8336 codec */ #if IS_ENABLED (CONFIG_SND_SOC_SOF_APOLLOLAKE ) {
@@ -73,6 +74,11 @@ static const struct config_entry config_table[] = { {} } }, + { + .flags = FLAG_SOF, + .device = 0x5a98, + .codec_hid = "ESSX8336", + }, #endif#if IS_ENABLED (CONFIG_SND_SOC_INTEL_APL ) {
@@ -137,7 +143,7 @@ static const struct config_entry config_table[] = {/* * Geminilake uses legacy HDAudio driver except for Google -* Chromebooks +* Chromebooks and devices based on the ES8336 codec */ /* Geminilake */ #if IS_ENABLED (CONFIG_SND_SOC_SOF_GEMINILAKE )
@@ -154,6 +160,11 @@ static const struct config_entry config_table[] = { {} } }, + { + .flags = FLAG_SOF, + .device = 0x3198, + .codec_hid = "ESSX8336", + }, #endif/*
@@ -311,6 +322,11 @@ static const struct config_entry config_table[] = { .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .device = 0x43c8, }, + { + .flags = FLAG_SOF, + .device = 0xa0c8, + .codec_hid = "ESSX8336", + },#endif /* Elkhart Lake */
@@ -354,6 +370,8 @@ static const struct config_entry *snd_intel_dsp_find_configcontinue ;if (table->dmi_table && !dmi_check_system (table->dmi_table))continue ; +if (table->codec_hid[0 ] && !acpi_dev_present (table->codec_hid,NULL ,-1 )) +continue ;return table; }return NULL ;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 46/279 ASoC: Intel: soc-acpi: add missing quirk for TGL SDCA single amp
In reply to Greg Kroah-HartmanFrom: Pierre-Louis Bossart <[email protected]>
[ Upstream commit f2470679b070a77ea22f8b791fae7084c2340c7d ]
We don't have a configuration for a single amp on link1.
--- .../intel/common/soc-acpi-intel-tgl-match.c | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+)
sound/soc/intel/common/soc-acpi-intel-tgl-match.c +41 -0
@@ -156,6 +156,15 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt1316_1_single_adr[] = { + { + .adr =0x000131025D131601ull , + .num_endpoints =1 , + .endpoints = &single_endpoint, + .name_prefix ="rt1316-1" + } +}; +static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = { { .adr =0x000131025D131601ull ,/* unique ID is set for some reason */
@@ -320,6 +329,25 @@ static const struct snd_soc_acpi_link_adr tgl_3_in_1_sdca[] = { {} }; +static const struct snd_soc_acpi_link_adr tgl_3_in_1_sdca_mono[] = { + { + .mask =BIT (0 ), + .num_adr =ARRAY_SIZE (rt711_sdca_0_adr), + .adr_d = rt711_sdca_0_adr, + }, + { + .mask =BIT (1 ), + .num_adr =ARRAY_SIZE (rt1316_1_single_adr), + .adr_d = rt1316_1_single_adr, + }, + { + .mask =BIT (3 ), + .num_adr =ARRAY_SIZE (rt714_3_adr), + .adr_d = rt714_3_adr, + }, + {} +}; +static const struct snd_soc_acpi_codecs tgl_max98373_amp = { .num_codecs =1 , .codecs = {"MX98373" }
@@ -412,6 +440,19 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-tgl-rt711-rt1316-rt714.tplg", }, + { +/* +* link_mask should be 0xB, but all links are enabled by BIOS. +* This entry will be selected if there is no rt1316 amplifier exposed +* on link2 since it will fail to match the above entry. +*/ + + .link_mask = 0xF, /* 4 active links required */ + .links = tgl_3_in_1_sdca_mono, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-tgl-rt711-l0-rt1316-l1-mono-rt714-l3.tplg", + }, + { .link_mask = 0x3, /* rt711 on link 0 and 1 rt1308 on link 1 */ .links = tgl_hp,
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 18/279 bus: ti-sysc: Add quirk handling for reinit on context lost
In reply to Greg Kroah-HartmanFrom: Tony Lindgren <[email protected]>
[ Upstream commit 9d881361206ebcf6285c2ec2ef275aff80875347 ]
Some interconnect target modules such as otg and gpmc on am335x need a re-init after resume. As we also have PM runtime cases where the context may be lost, let's handle these all with cpu_pm.
For the am335x resume path, we already have cpu_pm_resume() call cpu_pm_cluster_exit().
--- drivers/bus/ti-sysc.c | 108 ++++++++++++++++++++++++-- include/linux/platform_data/ti-sysc.h | 1 + 2 files changed, 103 insertions(+), 6 deletions(-)
drivers/bus/ti-sysc.c +102 -6
@@ -6,6 +6,7 @@#include <linux/io.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/cpu_pm.h> #include <linux/delay.h> #include <linux/list.h> #include <linux/module.h>
@@ -52,11 +53,18 @@ struct sysc_address {struct list_head node; }; +struct sysc_module { +struct sysc *ddata; +struct list_head node; +}; +struct sysc_soc_info {unsigned long general_purpose:1 ;enum sysc_soc soc; -struct mutex list_lock;/* disabled modules list lock */ +struct mutex list_lock;/* disabled and restored modules list lock */ struct list_head disabled_modules; +struct list_head restored_modules; +struct notifier_block nb; };enum sysc_clocks {
@@ -2442,6 +2450,79 @@ static struct dev_pm_domain sysc_child_pm_domain = { } }; +/* Caller needs to take list_lock if ever used outside of cpu_pm */ +static void sysc_reinit_modules (struct sysc_soc_info *soc) +{ +struct sysc_module *module; +struct list_head *pos; +struct sysc *ddata; +int error =0 ; + +list_for_each (pos, &sysc_soc->restored_modules) { + module = list_entry(pos, struct sysc_module, node); + ddata = module->ddata; + error =sysc_reinit_module (ddata, ddata->enabled); + } +} + +/** +* sysc_context_notifier - optionally reset and restore module after idle +* @nb: notifier block +* @cmd: unused +* @v: unused +* +* Some interconnect target modules need to be restored, or reset and restored +* on CPU_PM CPU_PM_CLUSTER_EXIT notifier. This is needed at least for am335x +* OTG and GPMC target modules even if the modules are unused. +*/ +static int sysc_context_notifier (struct notifier_block *nb,unsigned long cmd, +void *v) +{ +struct sysc_soc_info *soc; + + soc = container_of(nb, struct sysc_soc_info, nb); + +switch (cmd) { +case CPU_CLUSTER_PM_ENTER : +break ; +case CPU_CLUSTER_PM_ENTER_FAILED :/* No need to restore context */ +break ; +case CPU_CLUSTER_PM_EXIT : +sysc_reinit_modules (soc); +break ; + } + +return NOTIFY_OK ; +} + +/** +* sysc_add_restored - optionally add reset and restore quirk hanlling +* @ddata: device data +*/ +static void sysc_add_restored (struct sysc *ddata) +{ +struct sysc_module *restored_module; + + restored_module =kzalloc (sizeof (*restored_module),GFP_KERNEL ); +if (!restored_module) +return ; + + restored_module->ddata = ddata; + +mutex_lock (&sysc_soc->list_lock); + +list_add (&restored_module->node, &sysc_soc->restored_modules); + +if (sysc_soc->nb.notifier_call) + goto out_unlock; + + sysc_soc->nb.notifier_call = sysc_context_notifier; +cpu_pm_register_notifier (&sysc_soc->nb); + +out_unlock: +mutex_unlock (&sysc_soc->list_lock); +} +/** * sysc_legacy_idle_quirk - handle children in omap_device compatible way * @ddata: device driver data
@@ -2941,12 +3022,14 @@ static int sysc_add_disabled(unsigned long base) }/* -* One time init to detect the booted SoC and disable unavailable features. +* One time init to detect the booted SoC, disable unavailable features +* and initialize list for optional cpu_pm notifier. +* * Note that we initialize static data shared across all ti-sysc instances * so ddata is only used for SoC type. This can be called from module_init * once we no longer need to rely on platform data. */ -static int sysc_init_soc (struct sysc *ddata) +static int sysc_init_static_data (struct sysc *ddata) {const struct soc_device_attribute *match;struct ti_sysc_platform_data *pdata;
@@ -2962,6 +3045,7 @@ static int sysc_init_soc(struct sysc *ddata)mutex_init (&sysc_soc->list_lock);INIT_LIST_HEAD (&sysc_soc->disabled_modules); +INIT_LIST_HEAD (&sysc_soc->restored_modules); sysc_soc->general_purpose = true; pdata =dev_get_platdata (ddata->dev);
@@ -3026,15 +3110,24 @@ static int sysc_init_soc(struct sysc *ddata)return 0 ; } -static void sysc_cleanup_soc (void ) +static void sysc_cleanup_static_data (void ) { +struct sysc_module *restored_module;struct sysc_address *disabled_module;struct list_head *pos, *tmp;if (!sysc_soc)return ; +if (sysc_soc->nb.notifier_call) +cpu_pm_unregister_notifier (&sysc_soc->nb); +mutex_lock (&sysc_soc->list_lock); +list_for_each_safe (pos, tmp, &sysc_soc->restored_modules) { + restored_module = list_entry(pos, struct sysc_module, node); +list_del (pos); +kfree (restored_module); + }list_for_each_safe (pos, tmp, &sysc_soc->disabled_modules) { disabled_module = list_entry(pos, struct sysc_address, node);list_del (pos);
@@ -3102,7 +3195,7 @@ static int sysc_probe(struct platform_device *pdev) ddata->dev = &pdev->dev;platform_set_drvdata (pdev, ddata); - error =sysc_init_soc (ddata); + error =sysc_init_static_data (ddata);if (error)return error;
@@ -3200,6 +3293,9 @@ static int sysc_probe(struct platform_device *pdev)pm_runtime_put (&pdev->dev); } +if (ddata->cfg.quirks &SYSC_QUIRK_REINIT_ON_CTX_LOST ) +sysc_add_restored (ddata); +return 0 ; err:
@@ -3281,7 +3377,7 @@ static void __exit sysc_exit(void) {bus_unregister_notifier (&platform_bus_type, &sysc_nb);platform_driver_unregister (&sysc_driver); -sysc_cleanup_soc (); +sysc_cleanup_static_data (); }module_exit (sysc_exit);
include/linux/platform_data/ti-sysc.h +1 -0
@@ -50,6 +50,7 @@ struct sysc_regbits {s8 emufree_shift; }; +#define SYSC_QUIRK_REINIT_ON_CTX_LOST BIT(28)#define SYSC_QUIRK_REINIT_ON_RESUME BIT(27)#define SYSC_QUIRK_GPMC_DEBUG BIT(26)#define SYSC_MODULE_QUIRK_ENA_RESETDONE BIT(25)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 19/279 bus: ti-sysc: Use context lost quirk for otg
In reply to Greg Kroah-HartmanFrom: Tony Lindgren <[email protected]>
[ Upstream commit 9067839ff45a528bcb015cc2f24f656126b91e3f ]
Let's use SYSC_QUIRK_REINIT_ON_CTX_LOST quirk for am335x otg instead of SYSC_QUIRK_REINIT_ON_RESUME quirk as we can now handle the context loss in a more generic way.
--- drivers/bus/ti-sysc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/ti-sysc.c +1 -1
@@ -1567,7 +1567,7 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { 0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),SYSC_QUIRK ("usb_otg_hs" ,0 ,0 ,0x10 , -ENODEV ,0x4ea2080d ,0xffffffff ,SYSC_QUIRK_SWSUP_SIDLE |SYSC_QUIRK_SWSUP_MSTANDBY | -SYSC_QUIRK_REINIT_ON_RESUME ), +SYSC_QUIRK_REINIT_ON_CTX_LOST ),SYSC_QUIRK ("wdt" ,0 ,0 ,0x10 ,0x14 ,0x502a0500 ,0xfffff0f0 , SYSC_MODULE_QUIRK_WDT),/* PRUSS on am3, am4 and am5 */
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 48/279 firmware_loader: fix pre-allocated buf built-in firmware use
In reply to Greg Kroah-HartmanFrom: Luis Chamberlain <[email protected]>
[ Upstream commit f7a07f7b96033df7709042ff38e998720a3f7119 ]
The firmware_loader can be used with a pre-allocated buffer through the use of the API calls:
o request_firmware_into_buf()
o request_partial_firmware_into_buf()
If the firmware was built-in and present, our current check for if the built-in firmware fits into the pre-allocated buffer does not return any errors, and we proceed to tell the caller that everything worked fine. It's a lie and no firmware would end up being copied into the pre-allocated buffer. So if the caller trust the result it may end up writing a bunch of 0's to a device!
Fix this by making the function that checks for the pre-allocated buffer return non-void. Since the typical use case is when no pre-allocated buffer is provided make this return successfully for that case. If the built-in firmware does *not* fit into the pre-allocated buffer size return a failure as we should have been doing before.
I'm not aware of users of the built-in firmware using the API calls with a pre-allocated buffer, as such I doubt this fixes any real life issue. But you never know... perhaps some oddball private tree might use it.
In so far as upstream is concerned this just fixes our code for correctness.
--- drivers/base/firmware_loader/main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/base/firmware_loader/main.c +7 -6
@@ -100,12 +100,15 @@ static struct firmware_cache fw_cache;extern struct builtin_fw __start_builtin_fw[];extern struct builtin_fw __end_builtin_fw[]; -static void fw_copy_to_prealloc_buf (struct firmware *fw, +static bool fw_copy_to_prealloc_buf (struct firmware *fw,void *buf,size_t size) { -if (!buf || size < fw->size) -return ; +if (!buf) +return true; +if (size < fw->size) +return false;memcpy (buf, fw->data, fw->size); +return true; } static bool fw_get_builtin_firmware(struct firmware *fw, const char *name,
@@ -117,9 +120,7 @@ static bool fw_get_builtin_firmware(struct firmware *fw, const char *name,if (strcmp (name, b_fw->name) ==0 ) { fw->size = b_fw->size; fw->data = b_fw->data; -fw_copy_to_prealloc_buf (fw, buf, size); - -return true; +return fw_copy_to_prealloc_buf (fw, buf, size); } }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 47/279 ASoC: Intel: sof_sdw: add missing quirk for Dell SKU 0A45
In reply to Greg Kroah-HartmanFrom: Pierre-Louis Bossart <[email protected]>
[ Upstream commit 64ba6d2ce72ffde70dc5a1794917bf1573203716 ]
This device is based on SDCA codecs but with a single amplifier instead of two.
--- sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
sound/soc/intel/boards/sof_sdw.c +10 -0
@@ -213,6 +213,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {SOF_RT715_DAI_ID_FIX | SOF_SDW_FOUR_SPK), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc" ), +DMI_EXACT_MATCH (DMI_PRODUCT_SKU ,"0A45" ) + }, + .driver_data = (void *)(SOF_SDW_TGL_HDMI | +RT711_JD2 | + SOF_RT715_DAI_ID_FIX), + }, /* AlderLake devices */ { .callback = sof_sdw_quirk_cb,
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 20/279 usb: musb: tusb6010: check return value after calling platform_get_resource()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 14651496a3de6807a17c310f63c894ea0c5d858e ]
It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value.
--- drivers/usb/musb/tusb6010.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/usb/musb/tusb6010.c +5 -0
@@ -1104,6 +1104,11 @@ static int tusb_musb_init(struct musb *musb)/* dma address for async dma */ mem =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!mem) { +pr_debug ("no async dma resource?\n" ); + ret = -ENODEV ; + goto done; + } musb->async = mem->start;/* dma address for sync dma */
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 59/279 tty: tty_buffer: Fix the softlockup issue in flush_to_ldisc
In reply to Greg Kroah-HartmanFrom: Guanghui Feng <[email protected]>
[ Upstream commit 3968ddcf05fb4b9409cd1859feb06a5b0550a1c1 ]
When running ltp testcase(ltp/testcases/kernel/pty/pty04.c) with arm64, there is a soft lockup, which look like this one:
Workqueue: events_unbound flush_to_ldisc Call trace: dump_backtrace+0x0/0x1ec show_stack+0x24/0x30 dump_stack+0xd0/0x128 panic+0x15c/0x374 watchdog_timer_fn+0x2b8/0x304 __run_hrtimer+0x88/0x2c0 __hrtimer_run_queues+0xa4/0x120 hrtimer_interrupt+0xfc/0x270 arch_timer_handler_phys+0x40/0x50 handle_percpu_devid_irq+0x94/0x220 __handle_domain_irq+0x88/0xf0 gic_handle_irq+0x84/0xfc el1_irq+0xc8/0x180 slip_unesc+0x80/0x214 [slip] tty_ldisc_receive_buf+0x64/0x80 tty_port_default_receive_buf+0x50/0x90 flush_to_ldisc+0xbc/0x110 process_one_work+0x1d4/0x4b0 worker_thread+0x180/0x430 kthread+0x11c/0x120
In the testcase pty04, The first process call the write syscall to send data to the pty master. At the same time, the workqueue will do the flush_to_ldisc to pop data in a loop until there is no more data left. When the sender and workqueue running in different core, the sender sends data fastly in full time which will result in workqueue doing work in loop for a long time and occuring softlockup in flush_to_ldisc with kernel configured without preempt. So I add need_resched check and cond_resched in the flush_to_ldisc loop to avoid it.
--- drivers/tty/tty_buffer.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/tty/tty_buffer.c +3 -0
@@ -544,6 +544,9 @@ static void flush_to_ldisc(struct work_struct *work)if (!count)break ; head->read += count; + +if (need_resched ()) +cond_resched (); }mutex_unlock (&buf->lock);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 14/279 ASoC: mediatek: mt8195: Add missing of_node_put()
In reply to Greg Kroah-HartmanFrom: Bixuan Cui <[email protected]>
[ Upstream commit b2fc2c92d2fd34d93268f677e514936f50dd6b5c ]
The platform_node is returned by of_parse_phandle() should have of_node_put() before return.
--- sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c +5 -1
@@ -1040,8 +1040,10 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev) } priv =devm_kzalloc (&pdev->dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) +if (!priv) { +of_node_put (platform_node);return -ENOMEM ; + }snd_soc_card_set_drvdata (card, priv);
@@ -1049,6 +1051,8 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev)if (ret)dev_err (&pdev->dev,"%s snd_soc_register_card fail %d\n" , __func__, ret); + +of_node_put (platform_node);return ret; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 23/279 staging: rtl8723bs: remove possible deadlock when disconnect (v2)
In reply to Greg Kroah-HartmanFrom: Fabio Aiuto <[email protected]>
[ Upstream commit 54659ca026e586bbb33a7e60daa6443a3ac6b5df ]
when turning off a connection, lockdep complains with the following warning (a modprobe has been done but the same happens with a disconnection from NetworkManager, it's enough to trigger a cfg80211_disconnect call):
[ 682.855867] ======================================================
[ 682.855877] WARNING: possible circular locking dependency detected
[ 682.855887] 5.14.0-rc6+ #16 Tainted: G C OE
[ 682.855898] ------------------------------------------------------
[ 682.855906] modprobe/1770 is trying to acquire lock:
[ 682.855916] ffffb6d000332b00 (&pxmitpriv->lock){+.-.}-{2:2},
at: rtw_free_stainfo+0x52/0x4a0 [r8723bs]
[ 682.856073]
but task is already holding lock:
[ 682.856081] ffffb6d0003336a8 (&pstapriv->sta_hash_lock){+.-.}-{2:2},
at: rtw_free_assoc_resources+0x48/0x110 [r8723bs]
[ 682.856207]
which lock already depends on the new lock.[ 682.856215]
the existing dependency chain (in reverse order) is:
[ 682.856223]
-> #1 (&pstapriv->sta_hash_lock){+.-.}-{2:2}:
[ 682.856247] _raw_spin_lock_bh+0x34/0x40
[ 682.856265] rtw_get_stainfo+0x9a/0x110 [r8723bs]
[ 682.856389] rtw_xmit_classifier+0x27/0x130 [r8723bs]
[ 682.856515] rtw_xmitframe_enqueue+0xa/0x20 [r8723bs]
[ 682.856642] rtl8723bs_hal_xmit+0x3b/0xb0 [r8723bs]
[ 682.856752] rtw_xmit+0x4ef/0x890 [r8723bs]
[ 682.856879] _rtw_xmit_entry+0xba/0x350 [r8723bs]
[ 682.856981] dev_hard_start_xmit+0xee/0x320
[ 682.856999] sch_direct_xmit+0x8c/0x330
[ 682.857014] __dev_queue_xmit+0xba5/0xf00
[ 682.857030] packet_sendmsg+0x981/0x1b80
[ 682.857047] sock_sendmsg+0x5b/0x60
[ 682.857060] __sys_sendto+0xf1/0x160
[ 682.857073] __x64_sys_sendto+0x24/0x30
[ 682.857087] do_syscall_64+0x3a/0x80
[ 682.857102] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 682.857117]
-> #0 (&pxmitpriv->lock){+.-.}-{2:2}:
[ 682.857142] __lock_acquire+0xfd9/0x1b50
[ 682.857158] lock_acquire+0xb4/0x2c0
[ 682.857172] _raw_spin_lock_bh+0x34/0x40
[ 682.857185] rtw_free_stainfo+0x52/0x4a0 [r8723bs]
[ 682.857308] rtw_free_assoc_resources+0x53/0x110 [r8723bs]
[ 682.857415] cfg80211_rtw_disconnect+0x4b/0x70 [r8723bs]
[ 682.857522] cfg80211_disconnect+0x12e/0x2f0 [cfg80211]
[ 682.857759] cfg80211_leave+0x2b/0x40 [cfg80211]
[ 682.857961] cfg80211_netdev_notifier_call+0xa9/0x560 [cfg80211]
[ 682.858163] raw_notifier_call_chain+0x41/0x50
[ 682.858180] __dev_close_many+0x62/0x100
[ 682.858195] dev_close_many+0x7d/0x120
[ 682.858209] unregister_netdevice_many+0x416/0x680
[ 682.858225] unregister_netdevice_queue+0xab/0xf0
[ 682.858240] unregister_netdev+0x18/0x20
[ 682.858255] rtw_unregister_netdevs+0x28/0x40 [r8723bs]
[ 682.858360] rtw_dev_remove+0x24/0xd0 [r8723bs]
[ 682.858463] sdio_bus_remove+0x31/0xd0 [mmc_core]
[ 682.858532] device_release_driver_internal+0xf7/0x1d0
[ 682.858550] driver_detach+0x47/0x90
[ 682.858564] bus_remove_driver+0x77/0xd0
[ 682.858579] rtw_drv_halt+0xc/0x678 [r8723bs]
[ 682.858685] __x64_sys_delete_module+0x13f/0x250
[ 682.858699] do_syscall_64+0x3a/0x80
[ 682.858715] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 682.858729]
other info that might help us debug this:[ 682.858737] Possible unsafe locking scenario:
[ 682.858744] CPU0 CPU1
[ 682.858751] ---- ----
[ 682.858758] lock(&pstapriv->sta_hash_lock);
[ 682.858772] lock(&pxmitpriv->lock);
[ 682.858786] lock(&pstapriv->sta_hash_lock);
[ 682.858799] lock(&pxmitpriv->lock);
[ 682.858812]
*** DEADLOCK ***[ 682.858820] 5 locks held by modprobe/1770:
[ 682.858831] #0: ffff8d870697d980 (&dev->mutex){....}-{3:3},
at: device_release_driver_internal+0x1a/0x1d0
[ 682.858869] #1: ffffffffbdbbf1c8 (rtnl_mutex){+.+.}-{3:3},
at: unregister_netdev+0xe/0x20
[ 682.858906] #2: ffff8d87054ee5e8 (&rdev->wiphy.mtx){+.+.}-{3:3},
at: cfg80211_netdev_notifier_call+0x9e/0x560 [cfg80211]
[ 682.859131] #3: ffff8d870f2bc8f0 (&wdev->mtx){+.+.}-{3:3},
at: cfg80211_leave+0x20/0x40 [cfg80211]
[ 682.859354] #4: ffffb6d0003336a8 (&pstapriv->sta_hash_lock){+.-.}-{2:2},
at: rtw_free_assoc_resources+0x48/0x110 [r8723bs]
[ 682.859482]
stack backtrace:
[ 682.859491] CPU: 1 PID: 1770 Comm: modprobe Tainted: G
C OE 5.14.0-rc6+ #16
[ 682.859507] Hardware name: LENOVO 80NR/Madrid, BIOS DACN25WW 08/20/2015
[ 682.859517] Call Trace:
[ 682.859531] dump_stack_lvl+0x56/0x6f
[ 682.859551] check_noncircular+0xdb/0xf0
[ 682.859579] __lock_acquire+0xfd9/0x1b50
[ 682.859606] lock_acquire+0xb4/0x2c0
[ 682.859623] ? rtw_free_stainfo+0x52/0x4a0 [r8723bs]
[ 682.859752] ? mark_held_locks+0x48/0x70
[ 682.859769] ? rtw_free_stainfo+0x4a/0x4a0 [r8723bs]
[ 682.859898] _raw_spin_lock_bh+0x34/0x40
[ 682.859914] ? rtw_free_stainfo+0x52/0x4a0 [r8723bs]
[ 682.860039] rtw_free_stainfo+0x52/0x4a0 [r8723bs]
[ 682.860171] rtw_free_assoc_resources+0x53/0x110 [r8723bs]
[ 682.860286] cfg80211_rtw_disconnect+0x4b/0x70 [r8723bs]
[ 682.860397] cfg80211_disconnect+0x12e/0x2f0 [cfg80211]
[ 682.860629] cfg80211_leave+0x2b/0x40 [cfg80211]
[ 682.860836] cfg80211_netdev_notifier_call+0xa9/0x560 [cfg80211]
[ 682.861048] ? __lock_acquire+0x4dc/0x1b50
[ 682.861070] ? lock_is_held_type+0xa8/0x110
[ 682.861089] ? lock_is_held_type+0xa8/0x110
[ 682.861104] ? find_held_lock+0x2d/0x90
[ 682.861120] ? packet_notifier+0x173/0x300
[ 682.861141] ? lock_release+0xb3/0x250
[ 682.861160] ? packet_notifier+0x192/0x300
[ 682.861184] raw_notifier_call_chain+0x41/0x50
[ 682.861205] __dev_close_many+0x62/0x100
[ 682.861224] dev_close_many+0x7d/0x120
[ 682.861245] unregister_netdevice_many+0x416/0x680
[ 682.861264] ? find_held_lock+0x2d/0x90
[ 682.861284] unregister_netdevice_queue+0xab/0xf0
[ 682.861306] unregister_netdev+0x18/0x20
[ 682.861325] rtw_unregister_netdevs+0x28/0x40 [r8723bs]
[ 682.861434] rtw_dev_remove+0x24/0xd0 [r8723bs]
[ 682.861542] sdio_bus_remove+0x31/0xd0 [mmc_core]
[ 682.861615] device_release_driver_internal+0xf7/0x1d0
[ 682.861637] driver_detach+0x47/0x90
[ 682.861656] bus_remove_driver+0x77/0xd0
[ 682.861674] rtw_drv_halt+0xc/0x678 [r8723bs]
[ 682.861782] __x64_sys_delete_module+0x13f/0x250
[ 682.861801] ? lockdep_hardirqs_on_prepare+0xf3/0x170
[ 682.861817] ? syscall_enter_from_user_mode+0x20/0x70
[ 682.861836] do_syscall_64+0x3a/0x80
[ 682.861855] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 682.861873] RIP: 0033:0x7f6dbe85400b
[ 682.861890] Code: 73 01 c3 48 8b 0d 6d 1e 0c 00 f7 d8 64 89
01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa
b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 3d
1e 0c 00 f7 d8 64 89 01 48
[ 682.861906] RSP: 002b:00007ffe7a82f538 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
[ 682.861923] RAX: ffffffffffffffda RBX: 000055a64693bd20 RCX: 00007f6dbe85400b
[ 682.861935] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055a64693bd88
[ 682.861946] RBP: 000055a64693bd20 R08: 0000000000000000 R09: 0000000000000000
[ 682.861957] R10: 00007f6dbe8c7ac0 R11: 0000000000000206 R12: 000055a64693bd88
[ 682.861967] R13: 0000000000000000 R14: 000055a64693bd88 R15: 00007ffe7a831848This happens because when we enqueue a frame for transmission we do it under xmit_priv lock, then calling rtw_get_stainfo (needed for enqueuing) takes sta_hash_lock and this leads to the following lock dependency:
xmit_priv->lock -> sta_hash_lock
Turning off a connection will bring to callrtw_free_assoc_resources which will set up
the inverse dependency:
sta_hash_lock -> xmit_priv_lock
This could lead to a deadlock as lockdep complains.
Fix it by removing the xmit_priv->lock around rtw_xmitframe_enqueue call inside rtl8723bs_hal_xmit and put it in a smaller critical section inside rtw_xmit_classifier, the only place where xmit_priv data are actually accessed.
Replace spin_{lock,unlock}_bh(pxmitpriv->lock) in other tx paths leading to rtw_xmitframe_enqueue call with spin_{lock,unlock}_bh(psta->sleep_q.lock)
- it's not clear why accessing a sleep_q was protected by a spinlock on xmitpriv->lock.
This way is avoided the same faulty lock nesting
order.
Extra changes in v2 by Hans de Goede:
-Lift the taking of the struct __queue.lock spinlock out of
rtw_free_xmitframe_queue() into the callers this allows also protecting a bunch of related state in rtw_free_stainfo():
-Protect psta->sleepq_len on rtw_free_xmitframe_queue(&psta->sleep_q); -Protect struct tx_servq.tx_pending and tx_servq.qcnt when
calling rtw_free_xmitframe_queue(&tx_servq.sta_pending)
-This also allows moving the spin_lock_bh(&pxmitpriv->lock); to below
the sleep_q free-ing code, avoiding another ABBA locking issue
Tested-on: Lenovo Ideapad MiiX 300-10IBY
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 7 ++---- drivers/staging/rtl8723bs/core/rtw_recv.c | 10 +++------ drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 22 ++++++++++--------- drivers/staging/rtl8723bs/core/rtw_xmit.c | 16 ++++++-------- .../staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 -- 5 files changed, 24 insertions(+), 33 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +2 -5
@@ -5919,7 +5919,6 @@ u8 chk_bmc_sleepq_hdl(struct adapter *padapter, unsigned char *pbuf)struct sta_info *psta_bmc;struct list_head *xmitframe_plist, *xmitframe_phead, *tmp;struct xmit_frame *pxmitframe =NULL ; -struct xmit_priv *pxmitpriv = &padapter->xmitpriv;struct sta_priv *pstapriv = &padapter->stapriv;/* for BC/MC Frames */
@@ -5930,8 +5929,7 @@ u8 chk_bmc_sleepq_hdl(struct adapter *padapter, unsigned char *pbuf)if ((pstapriv->tim_bitmap&BIT (0 )) && (psta_bmc->sleepq_len >0 )) {msleep (10 );/* 10ms, ATIM(HIQ) Windows */ -/* spin_lock_bh(&psta_bmc->sleep_q.lock); */ -spin_lock_bh (&pxmitpriv->lock); +spin_lock_bh (&psta_bmc->sleep_q.lock); xmitframe_phead =get_list_head (&psta_bmc->sleep_q);list_for_each_safe (xmitframe_plist, tmp, xmitframe_phead) {
@@ -5954,8 +5952,7 @@ u8 chk_bmc_sleepq_hdl(struct adapter *padapter, unsigned char *pbuf)rtw_hal_xmitframe_enqueue (padapter, pxmitframe); } -/* spin_unlock_bh(&psta_bmc->sleep_q.lock); */ -spin_unlock_bh (&pxmitpriv->lock); +spin_unlock_bh (&psta_bmc->sleep_q.lock);/* check hi queue and bmc_sleepq */ rtw_chk_hi_queue_cmd (padapter);
drivers/staging/rtl8723bs/core/rtw_recv.c +3 -7
@@ -953,10 +953,8 @@ static signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_if ((psta->state&WIFI_SLEEP_STATE ) && (pstapriv->sta_dz_bitmap&BIT (psta->aid))) {struct list_head *xmitframe_plist, *xmitframe_phead;struct xmit_frame *pxmitframe =NULL ; -struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -/* spin_lock_bh(&psta->sleep_q.lock); */ -spin_lock_bh (&pxmitpriv->lock); +spin_lock_bh (&psta->sleep_q.lock); xmitframe_phead =get_list_head (&psta->sleep_q); xmitframe_plist =get_next (xmitframe_phead);
@@ -987,12 +985,10 @@ static signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_update_beacon (padapter,WLAN_EID_TIM ,NULL , true); } -/* spin_unlock_bh(&psta->sleep_q.lock); */ -spin_unlock_bh (&pxmitpriv->lock); +spin_unlock_bh (&psta->sleep_q.lock); }else { -/* spin_unlock_bh(&psta->sleep_q.lock); */ -spin_unlock_bh (&pxmitpriv->lock); +spin_unlock_bh (&psta->sleep_q.lock);if (pstapriv->tim_bitmap&BIT (psta->aid)) {if (psta->sleepq_len ==0 ) {
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c +12 -10
@@ -289,46 +289,48 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)/* list_del_init(&psta->wakeup_list); */ -spin_lock_bh (&pxmitpriv->lock); - +spin_lock_bh (&psta->sleep_q.lock);rtw_free_xmitframe_queue (pxmitpriv, &psta->sleep_q); psta->sleepq_len =0 ; +spin_unlock_bh (&psta->sleep_q.lock); + +spin_lock_bh (&pxmitpriv->lock);/* vo */ -/* spin_lock_bh(&(pxmitpriv->vo_pending.lock)); */ +spin_lock_bh (&pstaxmitpriv->vo_q.sta_pending.lock);rtw_free_xmitframe_queue (pxmitpriv, &pstaxmitpriv->vo_q.sta_pending);list_del_init (&(pstaxmitpriv->vo_q.tx_pending)); phwxmit = pxmitpriv->hwxmits; phwxmit->accnt -= pstaxmitpriv->vo_q.qcnt; pstaxmitpriv->vo_q.qcnt =0 ; -/* spin_unlock_bh(&(pxmitpriv->vo_pending.lock)); */ +spin_unlock_bh (&pstaxmitpriv->vo_q.sta_pending.lock);/* vi */ -/* spin_lock_bh(&(pxmitpriv->vi_pending.lock)); */ +spin_lock_bh (&pstaxmitpriv->vi_q.sta_pending.lock);rtw_free_xmitframe_queue (pxmitpriv, &pstaxmitpriv->vi_q.sta_pending);list_del_init (&(pstaxmitpriv->vi_q.tx_pending)); phwxmit = pxmitpriv->hwxmits+1 ; phwxmit->accnt -= pstaxmitpriv->vi_q.qcnt; pstaxmitpriv->vi_q.qcnt =0 ; -/* spin_unlock_bh(&(pxmitpriv->vi_pending.lock)); */ +spin_unlock_bh (&pstaxmitpriv->vi_q.sta_pending.lock);/* be */ -/* spin_lock_bh(&(pxmitpriv->be_pending.lock)); */ +spin_lock_bh (&pstaxmitpriv->be_q.sta_pending.lock);rtw_free_xmitframe_queue (pxmitpriv, &pstaxmitpriv->be_q.sta_pending);list_del_init (&(pstaxmitpriv->be_q.tx_pending)); phwxmit = pxmitpriv->hwxmits+2 ; phwxmit->accnt -= pstaxmitpriv->be_q.qcnt; pstaxmitpriv->be_q.qcnt =0 ; -/* spin_unlock_bh(&(pxmitpriv->be_pending.lock)); */ +spin_unlock_bh (&pstaxmitpriv->be_q.sta_pending.lock);/* bk */ -/* spin_lock_bh(&(pxmitpriv->bk_pending.lock)); */ +spin_lock_bh (&pstaxmitpriv->bk_q.sta_pending.lock);rtw_free_xmitframe_queue (pxmitpriv, &pstaxmitpriv->bk_q.sta_pending);list_del_init (&(pstaxmitpriv->bk_q.tx_pending)); phwxmit = pxmitpriv->hwxmits+3 ; phwxmit->accnt -= pstaxmitpriv->bk_q.qcnt; pstaxmitpriv->bk_q.qcnt =0 ; -/* spin_unlock_bh(&(pxmitpriv->bk_pending.lock)); */ +spin_unlock_bh (&pstaxmitpriv->bk_q.sta_pending.lock);spin_unlock_bh (&pxmitpriv->lock);
drivers/staging/rtl8723bs/core/rtw_xmit.c +7 -9
@@ -1723,15 +1723,12 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pframstruct list_head *plist, *phead, *tmp;struct xmit_frame *pxmitframe; -spin_lock_bh (&pframequeue->lock); - phead =get_list_head (pframequeue);list_for_each_safe (plist, tmp, phead) { pxmitframe = list_entry(plist, struct xmit_frame, list);rtw_free_xmitframe (pxmitpriv, pxmitframe); } -spin_unlock_bh (&pframequeue->lock); }s32 rtw_xmitframe_enqueue (struct adapter *padapter,struct xmit_frame *pxmitframe)
@@ -1786,6 +1783,7 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)struct sta_info *psta;struct tx_servq *ptxservq;struct pkt_attrib *pattrib = &pxmitframe->attrib; +struct xmit_priv *xmit_priv = &padapter->xmitpriv;struct hw_xmit *phwxmits = padapter->xmitpriv.hwxmits;signed int res = _SUCCESS;
@@ -1803,12 +1801,14 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe) ptxservq =rtw_get_sta_pending (padapter, psta, pattrib->priority, (u8 *)(&ac_index)); +spin_lock_bh (&xmit_priv->lock);if (list_empty (&ptxservq->tx_pending))list_add_tail (&ptxservq->tx_pending,get_list_head (phwxmits[ac_index].sta_queue));list_add_tail (&pxmitframe->list,get_list_head (&ptxservq->sta_pending)); ptxservq->qcnt++; phwxmits[ac_index].accnt++; +spin_unlock_bh (&xmit_priv->lock); exit:
@@ -2191,11 +2191,10 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)struct list_head *xmitframe_plist, *xmitframe_phead, *tmp;struct xmit_frame *pxmitframe =NULL ;struct sta_priv *pstapriv = &padapter->stapriv; -struct xmit_priv *pxmitpriv = &padapter->xmitpriv; psta_bmc =rtw_get_bcmc_stainfo (padapter); -spin_lock_bh (&pxmitpriv->lock); +spin_lock_bh (&psta->sleep_q.lock); xmitframe_phead =get_list_head (&psta->sleep_q);list_for_each_safe (xmitframe_plist, tmp, xmitframe_phead) {
@@ -2296,7 +2295,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) _exit: -spin_unlock_bh (&pxmitpriv->lock); +spin_unlock_bh (&psta->sleep_q.lock);if (update_mask)update_beacon (padapter,WLAN_EID_TIM ,NULL , true);
@@ -2308,9 +2307,8 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pststruct list_head *xmitframe_plist, *xmitframe_phead, *tmp;struct xmit_frame *pxmitframe =NULL ;struct sta_priv *pstapriv = &padapter->stapriv; -struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -spin_lock_bh (&pxmitpriv->lock); +spin_lock_bh (&psta->sleep_q.lock); xmitframe_phead =get_list_head (&psta->sleep_q);list_for_each_safe (xmitframe_plist, tmp, xmitframe_phead) {
@@ -2363,7 +2361,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst } } -spin_unlock_bh (&pxmitpriv->lock); +spin_unlock_bh (&psta->sleep_q.lock); }void enqueue_pending_xmitbuf (struct xmit_priv *pxmitpriv,struct xmit_buf *pxmitbuf)
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +0 -2
@@ -507,9 +507,7 @@ s32 rtl8723bs_hal_xmit(rtw_issue_addbareq_cmd (padapter, pxmitframe); } -spin_lock_bh (&pxmitpriv->lock); err =rtw_xmitframe_enqueue (padapter, pxmitframe); -spin_unlock_bh (&pxmitpriv->lock);if (err != _SUCCESS) {rtw_free_xmitframe (pxmitpriv, pxmitframe);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 67/279 scsi: lpfc: Fix use-after-free in lpfc_unreg_rpi() routine
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 79b20beccea3a3938a8500acef4e6b9d7c66142f ]
An error is detected with the following report when unloading the driver:
"KASAN: use-after-free in lpfc_unreg_rpi+0x1b1b"
The NLP_REG_LOGIN_SEND nlp_flag is set in lpfc_reg_fab_ctrl_node(), but the flag is not cleared upon completion of the login.
This allows a second call to lpfc_unreg_rpi() to proceed with nlp_rpi set to LPFC_RPI_ALLOW_ERROR. This results in a use after free access when used as an rpi_ids array index.
Fix by clearing the NLP_REG_LOGIN_SEND nlp_flag in lpfc_mbx_cmpl_fc_reg_login().
--- drivers/scsi/lpfc/lpfc_hbadisc.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_hbadisc.c +1 -0
@@ -4360,6 +4360,7 @@ lpfc_mbx_cmpl_fc_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) ndlp->nlp_state); ndlp->nlp_flag |=NLP_RPI_REGISTERED ; + ndlp->nlp_flag &= ~NLP_REG_LOGIN_SEND ; ndlp->nlp_type |=NLP_FABRIC ;lpfc_nlp_set_state (vport, ndlp,NLP_STE_UNMAPPED_NODE );
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 65/279 iio: imu: st_lsm6dsx: Avoid potential array overflow in st_lsm6dsx_set_odr()
In reply to Greg Kroah-HartmanFrom: Teng Qi <[email protected]>
[ Upstream commit 94be878c882d8d784ff44c639bf55f3b029f85af ]
The length of hw->settings->odr_table is 2 and ref_sensor->id is an enum variable whose value is between 0 and 5.
However, the value ST_LSM6DSX_ID_MAX (i.e. 5) is not caught properly in
switch (sensor->id) {
If ref_sensor->id is ST_LSM6DSX_ID_MAX, an array overflow will ocurrs in function st_lsm6dsx_check_odr():
odr_table = &sensor->hw->settings->odr_table[sensor->id];
and in function st_lsm6dsx_set_odr():
reg = &hw->settings->odr_table[ref_sensor->id].reg;
To avoid this array overflow, handle ST_LSM6DSX_ID_GYRO explicitly and return -EINVAL for the default case.
The enum value ST_LSM6DSX_ID_MAX is only present as an easy way to check the limit and as such is never used, however this is not locally obvious.
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +4 -2
@@ -1279,6 +1279,8 @@ st_lsm6dsx_set_odr(struct st_lsm6dsx_sensor *sensor, u32 req_odr)int err;switch (sensor->id) { +case ST_LSM6DSX_ID_GYRO : +break ;case ST_LSM6DSX_ID_EXT0 :case ST_LSM6DSX_ID_EXT1 :case ST_LSM6DSX_ID_EXT2 :
@@ -1304,8 +1306,8 @@ st_lsm6dsx_set_odr(struct st_lsm6dsx_sensor *sensor, u32 req_odr) }break ; } -default : -break ; +default :/* should never occur */ +return -EINVAL ; }if (req_odr >0 ) {
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 68/279 scsi: lpfc: Fix link down processing to address NULL pointer dereference
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 1854f53ccd88ad4e7568ddfafafffe71f1ceb0a6 ]
If an FC link down transition while PLOGIs are outstanding to fabric well known addresses, outstanding ABTS requests may result in a NULL pointer dereference. Driver unload requests may hang with repeated "2878" log messages.
The Link down processing results in ABTS requests for outstanding ELS requests. The Abort WQEs are sent for the ELSs before the driver had set the link state to down. Thus the driver is sending the Abort with the expectation that an ABTS will be sent on the wire. The Abort request is stalled waiting for the link to come up. In some conditions the driver may auto-complete the ELSs thus if the link does come up, the Abort completions may reference an invalid structure.
Fix by ensuring that Abort set the flag to avoid link traffic if issued due to conditions where the link failed.
--- drivers/scsi/lpfc/lpfc_sli.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/scsi/lpfc/lpfc_sli.c +7 -7
@@ -12404,17 +12404,17 @@ lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,/* ABTS WQE must go to the same WQ as the WQE to be aborted */ abtsiocbp->hba_wqidx = cmdiocb->hba_wqidx; -if (cmdiocb->iocb_flag &LPFC_IO_FCP ) { - abtsiocbp->iocb_flag |=LPFC_IO_FCP ; - abtsiocbp->iocb_flag |=LPFC_USE_FCPWQIDX ; - } +if (cmdiocb->iocb_flag &LPFC_IO_FCP ) + abtsiocbp->iocb_flag |= (LPFC_IO_FCP |LPFC_USE_FCPWQIDX );if (cmdiocb->iocb_flag &LPFC_IO_FOF ) abtsiocbp->iocb_flag |=LPFC_IO_FOF ; -if (phba->link_state >=LPFC_LINK_UP ) - iabt->ulpCommand =CMD_ABORT_XRI_CN ; -else +if (phba->link_state <LPFC_LINK_UP || + (phba->sli_rev ==LPFC_SLI_REV4 && + phba->sli4_hba.link_state.status ==LPFC_FC_LA_TYPE_LINK_DOWN )) iabt->ulpCommand =CMD_CLOSE_XRI_CN ; +else + iabt->ulpCommand =CMD_ABORT_XRI_CN ;if (cmpl) abtsiocbp->iocb_cmpl = cmpl;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 70/279 memory: tegra20-emc: Add runtime dependency on devfreq governor module
In reply to Greg Kroah-HartmanFrom: Dmitry Osipenko <[email protected]>
[ Upstream commit 14b43c20c283de36131da0cb44f3170b9ffa7630 ]
Tegra20 EMC driver uses simple devfreq governor. Add simple devfreq governor to the list of the Tegra20 EMC driver module softdeps to allow userspace initramfs tools like dracut to automatically pull the devfreq module into ramfs image together with the EMC module.
--- drivers/memory/tegra/tegra20-emc.c | 1 + 1 file changed, 1 insertion(+)
drivers/memory/tegra/tegra20-emc.c +1 -0
@@ -1117,4 +1117,5 @@ module_platform_driver(tegra_emc_driver);MODULE_AUTHOR ("Dmitry Osipenko <[email protected]>" );MODULE_DESCRIPTION ("NVIDIA Tegra20 EMC driver" ); +MODULE_SOFTDEP ("pre: governor_simpleondemand" );MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 21/279 usb: typec: tipd: Remove WARN_ON in tps6598x_block_read
In reply to Greg Kroah-HartmanFrom: Sven Peter <[email protected]>
[ Upstream commit b7a0a63f3fed57d413bb857de164ea9c3984bc4e ]
Calling tps6598x_block_read with a higher than allowed len can be handled by just returning an error. There's no need to crash systems with panic-on-warn enabled.
--- drivers/usb/typec/tipd/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tipd/core.c +1 -1
@@ -117,7 +117,7 @@ tps6598x_block_read(struct tps6598x *tps, u8 reg, void *val, size_t len)u8 data[TPS_MAX_LEN +1 ];int ret; -if (WARN_ON (len +1 >sizeof (data))) +if (len +1 >sizeof (data))return -EINVAL ;if (!tps->i2c_protocol)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 72/279 ARM: dts: qcom: fix memory and mdio nodes naming for RB3011
In reply to Greg Kroah-HartmanFrom: David Heidelberg <[email protected]>
[ Upstream commit 14a1f6c9d8017ffbf388e82e1a1f023196d98612 ]
Fixes warnings regarding to memory and mdio nodes and apply new naming following dt-schema.
--- arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/qcom-ipq8064-rb3011.dts +3 -3
@@ -19,12 +19,12 @@ stdout-path = "serial0:115200n8"; }; - memory@0 { + memory@42000000 { reg = <0x42000000 0x3e000000>; device_type = "memory"; }; - mdio0: mdio@0 { + mdio0: mdio-0 { status = "okay"; compatible = "virtual,mdio-gpio"; gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
@@ -91,7 +91,7 @@ }; }; - mdio1: mdio@1 { + mdio1: mdio-1 { status = "okay"; compatible = "virtual,mdio-gpio"; gpios = <&qcom_pinmux 11 GPIO_ACTIVE_HIGH>,
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 60/279 MIPS: sni: Fix the build
In reply to Greg Kroah-HartmanFrom: Bart Van Assche <[email protected]>
[ Upstream commit c91cf42f61dc77b289784ea7b15a8531defa41c0 ]
This patch fixes the following gcc 10 build error:
arch/mips/sni/time.c: In function ‘a20r_set_periodic’:arch/mips/sni/time.c:15:26: error: unsigned conversion from ‘int’ to ‘u8’ {aka ‘volatile unsigned char’} changes value from ‘576’ to ‘64’ [-Werror=overflow]
15 | #define SNI_COUNTER0_DIV ((SNI_CLOCK_TICK_RATE / SNI_COUNTER2_DIV) / HZ)
| ^arch/mips/sni/time.c:21:45: note: in expansion of macro ‘SNI_COUNTER0_DIV’
21 | *(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = SNI_COUNTER0_DIV;
| ^~~~~~~~~~~~~~~~--- arch/mips/sni/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/sni/time.c +2 -2
@@ -18,14 +18,14 @@ static int a20r_set_periodic(struct clock_event_device *evt) { *(volatile u8 *)(A20R_PT_CLOCK_BASE +12 ) =0x34 ;wmb (); - *(volatile u8 *)(A20R_PT_CLOCK_BASE +0 ) =SNI_COUNTER0_DIV ; + *(volatile u8 *)(A20R_PT_CLOCK_BASE +0 ) =SNI_COUNTER0_DIV &0xff ;wmb (); *(volatile u8 *)(A20R_PT_CLOCK_BASE +0 ) =SNI_COUNTER0_DIV >>8 ;wmb (); *(volatile u8 *)(A20R_PT_CLOCK_BASE +12 ) =0xb4 ;wmb (); - *(volatile u8 *)(A20R_PT_CLOCK_BASE +8 ) =SNI_COUNTER2_DIV ; + *(volatile u8 *)(A20R_PT_CLOCK_BASE +8 ) =SNI_COUNTER2_DIV &0xff ;wmb (); *(volatile u8 *)(A20R_PT_CLOCK_BASE +8 ) =SNI_COUNTER2_DIV >>8 ;wmb ();
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 50/279 HID: multitouch: disable sticky fingers for UPERFECT Y
In reply to Greg Kroah-HartmanFrom: José Expósito <[email protected]>
[ Upstream commit 08b9a61a87bc339a73c584d8924c86ab36d204a7 ]
When a finger is on the screen, the UPERFECT Y portable touchscreen monitor reports a contact in the first place. However, after this initial report, contacts are not reported at the refresh rate of the screen as required by the Windows 8 specs.
This behaviour triggers the release_timer, removing the fingers even though they are still present.
To avoid it, add a new class, similar to MT_CLS_WIN_8 but without the MT_QUIRK_STICKY_FINGERS quirk for this device.
--- drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-multitouch.c | 13 +++++++++++++ 2 files changed, 16 insertions(+)
drivers/hid/hid-ids.h +3 -0
@@ -1276,6 +1276,9 @@#define USB_DEVICE_ID_WEIDA_8752 0xC300#define USB_DEVICE_ID_WEIDA_8755 0xC301 +#define USB_VENDOR_ID_WINBOND 0x0416 +#define USB_DEVICE_ID_TSTP_MTOUCH 0xc168 +#define USB_VENDOR_ID_WISEGROUP 0x0925#define USB_DEVICE_ID_SMARTJOY_PLUS 0x0005#define USB_DEVICE_ID_SUPER_JOY_BOX_3 0x8888
drivers/hid/hid-multitouch.c +13 -0
@@ -193,6 +193,7 @@ static void mt_post_parse(struct mt_device *td, struct mt_application *app);/* reserved 0x0014 */ #define MT_CLS_WIN_8_FORCE_MULTI_INPUT 0x0015#define MT_CLS_WIN_8_DISABLE_WAKEUP 0x0016 +#define MT_CLS_WIN_8_NO_STICKY_FINGERS 0x0017/* vendor specific classes */ #define MT_CLS_3M 0x0101
@@ -294,6 +295,13 @@ static const struct mt_class mt_classes[] = {MT_QUIRK_WIN8_PTP_BUTTONS | MT_QUIRK_DISABLE_WAKEUP, .export_all_inputs = true }, + { .name = MT_CLS_WIN_8_NO_STICKY_FINGERS, + .quirks =MT_QUIRK_ALWAYS_VALID | +MT_QUIRK_IGNORE_DUPLICATES | +MT_QUIRK_HOVERING | +MT_QUIRK_CONTACT_CNT_ACCURATE | + MT_QUIRK_WIN8_PTP_BUTTONS, + .export_all_inputs = true },/* * vendor specific classes
@@ -2120,6 +2128,11 @@ static const struct hid_device_id mt_devices[] = { MT_USB_DEVICE(USB_VENDOR_ID_VTL, USB_DEVICE_ID_VTL_MULTITOUCH_FF3F) }, +/* Winbond Electronics Corp. */ + { .driver_data = MT_CLS_WIN_8_NO_STICKY_FINGERS, +HID_DEVICE (HID_BUS_ANY ,HID_GROUP_MULTITOUCH_WIN_8 , + USB_VENDOR_ID_WINBOND, USB_DEVICE_ID_TSTP_MTOUCH) }, + /* Wistron panels */ { .driver_data = MT_CLS_NSMU, MT_USB_DEVICE(USB_VENDOR_ID_WISTRON,
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 22/279 ARM: dts: ux500: Skomer regulator fixes
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
[ Upstream commit 7aee0288beab72cdfa35af51f62e94373fca595d ]
AUX2 has slightly wrong voltage and AUX5 doesn't need to be always on.
--- arch/arm/boot/dts/ste-ux500-samsung-skomer.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/ste-ux500-samsung-skomer.dts +4 -4
@@ -292,10 +292,10 @@ }; ab8500_ldo_aux2 { - /* Supplies the Cypress TMA140 touchscreen only with 3.3V */ + /* Supplies the Cypress TMA140 touchscreen only with 3.0V */ regulator-name = "AUX2"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; }; ab8500_ldo_aux3 {
@@ -314,9 +314,9 @@ ab8500_ldo_aux5 { regulator-name = "AUX5"; + /* Intended for 1V8 for touchscreen but actually left unused */ regulator-min-microvolt = <1050000>; regulator-max-microvolt = <2790000>; - regulator-always-on; }; ab8500_ldo_aux6 {
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 61/279 scsi: scsi_debug: Fix out-of-bound read in resp_readcap16()
In reply to Greg Kroah-HartmanFrom: Ye Bin <[email protected]>
[ Upstream commit 4e3ace0051e7e504b55d239daab8789dd89b863c ]
The following warning was observed running syzkaller:
[ 3813.830724] sg_write: data in/out 65466/242 bytes for SCSI command 0x9e-- guessing data in; [ 3813.830724] program syz-executor not setting count and/or reply_len properly [ 3813.836956] ================================================================== [ 3813.839465] BUG: KASAN: stack-out-of-bounds in sg_copy_buffer+0x157/0x1e0 [ 3813.841773] Read of size 4096 at addr ffff8883cf80f540 by task syz-executor/1549 [ 3813.846612] Call Trace: [ 3813.846995] dump_stack+0x108/0x15f [ 3813.847524] print_address_description+0xa5/0x372 [ 3813.848243] kasan_report.cold+0x236/0x2a8 [ 3813.849439] check_memory_region+0x240/0x270 [ 3813.850094] memcpy+0x30/0x80 [ 3813.850553] sg_copy_buffer+0x157/0x1e0 [ 3813.853032] sg_copy_from_buffer+0x13/0x20 [ 3813.853660] fill_from_dev_buffer+0x135/0x370 [ 3813.854329] resp_readcap16+0x1ac/0x280 [ 3813.856917] schedule_resp+0x41f/0x1630 [ 3813.858203] scsi_debug_queuecommand+0xb32/0x17e0 [ 3813.862699] scsi_dispatch_cmd+0x330/0x950 [ 3813.863329] scsi_request_fn+0xd8e/0x1710 [ 3813.863946] __blk_run_queue+0x10b/0x230 [ 3813.864544] blk_execute_rq_nowait+0x1d8/0x400 [ 3813.865220] sg_common_write.isra.0+0xe61/0x2420 [ 3813.871637] sg_write+0x6c8/0xef0 [ 3813.878853] __vfs_write+0xe4/0x800 [ 3813.883487] vfs_write+0x17b/0x530 [ 3813.884008] ksys_write+0x103/0x270 [ 3813.886268] __x64_sys_write+0x77/0xc0 [ 3813.886841] do_syscall_64+0x106/0x360 [ 3813.887415] entry_SYSCALL_64_after_hwframe+0x44/0xa9
This issue can be reproduced with the following syzkaller log:
r0 = openat(0xffffffffffffff9c, &(0x7f0000000040)='./file0\x00', 0x26e1, 0x0)
r1 = syz_open_procfs(0xffffffffffffffff, &(0x7f0000000000)='fd/3\x00')open_by_handle_at(r1, &(0x7f00000003c0)=ANY=[@ANYRESHEX], 0x602000)
r2 = syz_open_dev$sg(&(0x7f0000000000), 0x0, 0x40782)
write$binfmt_aout(r2, &(0x7f0000000340)=ANY=[@ANYBLOB="00000000deff000000000000000000000000000000000000000000000000000047f007af9e107a41ec395f1bded7be24277a1501ff6196a83366f4e6362bc0ff2b247f68a972989b094b2da4fb3607fcf611a22dd04310d28c75039d"], 0x126)
In resp_readcap16() we get "int alloc_len" value -1104926854, and then pass the huge arr_len to fill_from_dev_buffer(), but arr is only 32 bytes. This leads to OOB in sg_copy_buffer().
To solve this issue, define alloc_len as u32.
--- drivers/scsi/scsi_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/scsi_debug.c +2 -2
@@ -1856,7 +1856,7 @@ static int resp_readcap16(struct scsi_cmnd *scp, {unsigned char *cmd = scp->cmnd;unsigned char arr[SDEBUG_READCAP16_ARR_SZ ]; -int alloc_len; +u32 alloc_len; alloc_len =get_unaligned_be32 (cmd +10 );/* following just in case virtual_gb changed */
@@ -1885,7 +1885,7 @@ static int resp_readcap16(struct scsi_cmnd *scp, }return fill_from_dev_buffer (scp, arr, -min_t (int, alloc_len,SDEBUG_READCAP16_ARR_SZ )); +min_t (u32, alloc_len,SDEBUG_READCAP16_ARR_SZ )); }#define SDEBUG_MAX_TGTPGS_ARR_SZ 1412
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 62/279 scsi: scsi_debug: Fix out-of-bound read in resp_report_tgtpgs()
In reply to Greg Kroah-HartmanFrom: Ye Bin <[email protected]>
[ Upstream commit f347c26836c270199de1599c3cd466bb7747caa9 ]
The following issue was observed running syzkaller:
BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:377 [inline] BUG: KASAN: slab-out-of-bounds in sg_copy_buffer+0x150/0x1c0 lib/scatterlist.c:831 Read of size 2132 at addr ffff8880aea95dc8 by task syz-executor.0/9815 CPU: 0 PID: 9815 Comm: syz-executor.0 Not tainted 4.19.202-00874-gfc0fe04215a9 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xe4/0x14a lib/dump_stack.c:118 print_address_description+0x73/0x280 mm/kasan/report.c:253 kasan_report_error mm/kasan/report.c:352 [inline] kasan_report+0x272/0x370 mm/kasan/report.c:410 memcpy+0x1f/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:377 [inline] sg_copy_buffer+0x150/0x1c0 lib/scatterlist.c:831 fill_from_dev_buffer+0x14f/0x340 drivers/scsi/scsi_debug.c:1021 resp_report_tgtpgs+0x5aa/0x770 drivers/scsi/scsi_debug.c:1772 schedule_resp+0x464/0x12f0 drivers/scsi/scsi_debug.c:4429 scsi_debug_queuecommand+0x467/0x1390 drivers/scsi/scsi_debug.c:5835 scsi_dispatch_cmd+0x3fc/0x9b0 drivers/scsi/scsi_lib.c:1896 scsi_request_fn+0x1042/0x1810 drivers/scsi/scsi_lib.c:2034 __blk_run_queue_uncond block/blk-core.c:464 [inline] __blk_run_queue+0x1a4/0x380 block/blk-core.c:484 blk_execute_rq_nowait+0x1c2/0x2d0 block/blk-exec.c:78 sg_common_write.isra.19+0xd74/0x1dc0 drivers/scsi/sg.c:847 sg_write.part.23+0x6e0/0xd00 drivers/scsi/sg.c:716 sg_write+0x64/0xa0 drivers/scsi/sg.c:622 __vfs_write+0xed/0x690 fs/read_write.c:485 kill_bdev:block_device:00000000e138492c vfs_write+0x184/0x4c0 fs/read_write.c:549 ksys_write+0x107/0x240 fs/read_write.c:599 do_syscall_64+0xc2/0x560 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe
We get 'alen' from command its type is int. If userspace passes a large length we will get a negative 'alen'.
Switch n, alen, and rlen to u32.
--- drivers/scsi/scsi_debug.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/scsi/scsi_debug.c +4 -3
@@ -1896,8 +1896,9 @@ static int resp_report_tgtpgs(struct scsi_cmnd *scp,unsigned char *cmd = scp->cmnd;unsigned char *arr;int host_no = devip->sdbg_host->shost->host_no; -int n, ret, alen, rlen;int port_group_a, port_group_b, port_a, port_b; +u32 alen, n, rlen; +int ret; alen =get_unaligned_be32 (cmd +6 ); arr =kzalloc (SDEBUG_MAX_TGTPGS_ARR_SZ ,GFP_ATOMIC );
@@ -1959,9 +1960,9 @@ static int resp_report_tgtpgs(struct scsi_cmnd *scp,* - The constructed command length * - The maximum array size */ - rlen =min_t (int, alen, n); + rlen =min (alen, n); ret =fill_from_dev_buffer (scp, arr, -min_t (int, rlen,SDEBUG_MAX_TGTPGS_ARR_SZ )); +min_t (u32, rlen,SDEBUG_MAX_TGTPGS_ARR_SZ ));kfree (arr);return ret; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 63/279 scsi: target: Fix ordered tag handling
In reply to Greg Kroah-HartmanFrom: Mike Christie <[email protected]>
[ Upstream commit ed1227e080990ffec5bf39006ec8a57358e6689a ]
This patch fixes the following bugs:
1. If there are multiple ordered cmds queued and multiple simple cmds completing, target_restart_delayed_cmds() could be called on different CPUs and each instance could start a ordered cmd. They could then run in different orders than they were queued.
2. target_restart_delayed_cmds() and target_handle_task_attr() can race where:
1. target_handle_task_attr() has passed the simple_cmds == 0 check.
2. transport_complete_task_attr() then decrements simple_cmds to 0.
3. transport_complete_task_attr() runs target_restart_delayed_cmds() and it does not see any cmds on the delayed_cmd_list.
4. target_handle_task_attr() adds the cmd to the delayed_cmd_list.
The cmd will then end up timing out.
3. If we are sent > 1 ordered cmds and simple_cmds == 0, we can execute them out of order, because target_handle_task_attr() will hit that simple_cmds check first and return false for all ordered cmds sent.
4. We run target_restart_delayed_cmds() after every cmd completion, so if there is more than 1 simple cmd running, we start executing ordered cmds after that first cmd instead of waiting for all of them to complete.
5. Ordered cmds are not supposed to start until HEAD OF QUEUE and all older cmds have completed, and not just simple.
6. It's not a bug but it doesn't make sense to take the delayed_cmd_lock for every cmd completion when ordered cmds are almost never used. Just replacing that lock with an atomic increases IOPs by up to 10% when completions are spread over multiple CPUs and there are multiple sessions/ mqs/thread accessing the same device.
This patch moves the queued delayed handling to a per device work to serialze the cmd executions for each device and adds a new counter to track HEAD_OF_QUEUE and SIMPLE cmds. We can then check the new counter to determine when to run the work on the completion path.
--- drivers/target/target_core_device.c | 2 + drivers/target/target_core_internal.h | 1 + drivers/target/target_core_transport.c | 76 ++++++++++++++++++-------- include/target/target_core_base.h | 6 +- 4 files changed, 61 insertions(+), 24 deletions(-)
drivers/target/target_core_device.c +2 -0
@@ -772,6 +772,8 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)INIT_LIST_HEAD (&dev->t10_alua.lba_map_list);spin_lock_init (&dev->t10_alua.lba_map_lock); +INIT_WORK (&dev->delayed_cmd_work, target_do_delayed_work); + dev->t10_wwn.t10_dev = dev;/* * Use OpenFabrics IEEE Company ID: 00 14 05
drivers/target/target_core_internal.h +1 -0
@@ -151,6 +151,7 @@ int transport_dump_vpd_ident(struct t10_vpd *, unsigned char *, int);void transport_clear_lun_ref (struct se_lun *);sense_reason_t target_cmd_size_check (struct se_cmd *cmd,unsigned int size);void target_qf_do_work (struct work_struct *work); +void target_do_delayed_work (struct work_struct *work);bool target_check_wce (struct se_device *dev);bool target_check_fua (struct se_device *dev);void __target_execute_cmd (struct se_cmd *,bool );
drivers/target/target_core_transport.c +54 -22
142 lines not on this page · raw message
include/target/target_core_base.h +4 -2
@@ -812,8 +812,9 @@ struct se_device {atomic_long_t read_bytes;atomic_long_t write_bytes;/* Active commands on this virtual SE device */ -atomic_t simple_cmds; -atomic_t dev_ordered_sync; +atomic_t non_ordered; +bool ordered_sync_in_progress; +atomic_t delayed_cmd_count;atomic_t dev_qf_count;u32 export_count;spinlock_t delayed_cmd_lock;
@@ -834,6 +835,7 @@ struct se_device {struct list_head dev_sep_list;struct list_head dev_tmr_list;struct work_struct qf_work_queue; +struct work_struct delayed_cmd_work;struct list_head delayed_cmd_list;struct list_head qf_cmd_list;/* Pointer to associated SE HBA */
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 64/279 scsi: target: Fix alua_tg_pt_gps_count tracking
In reply to Greg Kroah-HartmanFrom: Mike Christie <[email protected]>
[ Upstream commit 1283c0d1a32bb924324481586b5d6e8e76f676ba ]
We can't free the tg_pt_gp in core_alua_set_tg_pt_gp_id() because it's still accessed via configfs. Its release must go through the normal configfs/refcount process.
The max alua_tg_pt_gps_count check should probably have been done in core_alua_allocate_tg_pt_gp(), but with the current code userspace could have created 0x0000ffff + 1 groups, but only set the id for 0x0000ffff. Then it could have deleted a group with an ID set, and then set the ID for that extra group and it would work ok.
It's unlikely, but just in case this patch continues to allow that type of behavior, and just fixes the kfree() while in use bug.
--- drivers/target/target_core_alua.c | 1 - 1 file changed, 1 deletion(-)
drivers/target/target_core_alua.c +0 -1
@@ -1674,7 +1674,6 @@ int core_alua_set_tg_pt_gp_id(pr_err ("Maximum ALUA alua_tg_pt_gps_count:" " 0x0000ffff reached\n" );spin_unlock (&dev->t10_alua.tg_pt_gps_lock); -kmem_cache_free (t10_alua_tg_pt_gp_cache, tg_pt_gp);return -ENOSPC ; } again:
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 69/279 scsi: lpfc: Allow fabric node recovery if recovery is in progress before devloss
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit af984c87293b19dccbd0b16afc57c5c9a4a279c7 ]
A link bounce to a slow fabric may observe FDISC response delays lasting longer than devloss tmo. Current logic decrements the final fabric node kref during a devloss tmo event. This results in a NULL ptr dereference crash if the FDISC completes for that fabric node after devloss tmo.
Fix by adding the NLP_IN_RECOV_POST_DEV_LOSS flag, which is set when devloss tmo triggers and we've noticed that fabric node recovery has already started or finished in between the time lpfc_dev_loss_tmo_callbk queues lpfc_dev_loss_tmo_handler. If fabric node recovery succeeds, then the driver reverses the devloss tmo marked kref put with a kref get. If fabric node recovery fails, then the final kref put relies on the ELS timing out or the REG_LOGIN cmpl routine.
--- drivers/scsi/lpfc/lpfc_crtn.h | 2 + drivers/scsi/lpfc/lpfc_disc.h | 12 +++- drivers/scsi/lpfc/lpfc_els.c | 7 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 111 ++++++++++++++++++++++++++++++- drivers/scsi/lpfc/lpfc_init.c | 12 ++-- drivers/scsi/lpfc/lpfc_scsi.c | 10 +-- 6 files changed, 139 insertions(+), 15 deletions(-)
drivers/scsi/lpfc/lpfc_crtn.h +2 -0
@@ -119,6 +119,8 @@ int lpfc_check_sli_ndlp(struct lpfc_hba *, struct lpfc_sli_ring *,struct lpfc_nodelist *lpfc_nlp_init (struct lpfc_vport *vport,uint32_t did);struct lpfc_nodelist *lpfc_nlp_get (struct lpfc_nodelist *);int lpfc_nlp_put (struct lpfc_nodelist *); +void lpfc_check_nlp_post_devloss (struct lpfc_vport *vport, +struct lpfc_nodelist *ndlp);void lpfc_ignore_els_cmpl (struct lpfc_hba *phba,struct lpfc_iocbq *cmdiocb,struct lpfc_iocbq *rspiocb);int lpfc_nlp_not_used (struct lpfc_nodelist *ndlp);
drivers/scsi/lpfc/lpfc_disc.h +10 -2
@@ -85,6 +85,13 @@ enum lpfc_fc4_xpt_flags {NLP_XPT_HAS_HH =0x10 }; +enum lpfc_nlp_save_flags { +/* devloss occurred during recovery */ +NLP_IN_RECOV_POST_DEV_LOSS =0x1 , +/* wait for outstanding LOGO to cmpl */ +NLP_WAIT_FOR_LOGO =0x2 , +}; +struct lpfc_nodelist {struct list_head nlp_listp;struct serv_parm fc_sparam;/* buffer for service params */
@@ -144,8 +151,9 @@ struct lpfc_nodelist {unsigned long *active_rrqs_xri_bitmap;struct lpfc_scsicmd_bkt *lat_data;/* Latency data */ uint32_t fc4_prli_sent; -u32 upcall_flags; -#define NLP_WAIT_FOR_LOGO 0x2 + +/* flags to keep ndlp alive until special conditions are met */ +enum lpfc_nlp_save_flags save_flags;enum lpfc_fc4_xpt_flags fc4_xpt_flags;
drivers/scsi/lpfc/lpfc_els.c +5 -2
@@ -2898,9 +2898,9 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, irsp = &(rspiocb->iocb);spin_lock_irq (&ndlp->lock); ndlp->nlp_flag &= ~NLP_LOGO_SND ; -if (ndlp->upcall_flags &NLP_WAIT_FOR_LOGO ) { +if (ndlp->save_flags &NLP_WAIT_FOR_LOGO ) { wake_up_waiter =1 ; - ndlp->upcall_flags &= ~NLP_WAIT_FOR_LOGO ; + ndlp->save_flags &= ~NLP_WAIT_FOR_LOGO ; }spin_unlock_irq (&ndlp->lock);
@@ -10713,6 +10713,9 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, irsp->ulpStatus, irsp->un.ulpWord[4]); goto fdisc_failed; } + +lpfc_check_nlp_post_devloss (vport, ndlp); +spin_lock_irq (shost->host_lock); vport->fc_flag &= ~FC_VPORT_CVL_RCVD ; vport->fc_flag &= ~FC_VPORT_LOGO_RCVD ;
drivers/scsi/lpfc/lpfc_hbadisc.c +109 -2
155 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_init.c +8 -4
@@ -3694,12 +3694,16 @@ lpfc_offline_prep(struct lpfc_hba *phba, int mbx_action)lpfc_disc_state_machine (vports[i], ndlp,NULL ,NLP_EVT_DEVICE_RECOVERY ); -/* Don't remove the node unless the +/* Don't remove the node unless the node * has been unregistered with the -* transport. If so, let dev_loss -* take care of the node. +* transport, and we're not in recovery +* before dev_loss_tmo triggered. +* Otherwise, let dev_loss take care of +* the node. */ -if (!(ndlp->fc4_xpt_flags & +if (!(ndlp->save_flags & +NLP_IN_RECOV_POST_DEV_LOSS ) && + !(ndlp->fc4_xpt_flags & (NVME_XPT_REGD |SCSI_XPT_REGD ))) lpfc_disc_state_machine (vports[i], ndlp,
drivers/scsi/lpfc/lpfc_scsi.c +5 -5
@@ -6455,28 +6455,28 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd)/* Issue LOGO, if no LOGO is outstanding */ spin_lock_irqsave (&pnode->lock, flags); -if (!(pnode->upcall_flags &NLP_WAIT_FOR_LOGO ) && +if (!(pnode->save_flags &NLP_WAIT_FOR_LOGO ) && !pnode->logo_waitq) { pnode->logo_waitq = &waitq; pnode->nlp_fcp_info &= ~NLP_FCP_2_DEVICE ; pnode->nlp_flag |=NLP_ISSUE_LOGO ; - pnode->upcall_flags |=NLP_WAIT_FOR_LOGO ; + pnode->save_flags |=NLP_WAIT_FOR_LOGO ;spin_unlock_irqrestore (&pnode->lock, flags);lpfc_unreg_rpi (vport, pnode);wait_event_timeout (waitq, - (!(pnode->upcall_flags & + (!(pnode->save_flags &NLP_WAIT_FOR_LOGO )),msecs_to_jiffies (dev_loss_tmo *1000 )); -if (pnode->upcall_flags &NLP_WAIT_FOR_LOGO ) { +if (pnode->save_flags &NLP_WAIT_FOR_LOGO ) {lpfc_printf_vlog (vport,KERN_ERR , logit,"0725 SCSI layer TGTRST " "failed & LOGO TMO (%d, %llu) " "return x%x\n" , tgt_id, lun_id, status);spin_lock_irqsave (&pnode->lock, flags); - pnode->upcall_flags &= ~NLP_WAIT_FOR_LOGO ; + pnode->save_flags &= ~NLP_WAIT_FOR_LOGO ; }else {spin_lock_irqsave (&pnode->lock, flags); }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 51/279 ALSA: usb-audio: Add support for the Pioneer DJM 750MK2 Mixer/Soundcard
In reply to Greg Kroah-HartmanFrom: William Overton <[email protected]>
[ Upstream commit 6d27788160362a7ee6c0d317636fe4b1ddbe59a7 ]
The kernel already has support for very similar Pioneer djm products and this work is based on that.
Added device to quirks-table.h and added control info to mixer_quirks.c.
Tested on my hardware and all working.
--- sound/usb/mixer_quirks.c | 34 +++++++++++++++++++++++ sound/usb/quirks-table.h | 58 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+)
sound/usb/mixer_quirks.c +34 -0
@@ -2795,6 +2795,7 @@ static int snd_bbfpro_controls_create(struct usb_mixer_interface *mixer)#define SND_DJM_750_IDX 0x1#define SND_DJM_850_IDX 0x2#define SND_DJM_900NXS2_IDX 0x3 +#define SND_DJM_750MK2_IDX 0x4#define SND_DJM_CTL (_name, suffix, _default_value, _windex) { \
@@ -2984,10 +2985,40 @@ static const struct snd_djm_ctl snd_djm_ctls_900nxs2[] = { SND_DJM_CTL("Ch5 Input", 900nxs2_cap5, 3, SND_DJM_WINDEX_CAP) }; +// DJM-750MK2 +static const u16 snd_djm_opts_750mk2_cap1[] = { +0x0100 ,0x0102 ,0x0103 ,0x0106 ,0x0107 ,0x0108 ,0x0109 ,0x010a }; +static const u16 snd_djm_opts_750mk2_cap2[] = { +0x0200 ,0x0202 ,0x0203 ,0x0206 ,0x0207 ,0x0208 ,0x0209 ,0x020a }; +static const u16 snd_djm_opts_750mk2_cap3[] = { +0x0300 ,0x0302 ,0x0303 ,0x0306 ,0x0307 ,0x0308 ,0x0309 ,0x030a }; +static const u16 snd_djm_opts_750mk2_cap4[] = { +0x0400 ,0x0402 ,0x0403 ,0x0406 ,0x0407 ,0x0408 ,0x0409 ,0x040a }; +static const u16 snd_djm_opts_750mk2_cap5[] = { +0x0507 ,0x0508 ,0x0509 ,0x050a ,0x0511 ,0x0512 ,0x0513 ,0x0514 }; + +static const u16 snd_djm_opts_750mk2_pb1[] = {0x0100 ,0x0101 ,0x0104 }; +static const u16 snd_djm_opts_750mk2_pb2[] = {0x0200 ,0x0201 ,0x0204 }; +static const u16 snd_djm_opts_750mk2_pb3[] = {0x0300 ,0x0301 ,0x0304 }; + + +static const struct snd_djm_ctl snd_djm_ctls_750mk2[] = { +SND_DJM_CTL ("Capture Level" , cap_level,0 ,SND_DJM_WINDEX_CAPLVL ), + SND_DJM_CTL("Ch1 Input", 750mk2_cap1, 2, SND_DJM_WINDEX_CAP), + SND_DJM_CTL("Ch2 Input", 750mk2_cap2, 2, SND_DJM_WINDEX_CAP), + SND_DJM_CTL("Ch3 Input", 750mk2_cap3, 2, SND_DJM_WINDEX_CAP), + SND_DJM_CTL("Ch4 Input", 750mk2_cap4, 2, SND_DJM_WINDEX_CAP), + SND_DJM_CTL("Ch5 Input", 750mk2_cap5, 3, SND_DJM_WINDEX_CAP), + SND_DJM_CTL("Ch1 Output", 750mk2_pb1, 0, SND_DJM_WINDEX_PB), + SND_DJM_CTL("Ch2 Output", 750mk2_pb2, 1, SND_DJM_WINDEX_PB), + SND_DJM_CTL("Ch3 Output", 750mk2_pb3, 2, SND_DJM_WINDEX_PB) +}; +static const struct snd_djm_device snd_djm_devices[] = { SND_DJM_DEVICE(250mk2),SND_DJM_DEVICE (750 ), + SND_DJM_DEVICE(750mk2),SND_DJM_DEVICE (850 ), SND_DJM_DEVICE(900nxs2) };
@@ -3235,6 +3266,9 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)case USB_ID (0x08e4 ,0x017f ):/* Pioneer DJ DJM-750 */ err =snd_djm_controls_create (mixer,SND_DJM_750_IDX );break ; +case USB_ID (0x2b73 ,0x001b ):/* Pioneer DJ DJM-750MK2 */ + err =snd_djm_controls_create (mixer,SND_DJM_750MK2_IDX ); +break ;case USB_ID (0x08e4 ,0x0163 ):/* Pioneer DJ DJM-850 */ err =snd_djm_controls_create (mixer,SND_DJM_850_IDX );break ;
sound/usb/quirks-table.h +58 -0
64 lines not on this page · raw message
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 66/279 RDMA/core: Use kvzalloc when allocating the struct ib_port
In reply to Greg Kroah-HartmanFrom: wangyugui <[email protected]>
[ Upstream commit 911a81c9c7092bfd75432ce79b2ef879127ea065 ]
The 'struct attribute' flex array contains some struct lock_class_key's which become big when lockdep is turned on. Big enough that some drivers will not load when CONFIG_PROVE_LOCKING=y because they cannot allocate enough memory:
WARNING: CPU: 36 PID: 8 at mm/page_alloc.c:5350 __alloc_pages+0x27e/0x3e0 Call Trace: kmalloc_order+0x2a/0xb0 kmalloc_order_trace+0x19/0xf0 __kmalloc+0x231/0x270 ib_setup_port_attrs+0xd8/0x870 [ib_core] ib_register_device+0x419/0x4e0 [ib_core] bnxt_re_task+0x208/0x2d0 [bnxt_re]
--- drivers/infiniband/core/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/core/sysfs.c +2 -2
@@ -757,7 +757,7 @@ static void ib_port_release(struct kobject *kobj)if (port->hw_stats_data)kfree (port->hw_stats_data->stats);kfree (port->hw_stats_data); -kfree (port); +kvfree (port); }static void ib_port_gid_attr_release (struct kobject *kobj)
@@ -1189,7 +1189,7 @@ static struct ib_port *setup_port(struct ib_core_device *coredev, int port_num,struct ib_port *p;int ret; - p =kzalloc (struct_size (p, attrs_list, + p =kvzalloc (struct_size (p, attrs_list, attr->gid_tbl_len + attr->pkey_tbl_len),GFP_KERNEL );if (!p)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 71/279 powerpc/5200: dts: fix memory node unit name
In reply to Greg Kroah-HartmanFrom: Anatolij Gustschin <[email protected]>
[ Upstream commit aed2886a5e9ffc8269a4220bff1e9e030d3d2eb1 ]
Fixes build warnings:
Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name
--- arch/powerpc/boot/dts/charon.dts | 2 +- arch/powerpc/boot/dts/digsy_mtc.dts | 2 +- arch/powerpc/boot/dts/lite5200.dts | 2 +- arch/powerpc/boot/dts/lite5200b.dts | 2 +- arch/powerpc/boot/dts/media5200.dts | 2 +- arch/powerpc/boot/dts/mpc5200b.dtsi | 2 +- arch/powerpc/boot/dts/o2d.dts | 2 +- arch/powerpc/boot/dts/o2d.dtsi | 2 +- arch/powerpc/boot/dts/o2dnt2.dts | 2 +- arch/powerpc/boot/dts/o3dnt.dts | 2 +- arch/powerpc/boot/dts/pcm032.dts | 2 +- arch/powerpc/boot/dts/tqm5200.dts | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-)
arch/powerpc/boot/dts/charon.dts +1 -1
@@ -35,7 +35,7 @@ }; }; - memory { + memory@0 { device_type = "memory"; reg = <0x00000000 0x08000000>; // 128MB };
arch/powerpc/boot/dts/digsy_mtc.dts +1 -1
@@ -16,7 +16,7 @@ model = "intercontrol,digsy-mtc"; compatible = "intercontrol,digsy-mtc"; - memory { + memory@0 { reg = <0x00000000 0x02000000>; // 32MB };
arch/powerpc/boot/dts/lite5200.dts +1 -1
@@ -32,7 +32,7 @@ }; }; - memory { + memory@0 { device_type = "memory"; reg = <0x00000000 0x04000000>; // 64MB };
arch/powerpc/boot/dts/lite5200b.dts +1 -1
@@ -31,7 +31,7 @@ led4 { gpios = <&gpio_simple 2 1>; }; }; - memory { + memory@0 { reg = <0x00000000 0x10000000>; // 256MB };
arch/powerpc/boot/dts/media5200.dts +1 -1
@@ -32,7 +32,7 @@ }; }; - memory { + memory@0 { reg = <0x00000000 0x08000000>; // 128MB RAM };
arch/powerpc/boot/dts/mpc5200b.dtsi +1 -1
@@ -33,7 +33,7 @@ }; }; - memory: memory { + memory: memory@0 { device_type = "memory"; reg = <0x00000000 0x04000000>; // 64MB };
arch/powerpc/boot/dts/o2d.dts +1 -1
@@ -12,7 +12,7 @@ model = "ifm,o2d"; compatible = "ifm,o2d"; - memory { + memory@0 { reg = <0x00000000 0x08000000>; // 128MB };
arch/powerpc/boot/dts/o2d.dtsi +1 -1
@@ -19,7 +19,7 @@ model = "ifm,o2d"; compatible = "ifm,o2d"; - memory { + memory@0 { reg = <0x00000000 0x04000000>; // 64MB };
arch/powerpc/boot/dts/o2dnt2.dts +1 -1
@@ -12,7 +12,7 @@ model = "ifm,o2dnt2"; compatible = "ifm,o2d"; - memory { + memory@0 { reg = <0x00000000 0x08000000>; // 128MB };
arch/powerpc/boot/dts/o3dnt.dts +1 -1
@@ -12,7 +12,7 @@ model = "ifm,o3dnt"; compatible = "ifm,o2d"; - memory { + memory@0 { reg = <0x00000000 0x04000000>; // 64MB };
arch/powerpc/boot/dts/pcm032.dts +1 -1
@@ -20,7 +20,7 @@ model = "phytec,pcm032"; compatible = "phytec,pcm032"; - memory { + memory@0 { reg = <0x00000000 0x08000000>; // 128MB };
arch/powerpc/boot/dts/tqm5200.dts +1 -1
@@ -32,7 +32,7 @@ }; }; - memory { + memory@0 { device_type = "memory"; reg = <0x00000000 0x04000000>; // 64MB };
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 73/279 arm64: dts: qcom: Fix node name of rpm-msg-ram device nodes
In reply to Greg Kroah-HartmanFrom: Stephan Gerhold <[email protected]>
[ Upstream commit 179811bebc7b91e0f9d0adee9bfa3d2af9c43869 ]
According to the new DT schema for qcom,rpm-msg-ram the node name should be sram@. memory@ is reserved for definition of physical RAM (usable by Linux).
This fixes the following dtbs_check error on various device trees:
memory@60000: 'device_type' is a required property
From schema: dtschema/schemas/memory.yaml
--- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8994.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/qcom/msm8916.dtsi +1 -1
@@ -445,7 +445,7 @@ }; }; - rpm_msg_ram: memory@60000 { + rpm_msg_ram: sram@60000 { compatible = "qcom,rpm-msg-ram"; reg = <0x00060000 0x8000>; };
arch/arm64/boot/dts/qcom/msm8994.dtsi +1 -1
@@ -715,7 +715,7 @@ reg = <0xfc400000 0x2000>; }; - rpm_msg_ram: memory@fc428000 { + rpm_msg_ram: sram@fc428000 { compatible = "qcom,rpm-msg-ram"; reg = <0xfc428000 0x4000>; };
arch/arm64/boot/dts/qcom/msm8996.dtsi +1 -1
@@ -638,7 +638,7 @@ }; }; - rpm_msg_ram: memory@68000 { + rpm_msg_ram: sram@68000 { compatible = "qcom,rpm-msg-ram"; reg = <0x00068000 0x6000>; };
arch/arm64/boot/dts/qcom/msm8998.dtsi +1 -1
@@ -861,7 +861,7 @@ reg = <0x00100000 0xb0000>; }; - rpm_msg_ram: memory@778000 { + rpm_msg_ram: sram@778000 { compatible = "qcom,rpm-msg-ram"; reg = <0x00778000 0x7000>; };
arch/arm64/boot/dts/qcom/qcs404.dtsi +1 -1
@@ -318,7 +318,7 @@ status = "disabled"; }; - rpm_msg_ram: memory@60000 { + rpm_msg_ram: sram@60000 { compatible = "qcom,rpm-msg-ram"; reg = <0x00060000 0x6000>; };
arch/arm64/boot/dts/qcom/sdm630.dtsi +1 -1
@@ -541,7 +541,7 @@ <&sleep_clk>; }; - rpm_msg_ram: memory@778000 { + rpm_msg_ram: sram@778000 { compatible = "qcom,rpm-msg-ram"; reg = <0x00778000 0x7000>; };
arch/arm64/boot/dts/qcom/sm6125.dtsi +1 -1
@@ -380,7 +380,7 @@ status = "disabled"; }; - rpm_msg_ram: memory@45f0000 { + rpm_msg_ram: sram@45f0000 { compatible = "qcom,rpm-msg-ram"; reg = <0x045f0000 0x7000>; };
Greg Kroah-Hartman
maintainerPATCH 74/279 ALSA: gus: fix null pointer dereference on pointer block
In reply to Greg Kroah-HartmanFrom: Chengfeng Ye <[email protected]>
[ Upstream commit a0d21bb3279476c777434c40d969ea88ca64f9aa ]
The pointer block return from snd_gf1_dma_next_block could be null, so there is a potential null pointer dereference issue. Fix this by adding a null check before dereference.
--- sound/isa/gus/gus_dma.c | 2 ++ 1 file changed, 2 insertions(+)
sound/isa/gus/gus_dma.c +2 -0
@@ -126,6 +126,8 @@ static void snd_gf1_dma_interrupt(struct snd_gus_card * gus) } block =snd_gf1_dma_next_block (gus);spin_unlock (&gus->dma_lock); +if (!block) +return ;snd_gf1_dma_program (gus, block->addr, block->buf_addr, block->count, (unsigned short ) block->cmd);kfree (block);#if 0
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 76/279 clk: at91: sama7g5: remove prescaler part of master clock
In reply to Greg Kroah-HartmanFrom: Claudiu Beznea <[email protected]>
[ Upstream commit facb87ad75603813bc3b1314f5a87377f020fcb8 ]
On SAMA7G5 the prescaler part of master clock has been implemented as a changeable one. Everytime the prescaler is changed the PMC_SR.MCKRDY bit must be polled. Value 1 for PMC_SR.MCKRDY means the prescaler update is done. Driver polls for this bit until it becomes 1. On SAMA7G5 it has been discovered that in some conditions the PMC_SR.MCKRDY is not rising but the rate it provides it's stable. The workaround is to add a timeout when polling for PMC_SR.MCKRDY. At the moment, for SAMA7G5, the prescaler will be removed from Linux clock tree as all the frequencies for CPU could be obtained from PLL and also there will be less overhead when changing frequency via DVFS.
--- drivers/clk/at91/sama7g5.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/clk/at91/sama7g5.c +1 -10
@@ -982,16 +982,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np) } parent_names[0 ] ="cpupll_divpmcck" ; - hw =at91_clk_register_master_pres (regmap,"cpuck" ,1 , parent_names, - &mck0_layout, &mck0_characteristics, - &pmc_mck0_lock, -CLK_SET_RATE_PARENT ,0 ); -if (IS_ERR (hw)) - goto err_free; - - sama7g5_pmc->chws[PMC_CPU ] = hw; - - hw =at91_clk_register_master_div (regmap,"mck0" ,"cpuck" , + hw =at91_clk_register_master_div (regmap,"mck0" ,"cpupll_divpmcck" , &mck0_layout, &mck0_characteristics, &pmc_mck0_lock,0 );if (IS_ERR (hw))
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 75/279 ALSA: usb-audio: fix null pointer dereference on pointer cs_desc
In reply to Greg Kroah-HartmanFrom: Chengfeng Ye <[email protected]>
[ Upstream commit b97053df0f04747c3c1e021ecbe99db675342954 ]
The pointer cs_desc return from snd_usb_find_clock_source could be null, so there is a potential null pointer dereference issue. Fix this by adding a null check before dereference.
--- sound/usb/clock.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/usb/clock.c +4 -0
@@ -496,6 +496,10 @@ int snd_usb_set_sample_rate_v2v3(struct snd_usb_audio *chip,union uac23_clock_source_desc *cs_desc; cs_desc =snd_usb_find_clock_source (chip, clock, fmt->protocol); + +if (!cs_desc) +return 0 ; +if (fmt->protocol ==UAC_VERSION_3 ) bmControls =le32_to_cpu (cs_desc->v3.bmControls);else
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 77/279 iommu/dart: Initialize DART_STREAMS_ENABLE
In reply to Greg Kroah-HartmanFrom: Sven Peter <[email protected]>
[ Upstream commit 5a009fc1364170b240a4d351b345e69bb3728b3e ]
DART has an additional global register to control which streams are isolated. This register is a bit redundant since DART_TCR can already be used to control isolation and is usually initialized to DART_STREAM_ALL by the time we get control. Some DARTs (namely the one used for the audio controller) however have some streams disabled initially. Make sure those work by initializing DART_STREAMS_ENABLE during reset.
--- drivers/iommu/apple-dart.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/iommu/apple-dart.c +5 -0
@@ -70,6 +70,8 @@#define DART_ERROR_ADDR_HI 0x54#define DART_ERROR_ADDR_LO 0x50 +#define DART_STREAMS_ENABLE 0xfc +#define DART_TCR (sid) (0x100 + 4 * (sid))#define DART_TCR_TRANSLATE_ENABLE BIT(7)#define DART_TCR_BYPASS0_ENABLE BIT(8)
@@ -301,6 +303,9 @@ static int apple_dart_hw_reset(struct apple_dart *dart)apple_dart_hw_disable_dma (&stream_map);apple_dart_hw_clear_all_ttbrs (&stream_map); +/* enable all streams globally since TCR is used to control isolation */ +writel (DART_STREAM_ALL , dart->regs +DART_STREAMS_ENABLE ); +/* clear any pending errors before the interrupt is unmasked */ writel (readl (dart->regs +DART_ERROR ), dart->regs +DART_ERROR );
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 78/279 powerpc/dcr: Use cmplwi instead of 3-argument cmpli
In reply to Greg Kroah-HartmanFrom: Michael Ellerman <[email protected]>
[ Upstream commit fef071be57dc43679a32d5b0e6ee176d6f12e9f2 ]
In dcr-low.S we use cmpli with three arguments, instead of four arguments as defined in the ISA:
cmpli cr0,r3,1024
This appears to be a PPC440-ism, looking at the "PPC440x5 CPU Core User’s Manual" it shows cmpli having no L field, but implied to be 0 due to the core being 32-bit. It mentions that the ISA defines four arguments and recommends using cmplwi.
It also corresponds to the old POWER instruction set, which had no L field there, a reserved bit instead.
dcr-low.S is only built 32-bit, because it is only built when DCR_NATIVE=y, which is only selected by 40x and 44x. Looking at the generated code (with gcc/gas) we see cmplwi as expected.
Although gas is happy with the 3-argument version when building for 32-bit, the LLVM assembler is not and errors out with:
arch/powerpc/sysdev/dcr-low.S:27:10: error: invalid operand for instruction
cmpli 0,%r3,1024; ...
^
Switch to the cmplwi extended opcode, which avoids any confusion when reading the ISA, fixes the issue with the LLVM assembler, and also means the code could be built 64-bit in future (though that's very unlikely).
--- arch/powerpc/sysdev/dcr-low.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/sysdev/dcr-low.S +1 -1
@@ -11,7 +11,7 @@ #include <asm/export.h> #define DCR_ACCESS_PROLOG(table) \ - cmpli cr0,r3,1024; \ + cmplwi cr0,r3,1024; \ rlwinm r3,r3,4,18,27; \ lis r5,table@h; \ ori r5,r5,table@l; \
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 52/279 ARM: dts: omap: fix gpmc,mux-add-data type
In reply to Greg Kroah-HartmanFrom: Roger Quadros <[email protected]>
[ Upstream commit 51b9e22ffd3c4c56cbb7caae9750f70e55ffa603 ]
gpmc,mux-add-data is not boolean.
Fixes the below errors flagged by dtbs_check.
"ethernet@4,0:gpmc,mux-add-data: True is not of type 'array'"
--- arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi | 2 +- arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi +1 -1
@@ -29,7 +29,7 @@ compatible = "smsc,lan9221","smsc,lan9115"; bank-width = <2>; - gpmc,mux-add-data; + gpmc,mux-add-data = <0>; gpmc,cs-on-ns = <0>; gpmc,cs-rd-off-ns = <42>; gpmc,cs-wr-off-ns = <36>;
arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi +1 -1
@@ -22,7 +22,7 @@ compatible = "smsc,lan9221","smsc,lan9115"; bank-width = <2>; - gpmc,mux-add-data; + gpmc,mux-add-data = <0>; gpmc,cs-on-ns = <0>; gpmc,cs-rd-off-ns = <42>; gpmc,cs-wr-off-ns = <36>;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 79/279 powerpc/8xx: Fix Oops with STRICT_KERNEL_RWX without DEBUG_RODATA_TEST
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
[ Upstream commit c12ab8dbc492b992e1ea717db933cee568780c47 ]
Until now, all tests involving CONFIG_STRICT_KERNEL_RWX were done with DEBUG_RODATA_TEST to check the result. But now that CONFIG_STRICT_KERNEL_RWX is selected by default, it came without CONFIG_DEBUG_RODATA_TEST and led to the following Oops
[ 6.830908] Freeing unused kernel image (initmem) memory: 352K [ 6.840077] BUG: Unable to handle kernel data access on write at 0xc1285200 [ 6.846836] Faulting instruction address: 0xc0004b6c [ 6.851745] Oops: Kernel access of bad area, sig: 11 [#1] [ 6.857075] BE PAGE_SIZE=16K PREEMPT CMPC885 [ 6.861348] SAF3000 DIE NOTIFICATION [ 6.864830] CPU: 0 PID: 1 Comm: swapper Not tainted 5.15.0-rc5-s3k-dev-02255-g2747d7b7916f #451 [ 6.873429] NIP: c0004b6c LR: c0004b60 CTR: 00000000 [ 6.878419] REGS: c902be60 TRAP: 0300 Not tainted (5.15.0-rc5-s3k-dev-02255-g2747d7b7916f) [ 6.886852] MSR: 00009032 <EE,ME,IR,DR,RI> CR: 53000335 XER: 8000ff40 [ 6.893564] DAR: c1285200 DSISR: 82000000 [ 6.893564] GPR00: 0c000000 c902bf20 c20f4000 08000000 00000001 04001f00 c1800000 00000035 [ 6.893564] GPR08: ff0001ff c1280000 00000002 c0004b60 00001000 00000000 c0004b1c 00000000 [ 6.893564] GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 6.893564] GPR24: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 c1060000 [ 6.932034] NIP [c0004b6c] kernel_init+0x50/0x138 [ 6.936682] LR [c0004b60] kernel_init+0x44/0x138 [ 6.941245] Call Trace: [ 6.943653] [c902bf20] [c0004b60] kernel_init+0x44/0x138 (unreliable) [ 6.950022] [c902bf30] [c001122c] ret_from_kernel_thread+0x5c/0x64 [ 6.956135] Instruction dump: [ 6.959060] 48ffc521 48045469 4800d8cd 3d20c086 89295fa0 2c090000 41820058 480796c9 [ 6.966890] 4800e48d 3d20c128 39400002 3fe0c106 <91495200> 3bff8000 4806fa1d 481f7d75 [ 6.974902] ---[ end trace 1e397bacba4aa610 ]---
0xc1285200 corresponds to 'system_state' global var that the kernel is trying to set to SYSTEM_RUNNING. This var is above the RO/RW limit so it shouldn't Oops.
It oopses because the dirty bit is missing.
--- arch/powerpc/kernel/head_8xx.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/head_8xx.S +1 -1
@@ -755,7 +755,7 @@ _GLOBAL(mmu_pin_tlb) cmplw r6, r9 bdnzt lt, 2b -4: LOAD_REG_IMMEDIATE(r8, 0xf0 | _PAGE_SPS | _PAGE_SH | _PAGE_PRESENT) +4: LOAD_REG_IMMEDIATE(r8, 0xf0 | _PAGE_DIRTY | _PAGE_SPS | _PAGE_SH | _PAGE_PRESENT) 2: ori r0, r6, MD_EVALID mtspr SPRN_MD_CTR, r5 mtspr SPRN_MD_EPN, r0
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 80/279 sh: check return code of request_irq
In reply to Greg Kroah-HartmanFrom: Nick Desaulniers <[email protected]>
[ Upstream commit 0e38225c92c7964482a8bb6b3e37fde4319e965c ]
request_irq is marked __must_check, but the call in shx3_prepare_cpus has a void return type, so it can't propagate failure to the caller. Follow cues from hexagon and just print an error.
--- arch/sh/kernel/cpu/sh4a/smp-shx3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/sh/kernel/cpu/sh4a/smp-shx3.c +3 -2
@@ -73,8 +73,9 @@ static void shx3_prepare_cpus(unsigned int max_cpus)BUILD_BUG_ON (SMP_MSG_NR >=8 );for (i =0 ; i <SMP_MSG_NR ; i++) -request_irq (104 + i, ipi_interrupt_handler, -IRQF_PERCPU ,"IPI" , (void *)(long )i); +if (request_irq (104 + i, ipi_interrupt_handler, +IRQF_PERCPU ,"IPI" , (void *)(long )i)) +pr_err ("Failed to request irq %d\n" , i);for (i =0 ; i < max_cpus; i++)set_cpu_present (i, true);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 81/279 maple: fix wrong return value of maple_bus_init().
In reply to Greg Kroah-HartmanFrom: Lu Wei <[email protected]>
[ Upstream commit bde82ee391fa6d3ad054313c4aa7b726d32515ce ]
If KMEM_CACHE or maple_alloc_dev failed, the maple_bus_init() will return 0 rather than error, because the retval is not changed after KMEM_CACHE or maple_alloc_dev failed.
--- drivers/sh/maple/maple.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/sh/maple/maple.c +4 -1
@@ -834,8 +834,10 @@ static int __init maple_bus_init(void) maple_queue_cache =KMEM_CACHE (maple_buffer,SLAB_HWCACHE_ALIGN ); -if (!maple_queue_cache) +if (!maple_queue_cache) { + retval = -ENOMEM ; goto cleanup_bothirqs; + }INIT_LIST_HEAD (&maple_waitq);INIT_LIST_HEAD (&maple_sentq);
@@ -848,6 +850,7 @@ static int __init maple_bus_init(void)if (!mdev[i]) {while (i-- >0 )maple_free_dev (mdev[i]); + retval = -ENOMEM ; goto cleanup_cache; } baseunits[i] = mdev[i];
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 82/279 f2fs: fix up f2fs_lookup tracepoints
In reply to Greg Kroah-HartmanFrom: Gao Xiang <[email protected]>
[ Upstream commit 70a9ac36ffd807ac506ed0b849f3e8ce3c6623f2 ]
Fix up a misuse that the filename pointer isn't always valid in the ring buffer, and we should copy the content instead.
--- include/trace/events/f2fs.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
include/trace/events/f2fs.h +6 -6
@@ -807,20 +807,20 @@ TRACE_EVENT(f2fs_lookup_start,TP_STRUCT__entry (__field (dev_t ,dev )__field (ino_t, ino) - __field(const char *, name) + __string(name, dentry->d_name.name) __field(unsigned int, flags) ),TP_fast_assign ( __entry->dev = dir->i_sb->s_dev; __entry->ino = dir->i_ino; - __entry->name = dentry->d_name.name; +__assign_str (name, dentry->d_name.name); __entry->flags = flags; ),TP_printk ("dev = (%d,%d), pino = %lu, name:%s, flags:%u" ,show_dev_ino (__entry), - __entry->name, +__get_str (name), __entry->flags) );
@@ -834,7 +834,7 @@ TRACE_EVENT(f2fs_lookup_end,TP_STRUCT__entry (__field (dev_t ,dev )__field (ino_t, ino) - __field(const char *, name) + __string(name, dentry->d_name.name)__field (nid_t, cino)__field (int, err) ),
@@ -842,14 +842,14 @@ TRACE_EVENT(f2fs_lookup_end,TP_fast_assign ( __entry->dev = dir->i_sb->s_dev; __entry->ino = dir->i_ino; - __entry->name = dentry->d_name.name; +__assign_str (name, dentry->d_name.name); __entry->cino = ino; __entry->err = err; ),TP_printk ("dev = (%d,%d), pino = %lu, name:%s, ino:%u, err:%d" ,show_dev_ino (__entry), - __entry->name, +__get_str (name), __entry->cino, __entry->err) );
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 83/279 f2fs: fix to use WHINT_MODE
In reply to Greg Kroah-HartmanFrom: Keoseong Park <[email protected]>
[ Upstream commit 011e0868e0cf1237675b22e36fffa958fb08f46e ]
Since active_logs can be set to 2 or 4 or NR_CURSEG_PERSIST_TYPE(6), it cannot be set to NR_CURSEG_TYPE(8).
That is, whint_mode is always off.
Therefore, the condition is changed from NR_CURSEG_TYPE to NR_CURSEG_PERSIST_TYPE.
--- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/super.c +1 -1
@@ -1292,7 +1292,7 @@ default_check:/* Not pass down write hints if the number of active logs is lesser * than NR_CURSEG_PERSIST_TYPE. */ -if (F2FS_OPTION (sbi).active_logs !=NR_CURSEG_TYPE ) +if (F2FS_OPTION (sbi).active_logs !=NR_CURSEG_PERSIST_TYPE )F2FS_OPTION (sbi).whint_mode =WHINT_MODE_OFF ;if (f2fs_sb_has_readonly (sbi) && !f2fs_readonly (sbi->sb)) {
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 53/279 usb: host: ohci-tmio: check return value after calling platform_get_resource()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 9eff2b2e59fda25051ab36cd1cb5014661df657b ]
It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value.
--- drivers/usb/host/ohci-tmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-tmio.c +1 -1
@@ -199,7 +199,7 @@ static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)if (usb_disabled ())return -ENODEV ; -if (!cell) +if (!cell || !regs || !config || !sram)return -EINVAL ;if (irq <0 )
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 49/279 cpuidle: tegra: Check whether PMC is ready
In reply to Greg Kroah-HartmanFrom: Dmitry Osipenko <[email protected]>
[ Upstream commit bdb1ffdad3b73e4d0538098fc02e2ea87a6b27cd ]
Check whether PMC is ready before proceeding with the cpuidle registration. This fixes racing with the PMC driver probe order, which results in a disabled deepest CC6 idling state if cpuidle driver is probed before the PMC.
--- drivers/cpuidle/cpuidle-tegra.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/cpuidle/cpuidle-tegra.c +3 -0
@@ -337,6 +337,9 @@ static void tegra_cpuidle_setup_tegra114_c7_state(void)static int tegra_cpuidle_probe (struct platform_device *pdev) { +if (tegra_pmc_get_suspend_mode () ==TEGRA_SUSPEND_NOT_READY ) +return -EPROBE_DEFER ; +/* LP2 could be disabled in device-tree */ if (tegra_pmc_get_suspend_mode () <TEGRA_SUSPEND_LP2 )tegra_cpuidle_disable_state (TEGRA_CC6 );
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 54/279 ASoC: rt5682: fix a little pop while playback
In reply to Greg Kroah-HartmanFrom: Derek Fang <[email protected]>
[ Upstream commit 4b19e4a77cc6baa0f840e8bae62ab974667f6207 ]
A little pop can be heard obviously from HP while playing a silent. This patch fixes it by using two functions:
1. Enable HP 1bit output mode.
2. Change the charge pump switch size during playback on and off.
--- sound/soc/codecs/rt5682.c | 56 +++++++++++++++++++++++++++++++++------ sound/soc/codecs/rt5682.h | 20 ++++++++++++++ 2 files changed, 68 insertions(+), 8 deletions(-)
sound/soc/codecs/rt5682.c +48 -8
@@ -46,6 +46,8 @@ static const struct reg_sequence patch_list[] = { {RT5682_SAR_IL_CMD_1, 0x22b7}, {RT5682_SAR_IL_CMD_3, 0x0365}, {RT5682_SAR_IL_CMD_6, 0x0110}, + {RT5682_CHARGE_PUMP_1, 0x0210}, + {RT5682_HP_LOGIC_CTRL_2, 0x0007}, };void rt5682_apply_patch_list (struct rt5682_priv *rt5682,struct device *dev)
@@ -1515,21 +1517,29 @@ static int rt5682_hp_event(struct snd_soc_dapm_widget *w,switch (event) {case SND_SOC_DAPM_PRE_PMU : -snd_soc_component_write (component, -RT5682_HP_LOGIC_CTRL_2 ,0x0012 ); -snd_soc_component_write (component, -RT5682_HP_CTRL_2 ,0x6000 ); +snd_soc_component_update_bits (component,RT5682_HP_CTRL_2 , +RT5682_HP_C2_DAC_AMP_MUTE ,0 ); +snd_soc_component_update_bits (component,RT5682_HP_LOGIC_CTRL_2 , +RT5682_HP_LC2_SIG_SOUR2_MASK ,RT5682_HP_LC2_SIG_SOUR2_REG );snd_soc_component_update_bits (component,RT5682_DEPOP_1 ,0x60 ,0x60 );snd_soc_component_update_bits (component,RT5682_DAC_ADC_DIG_VOL1 ,0x00c0 ,0x0080 ); +snd_soc_component_update_bits (component,RT5682_HP_CTRL_2 , +RT5682_HP_C2_DAC_L_EN |RT5682_HP_C2_DAC_R_EN , +RT5682_HP_C2_DAC_L_EN |RT5682_HP_C2_DAC_R_EN ); +usleep_range (5000 ,10000 ); +snd_soc_component_update_bits (component,RT5682_CHARGE_PUMP_1 , +RT5682_CP_SW_SIZE_MASK ,RT5682_CP_SW_SIZE_L );break ;case SND_SOC_DAPM_POST_PMD : +snd_soc_component_update_bits (component,RT5682_HP_CTRL_2 , +RT5682_HP_C2_DAC_L_EN |RT5682_HP_C2_DAC_R_EN ,0 ); +snd_soc_component_update_bits (component,RT5682_CHARGE_PUMP_1 , +RT5682_CP_SW_SIZE_MASK ,RT5682_CP_SW_SIZE_M );snd_soc_component_update_bits (component,RT5682_DEPOP_1 ,0x60 ,0x0 ); -snd_soc_component_write (component, -RT5682_HP_CTRL_2 ,0x0000 );snd_soc_component_update_bits (component,RT5682_DAC_ADC_DIG_VOL1 ,0x00c0 ,0x0000 );break ;
@@ -1637,6 +1647,23 @@ static SOC_VALUE_ENUM_SINGLE_DECL(rt5682_adcdat_pin_enum,static const struct snd_kcontrol_new rt5682_adcdat_pin_ctrl =SOC_DAPM_ENUM ("ADCDAT" , rt5682_adcdat_pin_enum); +static const unsigned int rt5682_hpo_sig_out_values[] = { +2 , +7 , +}; + +static const char *const rt5682_hpo_sig_out_mode[] = { +"Legacy" , +"OneBit" , +}; + +static SOC_VALUE_ENUM_SINGLE_DECL(rt5682_hpo_sig_out_enum, + RT5682_HP_LOGIC_CTRL_2, 0, RT5682_HP_LC2_SIG_SOUR1_MASK, + rt5682_hpo_sig_out_mode, rt5682_hpo_sig_out_values); + +static const struct snd_kcontrol_new rt5682_hpo_sig_demux = +SOC_DAPM_ENUM ("HPO Signal Demux" , rt5682_hpo_sig_out_enum); +static const struct snd_soc_dapm_widget rt5682_dapm_widgets[] = {SND_SOC_DAPM_SUPPLY ("LDO2" ,RT5682_PWR_ANLG_3 ,RT5682_PWR_LDO2_BIT ,0 ,NULL ,0 ),
@@ -1820,6 +1847,10 @@ static const struct snd_soc_dapm_widget rt5682_dapm_widgets[] = {SND_SOC_DAPM_SWITCH ("HPOR Playback" ,SND_SOC_NOPM ,0 ,0 , &hpor_switch), +SND_SOC_DAPM_OUT_DRV ("HPO Legacy" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_OUT_DRV ("HPO OneBit" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_DEMUX ("HPO Signal Demux" ,SND_SOC_NOPM ,0 ,0 , &rt5682_hpo_sig_demux), +/* CLK DET */ SND_SOC_DAPM_SUPPLY ("CLKDET SYS" ,RT5682_CLK_DET , RT5682_SYS_CLK_DET_SFT, 0, NULL, 0),
@@ -1987,10 +2018,19 @@ static const struct snd_soc_dapm_route rt5682_dapm_routes[] = { {"HP Amp", NULL, "Charge Pump"}, {"HP Amp", NULL, "CLKDET SYS"}, {"HP Amp", NULL, "Vref1"}, - {"HPOL Playback", "Switch", "HP Amp"}, - {"HPOR Playback", "Switch", "HP Amp"}, + + {"HPO Signal Demux", NULL, "HP Amp"}, + + {"HPO Legacy", "Legacy", "HPO Signal Demux"}, + {"HPO OneBit", "OneBit", "HPO Signal Demux"}, + + {"HPOL Playback", "Switch", "HPO Legacy"}, + {"HPOR Playback", "Switch", "HPO Legacy"}, + {"HPOL", NULL, "HPOL Playback"}, {"HPOR", NULL, "HPOR Playback"}, + {"HPOL", NULL, "HPO OneBit"}, + {"HPOR", NULL, "HPO OneBit"}, }; static int rt5682_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
sound/soc/codecs/rt5682.h +20 -0
@@ -375,6 +375,14 @@#define RT5682_R_VOL_MASK (0x3f)#define RT5682_R_VOL_SFT 0 +/* Headphone Amp Control 2 (0x0003) */ +#define RT5682_HP_C2_DAC_AMP_MUTE_SFT 15 +#define RT5682_HP_C2_DAC_AMP_MUTE (0x1 << 15) +#define RT5682_HP_C2_DAC_L_EN_SFT 14 +#define RT5682_HP_C2_DAC_L_EN (0x1 << 14) +#define RT5682_HP_C2_DAC_R_EN_SFT 13 +#define RT5682_HP_C2_DAC_R_EN (0x1 << 13) +/*Headphone Amp L/R Analog Gain and Digital NG2 Gain Control (0x0005 0x0006)*/ #define RT5682_G_HP (0xf << 8)#define RT5682_G_HP_SFT 8
@@ -1265,6 +1273,10 @@#define RT5682_HPA_CP_BIAS_6UA (0x3 << 2)/* Charge Pump Internal Register1 (0x0125) */ +#define RT5682_CP_SW_SIZE_MASK (0x7 << 8) +#define RT5682_CP_SW_SIZE_L (0x4 << 8) +#define RT5682_CP_SW_SIZE_M (0x2 << 8) +#define RT5682_CP_SW_SIZE_S (0x1 << 8)#define RT5682_CP_CLK_HP_MASK (0x3 << 4)#define RT5682_CP_CLK_HP_100KHZ (0x0 << 4)#define RT5682_CP_CLK_HP_200KHZ (0x1 << 4)
@@ -1315,6 +1327,14 @@#define RT5682_DEB_STO_DAC_MASK (0x7 << 4)#define RT5682_DEB_80_MS (0x0 << 4) +/* HP Behavior Logic Control 2 (0x01db) */ +#define RT5682_HP_LC2_SIG_SOUR2_MASK (0x1 << 4) +#define RT5682_HP_LC2_SIG_SOUR2_REG (0x1 << 4) +#define RT5682_HP_LC2_SIG_SOUR2_DC_CAL (0x0 << 4) +#define RT5682_HP_LC2_SIG_SOUR1_MASK (0x7) +#define RT5682_HP_LC2_SIG_SOUR1_1BIT (0x7) +#define RT5682_HP_LC2_SIG_SOUR1_LEGA (0x2) +/* SAR ADC Inline Command Control 1 (0x0210) */ #define RT5682_SAR_BUTT_DET_MASK (0x1 << 15)#define RT5682_SAR_BUTT_DET_EN (0x1 << 15)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 56/279 ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for flash
In reply to Greg Kroah-HartmanFrom: Li Yang <[email protected]>
[ Upstream commit 05e63b48b20fa70726be505a7660d1a07bc1cffb ]
We cannot list all the possible chips used in different board revisions, just use the generic "jedec,spi-nor" compatible instead. This also fixes dtbs_check error:
['jedec,spi-nor', 's25fl256s1', 's25fl512s'] is too long
--- arch/arm/boot/dts/ls1021a-tsn.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ls1021a-tsn.dts +1 -1
@@ -251,7 +251,7 @@ flash@0 { /* Rev. A uses 64MB flash, Rev. B & C use 32MB flash */ - compatible = "jedec,spi-nor", "s25fl256s1", "s25fl512s"; + compatible = "jedec,spi-nor"; spi-max-frequency = <20000000>; #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 55/279 ARM: dts: ls1021a: move thermal-zones node out of soc/
In reply to Greg Kroah-HartmanFrom: Li Yang <[email protected]>
[ Upstream commit 1ee1500ef717eefb5d9bdaf97905cb81b4e69aa4 ]
This fixes dtbs-check error from simple-bus schema:
soc: thermal-zones: {'type': 'object'} is not allowed for {'cpu-thermal': ..... }
From schema: /home/leo/.local/lib/python3.8/site-packages/dtschema/schemas/simple-bus.yaml
--- arch/arm/boot/dts/ls1021a.dtsi | 66 +++++++++++++++++----------------- 1 file changed, 33 insertions(+), 33 deletions(-)
arch/arm/boot/dts/ls1021a.dtsi +33 -33
@@ -329,39 +329,6 @@ #thermal-sensor-cells = <1>; }; - thermal-zones { - cpu_thermal: cpu-thermal { - polling-delay-passive = <1000>; - polling-delay = <5000>; - - thermal-sensors = <&tmu 0>; - - trips { - cpu_alert: cpu-alert { - temperature = <85000>; - hysteresis = <2000>; - type = "passive"; - }; - cpu_crit: cpu-crit { - temperature = <95000>; - hysteresis = <2000>; - type = "critical"; - }; - }; - - cooling-maps { - map0 { - trip = <&cpu_alert>; - cooling-device = - <&cpu0 THERMAL_NO_LIMIT - THERMAL_NO_LIMIT>, - <&cpu1 THERMAL_NO_LIMIT - THERMAL_NO_LIMIT>; - }; - }; - }; - }; - dspi0: spi@2100000 { compatible = "fsl,ls1021a-v1.0-dspi"; #address-cells = <1>;
@@ -1016,4 +983,37 @@ big-endian; }; }; + + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <1000>; + polling-delay = <5000>; + + thermal-sensors = <&tmu 0>; + + trips { + cpu_alert: cpu-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_crit: cpu-crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = + <&cpu0 THERMAL_NO_LIMIT + THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT + THERMAL_NO_LIMIT>; + }; + }; + }; + }; };
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 58/279 iommu/vt-d: Do not falsely log intel_iommu is unsupported kernel option
In reply to Greg Kroah-HartmanFrom: Tvrtko Ursulin <[email protected]>
[ Upstream commit 5240aed2cd2594fb392239f11b9681e5e1591619 ]
Handling of intel_iommu kernel command line option should return "true" to indicate option is valid and so avoid logging it as unknown by the core parsing code.
Also log unknown sub-options at the notice level to let user know of potential typos or similar.
--- drivers/iommu/intel/iommu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/iommu/intel/iommu.c +5 -1
@@ -412,6 +412,7 @@ static int __init intel_iommu_setup(char *str) {if (!str)return -EINVAL ; +while (*str) {if (!strncmp (str,"on" ,2 )) { dmar_disabled =0 ;
@@ -441,13 +442,16 @@ static int __init intel_iommu_setup(char *str) }else if (!strncmp (str,"tboot_noforce" ,13 )) {pr_info ("Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n" ); intel_iommu_tboot_noforce =1 ; + }else { +pr_notice ("Unknown option - '%s'\n" , str); } str +=strcspn (str,"," );while (*str ==',' ) str++; } -return 0 ; + +return 1 ; }__setup ("intel_iommu=" , intel_iommu_setup);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 85/279 sh: fix kconfig unmet dependency warning for FRAME_POINTER
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit fda1bc533094a7db68b11e7503d2c6c73993d12a ]
FRAME_POINTER depends on DEBUG_KERNEL so DWARF_UNWINDER should depend on DEBUG_KERNEL before selecting FRAME_POINTER.
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on [n]: DEBUG_KERNEL [=n] && (M68K || UML || SUPERH [=y]) || ARCH_WANT_FRAME_POINTERS [=n] Selected by [y]:
- DWARF_UNWINDER [=y]
--- arch/sh/Kconfig.debug | 1 + 1 file changed, 1 insertion(+)
arch/sh/Kconfig.debug +1 -0
@@ -54,6 +54,7 @@ config DUMP_CODE config DWARF_UNWINDER bool "Enable the DWARF unwinder for stacktraces" + depends on DEBUG_KERNEL select FRAME_POINTER default n help
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 94/279 mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit 5eeaafc8d69373c095e461bdb39e5c9b62228ac5 ]
Several header files need info on CONFIG_32BIT or CONFIG_64BIT, but kconfig symbol BCM63XX does not provide that info. This leads to many build errors, e.g.:
arch/mips/include/asm/page.h:196:13: error: use of undeclared identifier 'CAC_BASE'
return x - PAGE_OFFSET + PHYS_OFFSET;
arch/mips/include/asm/mach-generic/spaces.h:91:23: note: expanded from macro 'PAGE_OFFSET'
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
arch/mips/include/asm/io.h:134:28: error: use of undeclared identifier 'CAC_BASE'
return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
arch/mips/include/asm/mach-generic/spaces.h:91:23: note: expanded from macro 'PAGE_OFFSET'
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)arch/mips/include/asm/uaccess.h:82:10: error: use of undeclared identifier '__UA_LIMIT'
return (__UA_LIMIT & (addr | (addr + size) | __ua_size(size))) == 0;
Selecting the SYS_HAS_CPU_BMIPS* symbols causes SYS_HAS_CPU_BMIPS to be set, which then selects CPU_SUPPORT_32BIT_KERNEL, which causes CONFIG_32BIT to be set. (a bit more indirect than v1 [RFC].)
--- arch/mips/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/mips/Kconfig +3 -0
@@ -332,6 +332,9 @@ config BCM63XX select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN select SYS_HAS_EARLY_PRINTK + select SYS_HAS_CPU_BMIPS32_3300 + select SYS_HAS_CPU_BMIPS4350 + select SYS_HAS_CPU_BMIPS4380 select SWAP_IO_SPACE select GPIOLIB select MIPS_L1_CACHE_SHIFT_4
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 95/279 MIPS: boot/compressed/: add __bswapdi2() to target for ZSTD decompression
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit e2f4b3be1d3c73176db734565b160250cc1300dd ]
For MIPS pre-boot, when CONFIG_KERNEL_ZSTD=y, the decompressor function uses __bswapdi2(), so this object file should be added to the target object file.
Fixes these build errors:
mips-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xxh64':
decompress.c:(.text+0x8be0): undefined reference to `__bswapdi2'
mips-linux-ld: decompress.c:(.text+0x8c78): undefined reference to `__bswapdi2'
mips-linux-ld: decompress.c:(.text+0x8d04): undefined reference to `__bswapdi2'
mips-linux-ld: arch/mips/boot/compressed/decompress.o:decompress.c:(.text+0xa010): more undefined references to `__bswapdi2' follow
--- arch/mips/boot/compressed/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
arch/mips/boot/compressed/Makefile +6 -0
@@ -56,6 +56,8 @@ $(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o +vmlinuzobjs-$(CONFIG_KERNEL_ZSTD) += $(obj)/bswapdi.o + extra-y += ashldi3.c $(obj)/ashldi3.c: $(obj)/%.c: $(srctree)/lib/%.c FORCE $(call if_changed,shipped)
@@ -64,6 +66,10 @@ extra-y += bswapsi.c $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE $(call if_changed,shipped) +extra-y += bswapdi.c +$(obj)/bswapdi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE + $(call if_changed,shipped) + targets := $(notdir $(vmlinuzobjs-y)) targets += vmlinux.bin
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 96/279 sched/core: Mitigate race cpus_share_cache()/update_top_cache_domain()
In reply to Greg Kroah-HartmanFrom: Vincent Donnefort <[email protected]>
[ Upstream commit 42dc938a590c96eeb429e1830123fef2366d9c80 ]
Nothing protects the access to the per_cpu variable sd_llc_id. When testing the same CPU (i.e. this_cpu == that_cpu), a race condition exists with update_top_cache_domain(). One scenario being:
CPU1 CPU2
==================================================================
per_cpu(sd_llc_id, CPUX) => 0
partition_sched_domains_locked()
detach_destroy_domains()
cpus_share_cache(CPUX, CPUX) update_top_cache_domain(CPUX)
per_cpu(sd_llc_id, CPUX) => 0
per_cpu(sd_llc_id, CPUX) = CPUX
per_cpu(sd_llc_id, CPUX) => CPUX
return false
ttwu_queue_cond() wouldn't catch smp_processor_id() == cpu and the result is a warning triggered from ttwu_queue_wakelist().
Avoid a such race in cpus_share_cache() by always returning true when this_cpu == that_cpu.
--- kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/sched/core.c +3 -0
@@ -3707,6 +3707,9 @@ out:bool cpus_share_cache (int this_cpu,int that_cpu) { +if (this_cpu == that_cpu) +return true; +return per_cpu (sd_llc_id, this_cpu) ==per_cpu (sd_llc_id, that_cpu); }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 97/279 sched/fair: Prevent dead task groups from regaining cfs_rqs
In reply to Greg Kroah-HartmanFrom: Mathias Krause <[email protected]>
[ Upstream commit b027789e5e50494c2325cc70c8642e7fd6059479 ]
Kevin is reporting crashes which point to a use-after-free of a cfs_rq in update_blocked_averages(). Initial debugging revealed that we've live cfs_rq's (on_list=1) in an about to be kfree()'d task group in free_fair_sched_group(). However, it was unclear how that can happen.
His kernel config happened to lead to a layout of struct sched_entity that put the 'my_q' member directly into the middle of the object which makes it incidentally overlap with SLUB's freelist pointer. That, in combination with SLAB_FREELIST_HARDENED's freelist pointer mangling, leads to a reliable access violation in form of a #GP which made the UAF fail fast.
Michal seems to have run into the same issue[1]. He already correctly diagnosed that commit a7b359fc6a37 ("sched/fair: Correctly insert cfs_rq's to list on unthrottle") is causing the preconditions for the UAF to happen by re-adding cfs_rq's also to task groups that have no more running tasks, i.e. also to dead ones. His analysis, however, misses the real root cause and it cannot be seen from the crash backtrace only, as the real offender is tg_unthrottle_up() getting called via sched_cfs_period_timer() via the timer interrupt at an inconvenient time.
When unregister_fair_sched_group() unlinks all cfs_rq's from the dying task group, it doesn't protect itself from getting interrupted. If the timer interrupt triggers while we iterate over all CPUs or after unregister_fair_sched_group() has finished but prior to unlinking the task group, sched_cfs_period_timer() will execute and walk the list of task groups, trying to unthrottle cfs_rq's, i.e. re-add them to the dying task group. These will later -- in free_fair_sched_group() -- be kfree()'ed while still being linked, leading to the fireworks Kevin and Michal are seeing.
To fix this race, ensure the dying task group gets unlinked first. However, simply switching the order of unregistering and unlinking the task group isn't sufficient, as concurrent RCU walkers might still see it, as can be seen below:
CPU1: CPU2:
: timer IRQ:
: do_sched_cfs_period_timer():
: :
: distribute_cfs_runtime():
: rcu_read_lock();
: :
: unthrottle_cfs_rq():
sched_offline_group(): :
: walk_tg_tree_from(…,tg_unthrottle_up,…):
list_del_rcu(&tg->list); :
(1) : list_for_each_entry_rcu(child, &parent->children, siblings)
: :
(2) list_del_rcu(&tg->siblings); :
: tg_unthrottle_up():
unregister_fair_sched_group(): struct cfs_rq *cfs_rq = tg->cfs_rq[cpu_of(rq)];
: :
list_del_leaf_cfs_rq(tg->cfs_rq[cpu]); :
: :
: if (!cfs_rq_is_decayed(cfs_rq) || cfs_rq->nr_running) (3) : list_add_leaf_cfs_rq(cfs_rq);
: :
: :
: :
: :
: :
(4) : rcu_read_unlock();
CPU 2 walks the task group list in parallel to sched_offline_group(), specifically, it'll read the soon to be unlinked task group entry at (1). Unlinking it on CPU 1 at (2) therefore won't prevent CPU 2 from still passing it on to tg_unthrottle_up(). CPU 1 now tries to unlink all cfs_rq's via list_del_leaf_cfs_rq() in unregister_fair_sched_group(). Meanwhile CPU 2 will re-add some of these at (3), which is the cause of the UAF later on.
To prevent this additional race from happening, we need to wait until walk_tg_tree_from() has finished traversing the task groups, i.e. after the RCU read critical section ends in (4). Afterwards we're safe to call unregister_fair_sched_group(), as each new walk won't see the dying task group any more.
On top of that, we need to wait yet another RCU grace period after unregister_fair_sched_group() to ensure print_cfs_stats(), which might run concurrently, always sees valid objects, i.e. not already free'd ones.
This patch survives Michal's reproducer[2] for 8h+ now, which used to trigger within minutes before.
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/lkml/[email protected]/
--- kernel/sched/autogroup.c | 2 +- kernel/sched/core.c | 44 ++++++++++++++++++++++++++++++++-------- kernel/sched/fair.c | 4 ++-- kernel/sched/rt.c | 12 ++++++++--- kernel/sched/sched.h | 3 ++- 5 files changed, 49 insertions(+), 16 deletions(-)
kernel/sched/autogroup.c +1 -1
@@ -31,7 +31,7 @@ static inline void autogroup_destroy(struct kref *kref) ag->tg->rt_se =NULL ; ag->tg->rt_rq =NULL ;#endif -sched_offline_group (ag->tg); +sched_release_group (ag->tg);sched_destroy_group (ag->tg); }
kernel/sched/core.c +35 -9
80 lines not on this page · raw message
kernel/sched/fair.c +2 -2
@@ -11358,8 +11358,6 @@ void free_fair_sched_group(struct task_group *tg) {int i; -destroy_cfs_bandwidth (tg_cfs_bandwidth (tg)); -for_each_possible_cpu (i) {if (tg->cfs_rq)kfree (tg->cfs_rq[i]);
@@ -11436,6 +11434,8 @@ void unregister_fair_sched_group(struct task_group *tg)struct rq *rq;int cpu; +destroy_cfs_bandwidth (tg_cfs_bandwidth (tg)); +for_each_possible_cpu (cpu) {if (tg->se[cpu])remove_entity_load_avg (tg->se[cpu]);
kernel/sched/rt.c +9 -3
@@ -137,13 +137,17 @@ static inline struct rq *rq_of_rt_se(struct sched_rt_entity *rt_se)return rt_rq->rq; } -void free_rt_sched_group (struct task_group *tg) +void unregister_rt_sched_group (struct task_group *tg) { -int i; -if (tg->rt_se)destroy_rt_bandwidth (&tg->rt_bandwidth); +} + +void free_rt_sched_group (struct task_group *tg) +{ +int i; +for_each_possible_cpu (i) {if (tg->rt_rq)kfree (tg->rt_rq[i]);
@@ -250,6 +254,8 @@ static inline struct rt_rq *rt_rq_of_se(struct sched_rt_entity *rt_se)return &rq->rt; } +void unregister_rt_sched_group (struct task_group *tg) { } +void free_rt_sched_group (struct task_group *tg) { }int alloc_rt_sched_group (struct task_group *tg,struct task_group *parent)
kernel/sched/sched.h +2 -1
@@ -486,6 +486,7 @@ extern void __refill_cfs_bandwidth_runtime(struct cfs_bandwidth *cfs_b);extern void start_cfs_bandwidth (struct cfs_bandwidth *cfs_b);extern void unthrottle_cfs_rq (struct cfs_rq *cfs_rq); +extern void unregister_rt_sched_group (struct task_group *tg);extern void free_rt_sched_group (struct task_group *tg);extern int alloc_rt_sched_group (struct task_group *tg,struct task_group *parent); extern void init_tg_rt_entry(struct task_group *tg, struct rt_rq *rt_rq,
@@ -501,7 +502,7 @@ extern struct task_group *sched_create_group(struct task_group *parent);extern void sched_online_group (struct task_group *tg,struct task_group *parent);extern void sched_destroy_group (struct task_group *tg); -extern void sched_offline_group (struct task_group *tg); +extern void sched_release_group (struct task_group *tg);extern void sched_move_task (struct task_struct *tsk);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 101/279 perf bpf: Avoid memory leak from perf_env__insert_btf()
In reply to Greg Kroah-HartmanFrom: Ian Rogers <[email protected]>
[ Upstream commit 4924b1f7c46711762fd0e65c135ccfbcfd6ded1f ]
perf_env__insert_btf() doesn't insert if a duplicate BTF id is encountered and this causes a memory leak. Modify the function to return a success/error value and then free the memory if insertion didn't happen.
v2. Adds a return -1 when the insertion error occurs in
perf_env__fetch_btf. This doesn't affect anything as the result is never checked.
--- tools/perf/util/bpf-event.c | 6 +++++- tools/perf/util/env.c | 5 ++++- tools/perf/util/env.h | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-)
tools/perf/util/bpf-event.c +5 -1
@@ -120,7 +120,11 @@ static int perf_env__fetch_btf(struct perf_env *env, node->data_size = data_size;memcpy (node->data, data, data_size); -perf_env__insert_btf (env, node); +if (!perf_env__insert_btf (env, node)) { +/* Insertion failed because of a duplicate. */ +free (node); +return -1 ; + }return 0 ; }
tools/perf/util/env.c +4 -1
@@ -74,12 +74,13 @@ out:return node; } -void perf_env__insert_btf (struct perf_env *env,struct btf_node *btf_node) +bool perf_env__insert_btf (struct perf_env *env,struct btf_node *btf_node) {struct rb_node *parent =NULL ;__u32 btf_id = btf_node->id;struct btf_node *node;struct rb_node **p; +bool ret = true;down_write (&env->bpf_progs.lock); p = &env->bpf_progs.btfs.rb_node;
@@ -93,6 +94,7 @@ void perf_env__insert_btf(struct perf_env *env, struct btf_node *btf_node) p = &(*p)->rb_right; }else {pr_debug ("duplicated btf %u\n" , btf_id); + ret = false; goto out; } }
@@ -102,6 +104,7 @@ void perf_env__insert_btf(struct perf_env *env, struct btf_node *btf_node) env->bpf_progs.btfs_cnt++; out:up_write (&env->bpf_progs.lock); +return ret; }struct btf_node *perf_env__find_btf (struct perf_env *env,__u32 btf_id)
tools/perf/util/env.h +1 -1
@@ -167,7 +167,7 @@ void perf_env__insert_bpf_prog_info(struct perf_env *env, struct bpf_prog_info_node *info_node);struct bpf_prog_info_node *perf_env__find_bpf_prog_info (struct perf_env *env,__u32 prog_id); -void perf_env__insert_btf (struct perf_env *env,struct btf_node *btf_node); +bool perf_env__insert_btf (struct perf_env *env,struct btf_node *btf_node);struct btf_node *perf_env__find_btf (struct perf_env *env,__u32 btf_id);int perf_env__numa_node (struct perf_env *env,int cpu);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 99/279 blkcg: Remove extra blkcg_bio_issue_init
In reply to Greg Kroah-HartmanFrom: Laibin Qiu <[email protected]>
[ Upstream commit b781d8db580c058ecd54ed7d5dde7f8270b25f5b ]
KASAN reports a use-after-free report when doing block test:
==================================================================
[10050.967049] BUG: KASAN: use-after-free in
submit_bio_checks+0x1539/0x1550
[10050.977638] Call Trace: [10050.978190] dump_stack+0x9b/0xce [10050.979674] print_address_description.constprop.6+0x3e/0x60 [10050.983510] kasan_report.cold.9+0x22/0x3a [10050.986089] submit_bio_checks+0x1539/0x1550 [10050.989576] submit_bio_noacct+0x83/0xc80 [10050.993714] submit_bio+0xa7/0x330 [10050.994435] mpage_readahead+0x380/0x500 [10050.998009] read_pages+0x1c1/0xbf0 [10051.002057] page_cache_ra_unbounded+0x4c2/0x6f0 [10051.007413] do_page_cache_ra+0xda/0x110 [10051.008207] force_page_cache_ra+0x23d/0x3d0 [10051.009087] page_cache_sync_ra+0xca/0x300 [10051.009970] generic_file_buffered_read+0xbea/0x2130 [10051.012685] generic_file_read_iter+0x315/0x490 [10051.014472] blkdev_read_iter+0x113/0x1b0 [10051.015300] aio_read+0x2ad/0x450 [10051.023786] io_submit_one+0xc8e/0x1d60 [10051.029855] __se_sys_io_submit+0x125/0x350 [10051.033442] do_syscall_64+0x2d/0x40 [10051.034156] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[10051.048733] Allocated by task 18598: [10051.049482] kasan_save_stack+0x19/0x40 [10051.050263] __kasan_kmalloc.constprop.1+0xc1/0xd0 [10051.051230] kmem_cache_alloc+0x146/0x440 [10051.052060] mempool_alloc+0x125/0x2f0 [10051.052818] bio_alloc_bioset+0x353/0x590 [10051.053658] mpage_alloc+0x3b/0x240 [10051.054382] do_mpage_readpage+0xddf/0x1ef0 [10051.055250] mpage_readahead+0x264/0x500 [10051.056060] read_pages+0x1c1/0xbf0 [10051.056758] page_cache_ra_unbounded+0x4c2/0x6f0 [10051.057702] do_page_cache_ra+0xda/0x110 [10051.058511] force_page_cache_ra+0x23d/0x3d0 [10051.059373] page_cache_sync_ra+0xca/0x300 [10051.060198] generic_file_buffered_read+0xbea/0x2130 [10051.061195] generic_file_read_iter+0x315/0x490 [10051.062189] blkdev_read_iter+0x113/0x1b0 [10051.063015] aio_read+0x2ad/0x450 [10051.063686] io_submit_one+0xc8e/0x1d60 [10051.064467] __se_sys_io_submit+0x125/0x350 [10051.065318] do_syscall_64+0x2d/0x40 [10051.066082] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[10051.067455] Freed by task 13307: [10051.068136] kasan_save_stack+0x19/0x40 [10051.068931] kasan_set_track+0x1c/0x30 [10051.069726] kasan_set_free_info+0x1b/0x30 [10051.070621] __kasan_slab_free+0x111/0x160 [10051.071480] kmem_cache_free+0x94/0x460 [10051.072256] mempool_free+0xd6/0x320 [10051.072985] bio_free+0xe0/0x130 [10051.073630] bio_put+0xab/0xe0 [10051.074252] bio_endio+0x3a6/0x5d0 [10051.074984] blk_update_request+0x590/0x1370 [10051.075870] scsi_end_request+0x7d/0x400 [10051.076667] scsi_io_completion+0x1aa/0xe50 [10051.077503] scsi_softirq_done+0x11b/0x240 [10051.078344] blk_mq_complete_request+0xd4/0x120 [10051.079275] scsi_mq_done+0xf0/0x200 [10051.080036] virtscsi_vq_done+0xbc/0x150 [10051.080850] vring_interrupt+0x179/0x390 [10051.081650] __handle_irq_event_percpu+0xf7/0x490 [10051.082626] handle_irq_event_percpu+0x7b/0x160 [10051.083527] handle_irq_event+0xcc/0x170 [10051.084297] handle_edge_irq+0x215/0xb20 [10051.085122] asm_call_irq_on_stack+0xf/0x20 [10051.085986] common_interrupt+0xae/0x120 [10051.086830] asm_common_interrupt+0x1e/0x40
==================================================================
Bio will be checked at beginning of submit_bio_noacct(). If bio needs to be throttled, it will start the timer and stop submit bio directly. Bio will submit in blk_throtl_dispatch_work_fn() when the timer expires. But in the current process, if bio is throttled, it will still set bio issue->value by blkcg_bio_issue_init(). This is redundant and may cause the above use-after-free.
CPU0 CPU1submit_biosubmit_bio_noacct
submit_bio_checks
blk_throtl_bio()
<=mod_timer(&sq->pending_timer
blk_throtl_dispatch_work_fn
submit_bio_noacct() <= bio have throttle tag, will throw directly and bio issue->value will be set here
bio_endio() bio_put() bio_free() <= free this bio
blkcg_bio_issue_init(bio)
<= bio has been freed and
will lead to UAF
return BLK_QC_T_NONE
Fix this by remove extra blkcg_bio_issue_init.
--- block/blk-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
block/blk-core.c +1 -3
@@ -887,10 +887,8 @@ static noinline_for_stack bool submit_bio_checks(struct bio *bio)if (unlikely (!current->io_context))create_task_io_context (current,GFP_ATOMIC , q->node); -if (blk_throtl_bio (bio)) { -blkcg_bio_issue_init (bio); +if (blk_throtl_bio (bio))return false; - }blk_cgroup_bio_start (bio);blkcg_bio_issue_init (bio);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 100/279 tracing/histogram: Do not copy the fixed-size char array field over the field size
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
[ Upstream commit 63f84ae6b82bb4dff672f76f30c6fd7b9d3766bc ]
Do not copy the fixed-size char array field of the events over the field size. The histogram treats char array as a string and there are 2 types of char array in the event, fixed-size and dynamic string. The dynamic string (__data_loc) field must be null terminated, but the fixed-size char array field may not be null terminated (not a string, but just a data). In that case, histogram can copy the data after the field. This uses the original field size for fixed-size char array field to restrict the histogram not to access over the original field size.
--- kernel/trace/trace_events_hist.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
kernel/trace/trace_events_hist.c +5 -4
@@ -1733,9 +1733,10 @@ static struct hist_field *create_hist_field(struct hist_trigger_data *hist_data,if (!hist_field->type) goto free; -if (field->filter_type ==FILTER_STATIC_STRING ) +if (field->filter_type ==FILTER_STATIC_STRING ) { hist_field->fn = hist_field_string; -else if (field->filter_type ==FILTER_DYN_STRING ) + hist_field->size = field->size; + }else if (field->filter_type ==FILTER_DYN_STRING ) hist_field->fn = hist_field_dynstring;else hist_field->fn = hist_field_pstring;
@@ -2691,7 +2692,7 @@ static inline void __update_field_vars(struct tracing_map_elt *elt,char *str = elt_data->field_var_str[j++];char *val_str = (char *)(uintptr_t )var_val; -strscpy (str, val_str,STR_VAR_LEN_MAX ); +strscpy (str, val_str, val->size); var_val = (u64 )(uintptr_t )str; }tracing_map_set_var (elt, var_idx, var_val);
@@ -4586,7 +4587,7 @@ static void hist_trigger_elt_update(struct hist_trigger_data *hist_data, str = elt_data->field_var_str[idx]; val_str = (char *)(uintptr_t )hist_val; -strscpy (str, val_str,STR_VAR_LEN_MAX ); +strscpy (str, val_str, hist_field->size); hist_val = (u64 )(uintptr_t )str; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 98/279 perf/x86/vlbr: Add c->flags to vlbr event constraints
In reply to Greg Kroah-HartmanFrom: Like Xu <[email protected]>
[ Upstream commit 5863702561e625903ec678551cb056a4b19e0b8a ]
Just like what we do in the x86_get_event_constraints(), the PERF_X86_EVENT_LBR_SELECT flag should also be propagated to event->hw.flags so that the host lbr driver can save/restore MSR_LBR_SELECT for the special vlbr event created by KVM or BPF.
--- arch/x86/events/intel/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/events/intel/core.c +3 -1
@@ -2999,8 +2999,10 @@ intel_vlbr_constraints(struct perf_event *event) {struct event_constraint *c = &vlbr_constraint; -if (unlikely (constraint_match (c, event->hw.config))) +if (unlikely (constraint_match (c, event->hw.config))) { + event->hw.flags |= c->flags;return c; + }return NULL ; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 102/279 perf bench futex: Fix memory leak of perf_cpu_map__new()
In reply to Greg Kroah-HartmanFrom: Sohaib Mohamed <[email protected]>
[ Upstream commit 88e48238d53682281c9de2a0b65d24d3b64542a0 ]
ASan reports memory leaks while running:
$ sudo ./perf bench futex all
The leaks are caused by perf_cpu_map__new not being freed. This patch adds the missing perf_cpu_map__put since it calls cpu_map_delete implicitly.
--- tools/perf/bench/futex-lock-pi.c | 1 + tools/perf/bench/futex-requeue.c | 1 + tools/perf/bench/futex-wake-parallel.c | 1 + tools/perf/bench/futex-wake.c | 1 + 4 files changed, 4 insertions(+)
tools/perf/bench/futex-lock-pi.c +1 -0
@@ -233,6 +233,7 @@ int bench_futex_lock_pi(int argc, const char **argv)print_summary ();free (worker); +perf_cpu_map__put (cpu);return ret; err:usage_with_options (bench_futex_lock_pi_usage, options);
tools/perf/bench/futex-requeue.c +1 -0
@@ -294,6 +294,7 @@ int bench_futex_requeue(int argc, const char **argv)print_summary ();free (worker); +perf_cpu_map__put (cpu);return ret; err:usage_with_options (bench_futex_requeue_usage, options);
tools/perf/bench/futex-wake-parallel.c +1 -0
@@ -329,6 +329,7 @@ int bench_futex_wake_parallel(int argc, const char **argv)print_summary ();free (blocked_worker); +perf_cpu_map__put (cpu); return ret; }#endif /* HAVE_PTHREAD_BARRIER */
tools/perf/bench/futex-wake.c +1 -0
@@ -222,5 +222,6 @@ int bench_futex_wake(int argc, const char **argv)print_summary ();free (worker); +perf_cpu_map__put (cpu);return ret; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 103/279 perf tests: Remove bash construct from record+zstd_comp_decomp.sh
In reply to Greg Kroah-HartmanFrom: James Clark <[email protected]>
[ Upstream commit a9cdc1c5e3700a5200e5ca1f90b6958b6483845b ]
Commit 463538a383a2 ("perf tests: Fix test 68 zstd compression for s390") inadvertently removed the -g flag from all platforms rather than just s390, because the [[ ]] construct fails in sh. Changing to single brackets restores testing of call graphs and removes the following error from the output:
$ ./perf test -v 85 85: Zstd perf.data compression/decompression : --- start --- test child forked, pid 50643 Collecting compressed record file: ./tests/shell/record+zstd_comp_decomp.sh: 15: [[: not found
--- tools/perf/tests/shell/record+zstd_comp_decomp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/record+zstd_comp_decomp.sh +1 -1
@@ -12,7 +12,7 @@ skip_if_no_z_record() { collect_z_record() { echo "Collecting compressed record file:" - [[ "$(uname -m)" != s390x ]] && gflag='-g' + [ "$(uname -m)" != s390x ] && gflag='-g' $perf_tool record -o $trace_file $gflag -z -F 5000 -- \ dd count=500 if=/dev/urandom of=/dev/null }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 86/279 sh: math-emu: drop unused functions
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit e25c252a9b033523c626f039d4b9a304f12f6775 ]
Delete ieee_fpe_handler() since it is not used. After that is done, delete denormal_to_double() since it is not used:
.../arch/sh/math-emu/math.c:505:12: error: 'ieee_fpe_handler' defined but not used [-Werror=unused-function]
505 | static int ieee_fpe_handler(struct pt_regs *regs)
.../arch/sh/math-emu/math.c:477:13: error: 'denormal_to_double' defined but not used [-Werror=unused-function]
477 | static void denormal_to_double(struct sh_fpu_soft_struct *fpu, int n)
--- arch/sh/math-emu/math.c | 103 ---------------------------------------- 1 file changed, 103 deletions(-)
arch/sh/math-emu/math.c +0 -103
@@ -467,109 +467,6 @@ static int fpu_emulate(u16 code, struct sh_fpu_soft_struct *fregs, struct pt_regreturn id_sys (fregs, regs, code); } -/** -* denormal_to_double - Given denormalized float number, -* store double float -* -* @fpu: Pointer to sh_fpu_soft structure -* @n: Index to FP register -*/ -static void denormal_to_double (struct sh_fpu_soft_struct *fpu,int n) -{ -unsigned long du, dl; -unsigned long x = fpu->fpul; -int exp =1023 -126 ; - -if (x !=0 && (x &0x7f800000 ) ==0 ) { - du = (x &0x80000000 ); -while ((x &0x00800000 ) ==0 ) { - x <<=1 ; - exp--; - } - x &=0x007fffff ; - du |= (exp <<20 ) | (x >>3 ); - dl = x <<29 ; - - fpu->fp_regs[n] = du; - fpu->fp_regs[n+1 ] = dl; - } -} - -/** -* ieee_fpe_handler - Handle denormalized number exception -* -* @regs: Pointer to register structure -* -* Returns 1 when it's handled (should not cause exception). -*/ -static int ieee_fpe_handler (struct pt_regs *regs) -{ -unsigned short insn = *(unsigned short *)regs->pc; -unsigned short finsn; -unsigned long nextpc; -int nib[4 ] = { - (insn >>12 ) &0xf , - (insn >>8 ) &0xf , - (insn >>4 ) &0xf , - insn &0xf }; - -if (nib[0 ] ==0xb || - (nib[0 ] ==0x4 && nib[2 ] ==0x0 && nib[3 ] ==0xb ))/* bsr & jsr */ - regs->pr = regs->pc +4 ; - -if (nib[0 ] ==0xa || nib[0 ] ==0xb ) {/* bra & bsr */ - nextpc = regs->pc +4 + ((short ) ((insn &0xfff ) <<4 ) >>3 ); - finsn = *(unsigned short *) (regs->pc +2 ); - }else if (nib[0 ] ==0x8 && nib[1 ] ==0xd ) {/* bt/s */ -if (regs->sr &1 ) - nextpc = regs->pc +4 + ((char ) (insn &0xff ) <<1 ); -else - nextpc = regs->pc +4 ; - finsn = *(unsigned short *) (regs->pc +2 ); - }else if (nib[0 ] ==0x8 && nib[1 ] ==0xf ) {/* bf/s */ -if (regs->sr &1 ) - nextpc = regs->pc +4 ; -else - nextpc = regs->pc +4 + ((char ) (insn &0xff ) <<1 ); - finsn = *(unsigned short *) (regs->pc +2 ); - }else if (nib[0 ] ==0x4 && nib[3 ] ==0xb && - (nib[2 ] ==0x0 || nib[2 ] ==0x2 )) {/* jmp & jsr */ - nextpc = regs->regs[nib[1 ]]; - finsn = *(unsigned short *) (regs->pc +2 ); - }else if (nib[0 ] ==0x0 && nib[3 ] ==0x3 && - (nib[2 ] ==0x0 || nib[2 ] ==0x2 )) {/* braf & bsrf */ - nextpc = regs->pc +4 + regs->regs[nib[1 ]]; - finsn = *(unsigned short *) (regs->pc +2 ); - }else if (insn ==0x000b ) {/* rts */ - nextpc = regs->pr; - finsn = *(unsigned short *) (regs->pc +2 ); - }else { - nextpc = regs->pc +2 ; - finsn = insn; - } - -if ((finsn &0xf1ff ) ==0xf0ad ) {/* fcnvsd */ -struct task_struct *tsk = current; - -if ((tsk->thread.xstate->softfpu.fpscr & (1 <<17 ))) { -/* FPU error */ -denormal_to_double (&tsk->thread.xstate->softfpu, - (finsn >>8 ) &0xf ); - tsk->thread.xstate->softfpu.fpscr &= - ~(FPSCR_CAUSE_MASK |FPSCR_FLAG_MASK ); -task_thread_info (tsk)->status |=TS_USEDFPU ; - }else { -force_sig_fault (SIGFPE ,FPE_FLTINV , - (void __user *)regs->pc); - } - - regs->pc = nextpc; -return 1 ; - } - -return 0 ; -} -/** * fpu_init - Initialize FPU registers * @fpu: Pointer to software emulated FPU registers.
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 108/279 selftests: net: switch to socat in the GSO GRE test
In reply to Greg Kroah-HartmanFrom: Jakub Kicinski <[email protected]>
[ Upstream commit 0cda7d4bac5fd29dceb13df26083333fa99d6bb4 ]
Commit a985442fdecb ("selftests: net: properly support IPv6 in GSO GRE test") is not compatible with:
Ncat: Version 7.80 ( https://nmap.org/ncat )
(which is distributed with Fedora/Red Hat), tests fail with:
nc: invalid option -- 'N'
Let's switch to socat which is far more dependable.
--- tools/testing/selftests/net/gre_gso.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
tools/testing/selftests/net/gre_gso.sh +9 -7
@@ -118,16 +118,18 @@ gre_gst_test_checks() local addr=$2 local proto=$3 - $NS_EXEC nc $proto -kl $port >/dev/null & + [ "$proto" == 6 ] && addr="[$addr]" + + $NS_EXEC socat - tcp${proto}-listen:$port,reuseaddr,fork >/dev/null & PID=$! while ! $NS_EXEC ss -ltn | grep -q $port; do ((i++)); sleep 0.01; done - cat $TMPFILE | timeout 1 nc $proto -N $addr $port + cat $TMPFILE | timeout 1 socat -u STDIN TCP:$addr:$port log_test $? 0 "$name - copy file w/ TSO" ethtool -K veth0 tso off - cat $TMPFILE | timeout 1 nc $proto -N $addr $port + cat $TMPFILE | timeout 1 socat -u STDIN TCP:$addr:$port log_test $? 0 "$name - copy file w/ GSO" ethtool -K veth0 tso on
@@ -155,8 +157,8 @@ gre6_gso_test() sleep 2 - gre_gst_test_checks GREv6/v4 172.16.2.2 - gre_gst_test_checks GREv6/v6 2001:db8:1::2 -6 + gre_gst_test_checks GREv6/v4 172.16.2.2 4 + gre_gst_test_checks GREv6/v6 2001:db8:1::2 6 cleanup }
@@ -212,8 +214,8 @@ if [ ! -x "$(command -v ip)" ]; then exit $ksft_skip fi -if [ ! -x "$(command -v nc)" ]; then - echo "SKIP: Could not run test without nc tool" +if [ ! -x "$(command -v socat)" ]; then + echo "SKIP: Could not run test without socat tool" exit $ksft_skip fi
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 111/279 tracing: Add length protection to histogram string copies
In reply to Greg Kroah-HartmanFrom: Steven Rostedt (VMware) <[email protected]>
[ Upstream commit 938aa33f14657c9ed9deea348b7d6f14b6d69cb7 ]
The string copies to the histogram storage has a max size of 256 bytes (defined by MAX_FILTER_STR_VAL). Only the string size of the event field needs to be copied to the event storage, but no more than what is in the event storage. Although nothing should be bigger than 256 bytes, there's no protection against overwriting of the storage if one day there is.
Copy no more than the destination size, and enforce it.
Also had to turn MAX_FILTER_STR_VAL into an unsigned int, to keep the min() comparison of the string sizes of comparable types.
--- include/linux/trace_events.h | 2 +- kernel/trace/trace_events_hist.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-)
include/linux/trace_events.h +1 -1
@@ -673,7 +673,7 @@ struct trace_event_file {#define PERF_MAX_TRACE_SIZE 2048 -#define MAX_FILTER_STR_VAL 256/* Should handle KSYM_SYMBOL_LEN */ +#define MAX_FILTER_STR_VAL 256U/* Should handle KSYM_SYMBOL_LEN */ enum event_trigger_type {ETT_NONE = (0 ),
kernel/trace/trace_events_hist.c +7 -2
@@ -2691,8 +2691,10 @@ static inline void __update_field_vars(struct tracing_map_elt *elt,if (val->flags &HIST_FIELD_FL_STRING ) {char *str = elt_data->field_var_str[j++];char *val_str = (char *)(uintptr_t )var_val; +unsigned int size; -strscpy (str, val_str, val->size); + size =min (val->size,STR_VAR_LEN_MAX ); +strscpy (str, val_str, size); var_val = (u64 )(uintptr_t )str; }tracing_map_set_var (elt, var_idx, var_val);
@@ -4579,6 +4581,7 @@ static void hist_trigger_elt_update(struct hist_trigger_data *hist_data,if (hist_field->flags &HIST_FIELD_FL_STRING ) {unsigned int str_start, var_str_idx, idx;char *str, *val_str; +unsigned int size; str_start = hist_data->n_field_var_str + hist_data->n_save_var_str;
@@ -4587,7 +4590,9 @@ static void hist_trigger_elt_update(struct hist_trigger_data *hist_data, str = elt_data->field_var_str[idx]; val_str = (char *)(uintptr_t )hist_val; -strscpy (str, val_str, hist_field->size); + + size =min (hist_field->size,STR_VAR_LEN_MAX ); +strscpy (str, val_str, size); hist_val = (u64 )(uintptr_t )str; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 87/279 sh: define __BIG_ENDIAN for math-emu
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit b929926f01f2d14635345d22eafcf60feed1085e ]
Fix this by defining both ENDIAN macros in <asm/sfp-machine.h> so that they can be utilized in <math-emu/soft-fp.h> according to the latter's comment:
/* Allow sfp-machine to have its own byte order definitions. */
(This is what is done in arch/nds32/include/asm/sfp-machine.h.)
This placates these build warnings:
In file included from ../arch/sh/math-emu/math.c:23:.../include/math-emu/single.h:50:21: warning: "__BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef]
50 | #if __BYTE_ORDER == __BIG_ENDIAN
In file included from ../arch/sh/math-emu/math.c:24:.../include/math-emu/double.h:59:21: warning: "__BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef]
59 | #if __BYTE_ORDER == __BIG_ENDIAN
--- arch/sh/include/asm/sfp-machine.h | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/sh/include/asm/sfp-machine.h +8 -0
@@ -13,6 +13,14 @@#ifndef _SFP_MACHINE_H#define _SFP_MACHINE_H +#ifdef __BIG_ENDIAN__ +#define __BYTE_ORDER __BIG_ENDIAN +#define __LITTLE_ENDIAN 0 +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#define __BIG_ENDIAN 0 +#endif +#define _FP_W_TYPE_SIZE 32#define _FP_W_TYPE unsigned long#define _FP_WS_TYPE signed long
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 114/279 net: ipa: HOLB register sometimes must be written twice
In reply to Greg Kroah-HartmanFrom: Alex Elder <[email protected]>
[ Upstream commit 6e228d8cbb1cc6ba78022d406340e901e08d26e0 ]
Starting with IPA v4.5, the HOL_BLOCK_EN register must be written twice when enabling head-of-line blocking avoidance.
--- drivers/net/ipa/ipa_endpoint.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ipa/ipa_endpoint.c +3 -0
@@ -868,6 +868,9 @@ ipa_endpoint_init_hol_block_enable(struct ipa_endpoint *endpoint, bool enable) val = enable ?HOL_BLOCK_EN_FMASK :0 ; offset =IPA_REG_ENDP_INIT_HOL_BLOCK_EN_N_OFFSET (endpoint_id);iowrite32 (val, endpoint->ipa->reg_virt + offset); +/* When enabling, the register must be written twice for IPA v4.5+ */ +if (enable && endpoint->ipa->version >=IPA_VERSION_4_5 ) +iowrite32 (val, endpoint->ipa->reg_virt + offset); }void ipa_endpoint_modem_hol_block_clear_all (struct ipa *ipa)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 113/279 mac80211: fix monitor_sdata RCU/locking assertions
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 6dd2360334f3cb3b45fc1b8194c670090474b87c ]
Since commit a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") we've not only been protecting the pointer to monitor_sdata with the RTNL, but also with the wiphy->mtx. This is relevant in a number of lockdep assertions, e.g. the one we hit in ieee80211_set_monitor_channel(). However, we're now protecting all the assignments/dereferences, even the one in interface iter, with the wiphy->mtx, so switch over the lockdep assertions to that lock.
--- net/mac80211/cfg.c | 12 ++++++++---- net/mac80211/iface.c | 4 +++- net/mac80211/util.c | 7 ++++--- 3 files changed, 15 insertions(+), 8 deletions(-)
net/mac80211/cfg.c +8 -4
@@ -80,7 +80,8 @@ static int ieee80211_set_mon_options(struct ieee80211_sub_if_data *sdata, }/* also validate MU-MIMO change */ - monitor_sdata =rtnl_dereference (local->monitor_sdata); + monitor_sdata =wiphy_dereference (local->hw.wiphy, + local->monitor_sdata);if (!monitor_sdata && (params->vht_mumimo_groups || params->vht_mumimo_follow_addr))
@@ -810,7 +811,8 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy,mutex_lock (&local->mtx);if (local->use_chanctx) { - sdata =rtnl_dereference (local->monitor_sdata); + sdata =wiphy_dereference (local->hw.wiphy, + local->monitor_sdata);if (sdata) {ieee80211_vif_release_channel (sdata); ret = ieee80211_vif_use_channel(sdata, chandef,
@@ -2669,7 +2671,8 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy, sdata =IEEE80211_WDEV_TO_SUB_IF (wdev);if (sdata->vif.type ==NL80211_IFTYPE_MONITOR ) { - sdata =rtnl_dereference (local->monitor_sdata); + sdata =wiphy_dereference (local->hw.wiphy, + local->monitor_sdata);if (!sdata)return -EOPNOTSUPP ; }
@@ -2729,7 +2732,8 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,mutex_unlock (&local->iflist_mtx);if (has_monitor) { - sdata =rtnl_dereference (local->monitor_sdata); + sdata =wiphy_dereference (local->hw.wiphy, + local->monitor_sdata);if (sdata) { sdata->user_power_level = local->user_power_level;if (txp_type != sdata->vif.bss_conf.txpower_type)
net/mac80211/iface.c +3 -1
@@ -588,7 +588,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do*/ if (local->suspended) {WARN_ON (local->wowlan); -WARN_ON (rtnl_dereference (local->monitor_sdata)); +WARN_ON (rcu_access_pointer (local->monitor_sdata));return ; }
@@ -932,6 +932,7 @@ int ieee80211_add_virtual_monitor(struct ieee80211_local *local)return 0 ;ASSERT_RTNL (); +lockdep_assert_wiphy (local->hw.wiphy);if (local->monitor_sdata)return 0 ;
@@ -999,6 +1000,7 @@ void ieee80211_del_virtual_monitor(struct ieee80211_local *local)return ;ASSERT_RTNL (); +lockdep_assert_wiphy (local->hw.wiphy);mutex_lock (&local->iflist_mtx);
net/mac80211/util.c +4 -3
@@ -796,7 +796,7 @@ static void __iterate_interfaces(struct ieee80211_local *local, sdata =rcu_dereference_check (local->monitor_sdata,lockdep_is_held (&local->iflist_mtx) || -lockdep_rtnl_is_held ()); +lockdep_is_held (&local->hw.wiphy->mtx));if (sdata && (iter_flags &IEEE80211_IFACE_ITER_RESUME_ALL || !active_only || sdata->flags &IEEE80211_SDATA_IN_DRIVER ))
@@ -2379,7 +2379,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) IEEE80211_TPT_LEDTRIG_FL_RADIO, 0);/* add interfaces */ - sdata =rtnl_dereference (local->monitor_sdata); + sdata =wiphy_dereference (local->hw.wiphy, local->monitor_sdata);if (sdata) {/* in HW restart it exists already */ WARN_ON (local->resuming);
@@ -2424,7 +2424,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)WARN_ON (drv_add_chanctx (local, ctx));mutex_unlock (&local->chanctx_mtx); - sdata =rtnl_dereference (local->monitor_sdata); + sdata =wiphy_dereference (local->hw.wiphy, + local->monitor_sdata);if (sdata &&ieee80211_sdata_running (sdata))ieee80211_assign_chanctx (local, sdata); }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 115/279 net: ipa: disable HOLB drop when updating timer
In reply to Greg Kroah-HartmanFrom: Alex Elder <[email protected]>
[ Upstream commit 816316cacad2b5abd5b41423cf04e4845239abd4 ]
The head-of-line blocking timer should only be modified when head-of-line drop is disabled.
One of the steps in recovering from a modem crash is to enable dropping of packets with timeout of 0 (immediate). We don't know how the modem configured its endpoints, so before we program the timer, we need to ensure HOL_BLOCK is disabled.
--- drivers/net/ipa/ipa_endpoint.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ipa/ipa_endpoint.c +2 -0
@@ -853,6 +853,7 @@ static void ipa_endpoint_init_hol_block_timer(struct ipa_endpoint *endpoint,u32 offset;u32 val; +/* This should only be changed when HOL_BLOCK_EN is disabled */ offset =IPA_REG_ENDP_INIT_HOL_BLOCK_TIMER_N_OFFSET (endpoint_id); val =hol_block_timer_val (ipa, microseconds);iowrite32 (val, ipa->reg_virt + offset);
@@ -883,6 +884,7 @@ void ipa_endpoint_modem_hol_block_clear_all(struct ipa *ipa)if (endpoint->toward_ipa || endpoint->ee_id !=GSI_EE_MODEM )continue ; +ipa_endpoint_init_hol_block_enable (endpoint, false);ipa_endpoint_init_hol_block_timer (endpoint,0 );ipa_endpoint_init_hol_block_enable (endpoint, true); }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 116/279 selftests: gpio: fix gpio compiling error
In reply to Greg Kroah-HartmanFrom: Li Zhijian <[email protected]>
[ Upstream commit 92a59d7f381d2caf69385bfa00590028e32eea26 ]
The gpio selftests build against the system includes rather than the headers from the linux tree. This results in the compile failing if the system includes are outdated.
Prefer the headers from the linux tree, as per other selftests.
--- tools/testing/selftests/gpio/Makefile | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/gpio/Makefile +1 -0
@@ -3,5 +3,6 @@ TEST_PROGS := gpio-mockup.sh TEST_FILES := gpio-mockup-sysfs.sh TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev +CFLAGS += -I../../../../usr/include include ../lib.mk
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 117/279 net: bnx2x: fix variable dereferenced before check
In reply to Greg Kroah-HartmanFrom: Pavel Skripkin <[email protected]>
[ Upstream commit f8885ac89ce310570e5391fe0bf0ec9c7c9b4fdc ]
Smatch says:
bnx2x_init_ops.h:640 bnx2x_ilt_client_mem_op() warn: variable dereferenced before check 'ilt' (see line 638)
Move ilt_cli variable initialization _after_ ilt validation, because it's unsafe to deref the pointer before validation check.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h +3 -1
@@ -635,11 +635,13 @@ static int bnx2x_ilt_client_mem_op(struct bnx2x *bp, int cli_num, {int i, rc;struct bnx2x_ilt *ilt =BP_ILT (bp); -struct ilt_client_info *ilt_cli = &ilt->clients[cli_num]; +struct ilt_client_info *ilt_cli;if (!ilt || !ilt->lines)return -1 ; + ilt_cli = &ilt->clients[cli_num]; +if (ilt_cli->flags & (ILT_CLIENT_SKIP_INIT |ILT_CLIENT_SKIP_MEM ))return 0 ;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 88/279 f2fs: compress: disallow disabling compress on non-empty compressed file
In reply to Greg Kroah-HartmanFrom: Hyeong-Jun Kim <[email protected]>
[ Upstream commit 02d58cd253d7536c412993573fc6b3b4454960eb ]
Compresse file and normal file has differ in i_addr addressing, specifically addrs per inode/block. So, we will face data loss, if we disable the compression flag on non-empty files. Therefore we should disallow not only enabling but disabling the compression flag on non-empty files.
--- fs/f2fs/f2fs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/f2fs/f2fs.h +1 -2
@@ -4152,8 +4152,7 @@ static inline bool f2fs_disable_compressed_file(struct inode *inode)if (!f2fs_compressed_file (inode))return true; -if (S_ISREG (inode->i_mode) && - (get_dirty_pages (inode) ||atomic_read (&fi->i_compr_blocks))) +if (S_ISREG (inode->i_mode) &&F2FS_HAS_BLOCKS (inode))return false; fi->i_flags &= ~F2FS_COMPR_FL ;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 118/279 bnxt_en: reject indirect blk offload when hw-tc-offload is off
In reply to Greg Kroah-HartmanFrom: Sriharsha Basavapatna <[email protected]>
[ Upstream commit b0757491a118ae5727cf9f1c3a11544397d46596 ]
The driver does not check if hw-tc-offload is enabled for the device before offloading a flow in the context of indirect block callback. Fix this by checking NETIF_F_HW_TC in the features flag and rejecting the offload request. This will avoid unnecessary dmesg error logs when hw-tc-offload is disabled, such as these:
bnxt_en 0000:19:00.1 eno2np1: dev(ifindex=294) not on same switchbnxt_en 0000:19:00.1 eno2np1: Error: bnxt_tc_add_flow: cookie=0xffff8dace1c88000 error=-22 bnxt_en 0000:19:00.0 eno1np0: dev(ifindex=294) not on same switchbnxt_en 0000:19:00.0 eno1np0: Error: bnxt_tc_add_flow: cookie=0xffff8dace1c88000 error=-22
--- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c +1 -1
@@ -1868,7 +1868,7 @@ static int bnxt_tc_setup_indr_block_cb(enum tc_setup_type type,struct flow_cls_offload *flower = type_data;struct bnxt *bp = priv->bp; -if (flower->common.chain_index) +if (!tc_cls_can_offload_and_chain0 (bp->dev, type_data))return -EOPNOTSUPP ;switch (type) {
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 90/279 clk: ingenic: Fix bugs with divided dividers
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
[ Upstream commit ed84ef1cd7eddf933d4ffce2caa8161d6f947245 ]
Two fixes in one:
- In the "impose hardware constraints" block, the "logical" divider value (aka. not translated to the hardware) was clamped to fit in the register area, but this totally ignored the fact that the divider value can itself have a fixed divider.
- The code that made sure that the divider value returned by the function was a multiple of its own fixed divider could result in a wrong value being calculated, because it was rounded down instead of rounded up.
--- drivers/clk/ingenic/cgu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/ingenic/cgu.c +3 -3
@@ -453,15 +453,15 @@ ingenic_clk_calc_div(struct clk_hw *hw, }/* Impose hardware constraints */ - div =min_t (unsigned, div,1 << clk_info->div.bits); - div =max_t (unsigned, div,1 ); + div = clamp_t(unsigned int, div, clk_info->div.div, + clk_info->div.div << clk_info->div.bits);/* * If the divider value itself must be divided before being written to * the divider register, we must ensure we don't have any bits set that * would be lost as a result of doing so. */ - div /= clk_info->div.div; + div =DIV_ROUND_UP (div, clk_info->div.div); div *= clk_info->div.div;return div;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 104/279 drm/nouveau: hdmigv100.c: fix corrupted HDMI Vendor InfoFrame
In reply to Greg Kroah-HartmanFrom: Hans Verkuil <[email protected]>
[ Upstream commit 3cc1ae1fa70ab369e4645e38ce335a19438093ad ]
gv100_hdmi_ctrl() writes vendor_infoframe.subpack0_high to 0x6f0110, and then overwrites it with 0. Just drop the overwrite with 0, that's clearly a mistake.
Because of this issue the HDMI VIC is 0 instead of 1 in the HDMI Vendor InfoFrame when transmitting 4kp30.
--- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigv100.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigv100.c +0 -1
@@ -62,7 +62,6 @@ gv100_hdmi_ctrl(struct nvkm_ior *ior, int head, bool enable, u8 max_ac_packet,nvkm_wr32 (device,0x6f0108 + hdmi, vendor_infoframe.header);nvkm_wr32 (device,0x6f010c + hdmi, vendor_infoframe.subpack0_low);nvkm_wr32 (device,0x6f0110 + hdmi, vendor_infoframe.subpack0_high); -nvkm_wr32 (device,0x6f0110 + hdmi,0x00000000 );nvkm_wr32 (device,0x6f0114 + hdmi,0x00000000 );nvkm_wr32 (device,0x6f0118 + hdmi,0x00000000 );nvkm_wr32 (device,0x6f011c + hdmi,0x00000000 );
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 92/279 clk: qcom: gcc-msm8996: Drop (again) gcc_aggre1_pnoc_ahb_clk
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
[ Upstream commit 05cf3ec00d460b50088d421fb878a0f83f57e262 ]
The gcc_aggre1_pnoc_ahb_clk is crucial for the proper MSM8996/APQ8096 functioning. If it gets disabled, several subsytems will stop working (including eMMC/SDCC and USB). There are no in-kernel users of this clock, so it is much simpler to remove from the kernel.
The clock was first removed in the commit 9e60de1cf270 ("clk: qcom:
Remove gcc_aggre1_pnoc_ahb_clk from msm8996") by Stephen Boyd, but got added back in the commit b567752144e3 ("clk: qcom: Add some missing gcc clks for msm8996") by Rajendra Nayak.
Let's remove it again in hope that nobody adds it back.
--- drivers/clk/qcom/gcc-msm8996.c | 15 --------------- 1 file changed, 15 deletions(-)
drivers/clk/qcom/gcc-msm8996.c +0 -15
@@ -2937,20 +2937,6 @@ static struct clk_branch gcc_smmu_aggre0_ahb_clk = { }, }; -static struct clk_branch gcc_aggre1_pnoc_ahb_clk = { - .halt_reg =0x82014 , - .clkr = { - .enable_reg =0x82014 , - .enable_mask =BIT (0 ), - .hw.init = &(struct clk_init_data ){ - .name ="gcc_aggre1_pnoc_ahb_clk" , - .parent_names = (const char *[]){"periph_noc_clk_src" }, - .num_parents =1 , - .ops = &clk_branch2_ops, - }, - }, -}; -static struct clk_branch gcc_aggre2_ufs_axi_clk = { .halt_reg =0x83014 , .clkr = {
@@ -3474,7 +3460,6 @@ static struct clk_regmap *gcc_msm8996_clocks[] = { [GCC_AGGRE0_CNOC_AHB_CLK] = &gcc_aggre0_cnoc_ahb_clk.clkr, [GCC_SMMU_AGGRE0_AXI_CLK] = &gcc_smmu_aggre0_axi_clk.clkr, [GCC_SMMU_AGGRE0_AHB_CLK] = &gcc_smmu_aggre0_ahb_clk.clkr, - [GCC_AGGRE1_PNOC_AHB_CLK] = &gcc_aggre1_pnoc_ahb_clk.clkr, [GCC_AGGRE2_UFS_AXI_CLK] = &gcc_aggre2_ufs_axi_clk.clkr, [GCC_AGGRE2_USB3_AXI_CLK] = &gcc_aggre2_usb3_axi_clk.clkr, [GCC_QSPI_AHB_CLK] = &gcc_qspi_ahb_clk.clkr,
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 84/279 f2fs: fix wrong condition to trigger background checkpoint correctly
In reply to Greg Kroah-HartmanFrom: Chao Yu <[email protected]>
[ Upstream commit cd6d697a6e2013a0a85f8b261b16c8cfd50c1f5f ]
In f2fs_balance_fs_bg(), it needs to check both NAT_ENTRIES and INO_ENTRIES memory usage to decide whether we should skip background checkpoint, otherwise we may always skip checking INO_ENTRIES memory usage, so that INO_ENTRIES may potentially cause high memory footprint.
--- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
@@ -561,7 +561,7 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi, bool from_bg) goto do_sync;/* checkpoint is the only way to shrink partial cached entries */ -if (f2fs_available_free_memory (sbi,NAT_ENTRIES ) || +if (f2fs_available_free_memory (sbi,NAT_ENTRIES ) &&f2fs_available_free_memory (sbi,INO_ENTRIES ))return ;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 93/279 KVM: arm64: Fix host stage-2 finalization
In reply to Greg Kroah-HartmanFrom: Quentin Perret <[email protected]>
[ Upstream commit 50a8d3315960c74095c59e204db44abd937d4b5d ]
We currently walk the hypervisor stage-1 page-table towards the end of hyp init in nVHE protected mode and adjust the host page ownership attributes in its stage-2 in order to get a consistent state from both point of views. The walk is done on the entire hyp VA space, and expects to only ever find page-level mappings. While this expectation is reasonable in the half of hyp VA space that maps memory with a fixed offset (see the loop in pkvm_create_mappings_locked()), it can be incorrect in the other half where nothing prevents the usage of block mappings. For instance, on systems where memory is physically aligned at an address that happens to maps to a PMD aligned VA in the hyp_vmemmap, kvm_pgtable_hyp_map() will install block mappings when backing the hyp_vmemmap, which will later cause finalize_host_mappings() to fail. Furthermore, it should be noted that all pages backing the hyp_vmemmap are also mapped in the 'fixed offset range' of the hypervisor, which implies that finalize_host_mappings() will walk both aliases and update the host stage-2 attributes twice. The order in which this happens is unpredictable, though, since the hyp VA layout is highly dependent on the position of the idmap page, hence resulting in a fragile mess at best.
In order to fix all of this, let's restrict the finalization walk to only cover memory regions in the 'fixed-offset range' of the hyp VA space and nothing else. This not only fixes a correctness issue, but will also result in a slighlty faster hyp initialization overall.
--- arch/arm64/kvm/hyp/nvhe/setup.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
arch/arm64/kvm/hyp/nvhe/setup.c +12 -2
@@ -177,7 +177,7 @@ static int finalize_host_mappings_walker(u64 addr, u64 end, u32 level, phys =kvm_pte_to_phys (pte);if (!addr_is_memory (phys)) -return 0 ; +return -EINVAL ;/* * Adjust the host stage-2 mappings to match the ownership attributes
@@ -206,8 +206,18 @@ static int finalize_host_mappings(void) .cb = finalize_host_mappings_walker, .flags = KVM_PGTABLE_WALK_LEAF, }; +int i, ret; + +for (i =0 ; i < hyp_memblock_nr; i++) { +struct memblock_region *reg = &hyp_memory[i]; +u64 start = (u64 )hyp_phys_to_virt (reg->base); + + ret =kvm_pgtable_walk (&pkvm_pgtable, start, reg->size, &walker); +if (ret) +return ret; + } -return kvm_pgtable_walk (&pkvm_pgtable,0 ,BIT (pkvm_pgtable.ia_bits), &walker); +return 0 ; }void __noreturn __pkvm_init_finalise (void )
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 130/279 iavf: Fix for the false positive ASQ/ARQ errors while issuing VF reset
In reply to Greg Kroah-HartmanFrom: Surabhi Boob <[email protected]>
[ Upstream commit 321421b57a12e933f92b228e0e6d0b2c6541f41d ]
While issuing VF Reset from the guest OS, the VF driver prints logs about critical / Overflow error detection. This is not an actual error since the VF_MBX_ARQLEN register is set to all FF's for a short period of time and the VF would catch the bits set if it was reading the register during that spike of time. This patch introduces an additional check to ignore this condition since the VF is in reset.
--- drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +1 -1
@@ -2355,7 +2355,7 @@ static void iavf_adminq_task(struct work_struct *work)/* check for error indications */ val =rd32 (hw, hw->aq.arq.len); -if (val ==0xdeadbeef )/* indicates device in reset */ +if (val ==0xdeadbeef || val ==0xffffffff )/* device in reset */ goto freedom; oldval = val;if (val &IAVF_VF_ARQLEN1_ARQVFE_MASK ) {
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 120/279 sock: fix /proc/net/sockstat underflow in sk_clone_lock()
In reply to Greg Kroah-HartmanFrom: Tetsuo Handa <[email protected]>
[ Upstream commit 938cca9e4109b30ee1d476904538225a825e54eb ]
sk_clone_lock() needs to call sock_inuse_add(1) before entering the sk_free_unlock_clone() error path, for __sk_free() from sk_free() from sk_free_unlock_clone() calls sock_inuse_add(-1).
--- net/core/sock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/core/sock.c +3 -3
@@ -2043,8 +2043,10 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) newsk->sk_prot_creator = prot;/* SANITY */ -if (likely (newsk->sk_net_refcnt)) +if (likely (newsk->sk_net_refcnt)) {get_net (sock_net (newsk)); +sock_inuse_add (sock_net (newsk),1 ); + }sk_node_init (&newsk->sk_node);sock_lock_init (newsk);bh_lock_sock (newsk);
@@ -2115,8 +2117,6 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) newsk->sk_err_soft =0 ; newsk->sk_priority =0 ; newsk->sk_incoming_cpu =raw_smp_processor_id (); -if (likely (newsk->sk_net_refcnt)) -sock_inuse_add (sock_net (newsk),1 );/* Before updating sk_refcnt, we must commit prior changes to memory * (Documentation/RCU/rculist_nulls.rst for details)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 129/279 iavf: validate pointers
In reply to Greg Kroah-HartmanFrom: Mitch Williams <[email protected]>
[ Upstream commit 131b0edc4028bb88bb472456b1ddba526cfb7036 ]
In some cases, the ethtool get_rxfh handler may be called with a null key or indir parameter. So check these pointers, or you will have a very bad day.
--- drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_ethtool.c +6 -7
@@ -1859,14 +1859,13 @@ static int iavf_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,if (hfunc) *hfunc =ETH_RSS_HASH_TOP ; -if (!indir) -return 0 ; - -memcpy (key, adapter->rss_key, adapter->rss_key_size); +if (key) +memcpy (key, adapter->rss_key, adapter->rss_key_size); -/* Each 32 bits pointed by 'indir' is stored with a lut entry */ -for (i =0 ; i < adapter->rss_lut_size; i++) - indir[i] = (u32 )adapter->rss_lut[i]; +if (indir) +/* Each 32 bits pointed by 'indir' is stored with a lut entry */ +for (i =0 ; i < adapter->rss_lut_size; i++) + indir[i] = (u32 )adapter->rss_lut[i];return 0 ; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 132/279 iavf: Restore VLAN filters after link down
In reply to Greg Kroah-HartmanFrom: Akeem G Abodunrin <[email protected]>
[ Upstream commit 4293014230b887d94b68aa460ff00153454a3709 ]
Restore VLAN filters after the link is brought down, and up - since all filters are deleted from HW during the netdev link down routine.
--- drivers/net/ethernet/intel/iavf/iavf.h | 1 + drivers/net/ethernet/intel/iavf/iavf_main.c | 35 ++++++++++++++++++--- 2 files changed, 31 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/iavf/iavf.h +1 -0
@@ -39,6 +39,7 @@#include "iavf_txrx.h" #include "iavf_fdir.h" #include "iavf_adv_rss.h" +#include <linux/bitmap.h> #define DEFAULT_DEBUG_LEVEL_SHIFT 3#define PFX "iavf: "
drivers/net/ethernet/intel/iavf/iavf_main.c +30 -5
@@ -687,6 +687,23 @@ static void iavf_del_vlan(struct iavf_adapter *adapter, u16 vlan)spin_unlock_bh (&adapter->mac_vlan_list_lock); } +/** +* iavf_restore_filters +* @adapter: board private structure +* +* Restore existing non MAC filters when VF netdev comes back up +**/ +static void iavf_restore_filters (struct iavf_adapter *adapter) +{ +/* re-add all VLAN filters */ +if (VLAN_ALLOWED (adapter)) { +u16 vid; + +for_each_set_bit (vid, adapter->vsi.active_vlans,VLAN_N_VID ) +iavf_add_vlan (adapter, vid); + } +} +/** * iavf_vlan_rx_add_vid - Add a VLAN filter to a device * @netdev: network device struct
@@ -700,8 +717,11 @@ static int iavf_vlan_rx_add_vid(struct net_device *netdev,if (!VLAN_ALLOWED (adapter))return -EIO ; +if (iavf_add_vlan (adapter, vid) ==NULL )return -ENOMEM ; + +set_bit (vid, adapter->vsi.active_vlans);return 0 ; }
@@ -716,11 +736,13 @@ static int iavf_vlan_rx_kill_vid(struct net_device *netdev, {struct iavf_adapter *adapter =netdev_priv (netdev); -if (VLAN_ALLOWED (adapter)) { -iavf_del_vlan (adapter, vid); -return 0 ; - } -return -EIO ; +if (!VLAN_ALLOWED (adapter)) +return -EIO ; + +iavf_del_vlan (adapter, vid); +clear_bit (vid, adapter->vsi.active_vlans); + +return 0 ; }/**
@@ -3248,6 +3270,9 @@ static int iavf_open(struct net_device *netdev)spin_unlock_bh (&adapter->mac_vlan_list_lock); +/* Restore VLAN filters that were removed with IFF_DOWN */ +iavf_restore_filters (adapter); +iavf_configure (adapter);iavf_up_complete (adapter);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 135/279 mips: bcm63xx: add support for clk_get_parent()
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit e8f67482e5a4bc8d0b65d606d08cb60ee123b468 ]
BCM63XX selects HAVE_LEGACY_CLK but does not provide/support clk_get_parent(), so add a simple implementation of that function so that callers of it will build without errors.
Fixes these build errors:
mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
ingenic-adc.c:(.text+0xe4): undefined reference to `clk_get_parent'
mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
ingenic-adc.c:(.text+0x1b8): undefined reference to `clk_get_parent'
--- arch/mips/bcm63xx/clk.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/mips/bcm63xx/clk.c +6 -0
@@ -381,6 +381,12 @@ void clk_disable(struct clk *clk)EXPORT_SYMBOL (clk_disable); +struct clk *clk_get_parent (struct clk *clk) +{ +return NULL ; +} +EXPORT_SYMBOL (clk_get_parent); +unsigned long clk_get_rate (struct clk *clk) {if (!clk)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 136/279 mips: lantiq: add support for clk_get_parent()
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit fc1aabb088860d6cf9dd03612b7a6f0de91ccac2 ]
Provide a simple implementation of clk_get_parent() in the lantiq subarch so that callers of it will build without errors.
Fixes this build error:
ERROR: modpost: "clk_get_parent" [drivers/iio/adc/ingenic-adc.ko] undefined!
--- arch/mips/lantiq/clk.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/mips/lantiq/clk.c +6 -0
@@ -158,6 +158,12 @@ void clk_deactivate(struct clk *clk) }EXPORT_SYMBOL (clk_deactivate); +struct clk *clk_get_parent (struct clk *clk) +{ +return NULL ; +} +EXPORT_SYMBOL (clk_get_parent); +static inline u32 get_counter_resolution (void ) {u32 res;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 121/279 net/smc: Make sure the link_id is unique
In reply to Greg Kroah-HartmanFrom: Wen Gu <[email protected]>
[ Upstream commit cf4f5530bb55ef7d5a91036b26676643b80b1616 ]
The link_id is supposed to be unique, but smcr_next_link_id() doesn't skip the used link_id as expected. So the patch fixes this.
--- net/smc/smc_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/smc/smc_core.c +2 -1
@@ -665,13 +665,14 @@ static u8 smcr_next_link_id(struct smc_link_group *lgr)int i;while (1 ) { +again: link_id = ++lgr->next_link_id;if (!link_id)/* skip zero as link_id */ link_id = ++lgr->next_link_id;for (i =0 ; i <SMC_LINKS_PER_LGR_MAX ; i++) {if (smc_link_usable (&lgr->lnk[i]) && lgr->lnk[i].link_id == link_id) -continue ; + goto again; }break ; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 140/279 udp: Validate checksum in udp_read_sock()
In reply to Greg Kroah-HartmanFrom: Cong Wang <[email protected]>
[ Upstream commit 099f896f498a2b26d84f4ddae039b2c542c18b48 ]
It turns out the skb's in sock receive queue could have bad checksums, as both ->poll() and ->recvmsg() validate checksums. We have to do the same for ->read_sock() path too before they are redirected in sockmap.
--- net/ipv4/udp.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
net/ipv4/udp.c +11 -0
@@ -1808,6 +1808,17 @@ int udp_read_sock(struct sock *sk, read_descriptor_t *desc, skb =skb_recv_udp (sk,0 ,1 , &err);if (!skb)return err; + +if (udp_lib_checksum_complete (skb)) { +__UDP_INC_STATS (sock_net (sk),UDP_MIB_CSUMERRORS , +IS_UDPLITE (sk)); +__UDP_INC_STATS (sock_net (sk),UDP_MIB_INERRORS , +IS_UDPLITE (sk)); +atomic_inc (&sk->sk_drops); +kfree_skb (skb); +continue ; + } + used =recv_actor (desc, skb,0 , skb->len);if (used <=0 ) {if (!copied)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 139/279 platform/x86: think-lmi: Abort probe on analyze failure
In reply to Greg Kroah-HartmanFrom: Alex Williamson <[email protected]>
[ Upstream commit 812fcc609502096e98cc3918a4b807722dba8fd9 ]
A Lenovo ThinkStation S20 (4157CTO BIOS 60KT41AUS) fails to boot on recent kernels including the think-lmi driver, due to the fact that errors returned by the tlmi_analyze() function are ignored by tlmi_probe(), where tlmi_sysfs_init() is called unconditionally. This results in making use of an array of already freed, non-null pointers and other uninitialized globals, causing all sorts of nasty kobject and memory faults.
Make use of the analyze function return value, free a couple leaked allocations, and remove the settings_count field, which is incremented but never consumed.
--- drivers/platform/x86/think-lmi.c | 13 ++++++++++--- drivers/platform/x86/think-lmi.h | 1 - 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/platform/x86/think-lmi.c +10 -3
@@ -888,8 +888,10 @@ static int tlmi_analyze(void)break ;if (!item)break ; -if (!*item) +if (!*item) { +kfree (item);continue ; + }/* It is not allowed to have '/' for file name. Convert it into '\'. */ strreplace (item,'/' ,'\\' );
@@ -902,6 +904,7 @@ static int tlmi_analyze(void) setting =kzalloc (sizeof (*setting),GFP_KERNEL );if (!setting) { ret = -ENOMEM ; +kfree (item); goto fail_clear_attr; } setting->index = i;
@@ -916,7 +919,6 @@ static int tlmi_analyze(void) }kobject_init (&setting->kobj, &tlmi_attr_setting_ktype); tlmi_priv.setting[i] = setting; - tlmi_priv.settings_count++;kfree (item); }
@@ -983,7 +985,12 @@ static void tlmi_remove(struct wmi_device *wdev)static int tlmi_probe (struct wmi_device *wdev,const void *context) { -tlmi_analyze (); +int ret; + + ret =tlmi_analyze (); +if (ret) +return ret; +return tlmi_sysfs_init (); }
drivers/platform/x86/think-lmi.h +0 -1
@@ -55,7 +55,6 @@ struct tlmi_attr_setting {struct think_lmi {struct wmi_device *wmi_device; -int settings_count;bool can_set_bios_settings;bool can_get_bios_selections;bool can_set_bios_password;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 106/279 samples/bpf: Fix summary per-sec stats in xdp_sample_user
In reply to Greg Kroah-HartmanFrom: Alexander Lobakin <[email protected]>
[ Upstream commit dc14ca4644f48b1cfa93631e35c28bdc011ad109 ]
sample_summary_print() uses accumulated period to calculate and display per-sec averages. This period gets incremented by sampling interval each time a new sample is formed, and thus equals to the number of samples collected multiplied by this interval.
However, the totals are being calculated differently, they receive current sample statistics already divided by the interval gotten as a difference between sample timestamps for better precision -- in other words, they are being incremented by the per-sec values each sample.
This leads to the excessive division of summary per-secs when interval != 1 sec. It is obvious pps couldn't become two times lower just from picking a different sampling interval value:
$ samples/bpf/xdp_redirect_cpu -p xdp_prognum_n1_inverse_qnum -c all
-s -d 6 -i 1
< snip >
Packets received : 2,197,230,321
Average packets/s : 22,887,816
Packets redirected : 2,197,230,472
Average redir/s : 22,887,817
$ samples/bpf/xdp_redirect_cpu -p xdp_prognum_n1_inverse_qnum -c all
-s -d 6 -i 2
< snip >
Packets received : 159,566,498
Average packets/s : 11,397,607
Packets redirected : 159,566,995
Average redir/s : 11,397,642This can be easily fixed by treating the divisor not as a period, but rather as a total number of samples, and thus incrementing it by 1 instead of interval. As a nice side effect, we can now remove so-named argument from a couple of functions. Let us also create an "alias" for sample_output::rx_cnt::pps named 'num' using a union since this field is used to store this number (period previously) as well, and the resulting counter-intuitive code might've been a reason for this bug.
--- samples/bpf/xdp_sample_user.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-)
samples/bpf/xdp_sample_user.c +15 -13
@@ -120,7 +120,10 @@ struct sample_output {__u64 xmit; } totals;struct { -__u64 pps; +union { +__u64 pps; +__u64 num; + };__u64 drop;__u64 err; } rx_cnt;
@@ -1322,7 +1325,7 @@ int sample_install_xdp(struct bpf_program *xdp_prog, int ifindex, bool generic,static void sample_summary_print (void ) { -double period = sample_out.rx_cnt.pps; +double num = sample_out.rx_cnt.num;if (sample_out.totals.rx) {double pkts = sample_out.totals.rx;
@@ -1330,7 +1333,7 @@ static void sample_summary_print(void)print_always (" Packets received : %'-10llu\n" , sample_out.totals.rx);print_always (" Average packets/s : %'-10.0f\n" , -sample_round (pkts / period)); +sample_round (pkts / num)); }if (sample_out.totals.redir) {double pkts = sample_out.totals.redir;
@@ -1338,7 +1341,7 @@ static void sample_summary_print(void)print_always (" Packets redirected : %'-10llu\n" , sample_out.totals.redir);print_always (" Average redir/s : %'-10.0f\n" , -sample_round (pkts / period)); +sample_round (pkts / num)); }if (sample_out.totals.drop) print_always(" Rx dropped : %'-10llu\n",
@@ -1355,7 +1358,7 @@ static void sample_summary_print(void)print_always (" Packets transmitted : %'-10llu\n" , sample_out.totals.xmit);print_always (" Average transmit/s : %'-10.0f\n" , -sample_round (pkts / period)); +sample_round (pkts / num)); } }
@@ -1422,7 +1425,7 @@ static int sample_stats_collect(struct stats_record *rec)return 0 ; } -static void sample_summary_update (struct sample_output *out,int interval) +static void sample_summary_update (struct sample_output *out) { sample_out.totals.rx += out->totals.rx; sample_out.totals.redir += out->totals.redir;
@@ -1430,12 +1433,11 @@ static void sample_summary_update(struct sample_output *out, int interval) sample_out.totals.drop_xmit += out->totals.drop_xmit; sample_out.totals.err += out->totals.err; sample_out.totals.xmit += out->totals.xmit; - sample_out.rx_cnt.pps += interval; + sample_out.rx_cnt.num++; }static void sample_stats_print (int mask,struct stats_record *cur, -struct stats_record *prev,char *prog_name, -int interval) +struct stats_record *prev,char *prog_name) {struct sample_output out = {};
@@ -1452,7 +1454,7 @@ static void sample_stats_print(int mask, struct stats_record *cur,else if (mask &SAMPLE_DEVMAP_XMIT_CNT_MULTI )stats_get_devmap_xmit_multi (cur, prev,0 , &out, mask &SAMPLE_DEVMAP_XMIT_CNT ); -sample_summary_update (&out, interval); +sample_summary_update (&out);stats_print (prog_name, mask, cur, prev, &out); }
@@ -1495,7 +1497,7 @@ static void swap(struct stats_record **a, struct stats_record **b) }static int sample_timer_cb (int timerfd,struct stats_record **rec, -struct stats_record **prev,int interval) +struct stats_record **prev) {char line[64 ] ="Summary" ;int ret;
@@ -1524,7 +1526,7 @@ static int sample_timer_cb(int timerfd, struct stats_record **rec,snprintf (line,sizeof (line),"%s->%s" , f ?:"?" , t ?:"?" ); } -sample_stats_print (sample_mask, *rec, *prev, line, interval); +sample_stats_print (sample_mask, *rec, *prev, line);return 0 ; }
@@ -1579,7 +1581,7 @@ int sample_run(int interval, void (*post_cb)(void *), void *ctx)if (pfd[0 ].revents &POLLIN ) ret =sample_signal_cb ();else if (pfd[1 ].revents &POLLIN ) - ret =sample_timer_cb (timerfd, &rec, &prev, interval); + ret =sample_timer_cb (timerfd, &rec, &prev);if (ret)break ;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 105/279 bpf: Fix inner map state pruning regression.
In reply to Greg Kroah-HartmanFrom: Alexei Starovoitov <[email protected]>
[ Upstream commit 34d11a440c6167133201b7374065b59f259730d7 ]
Introduction of map_uid made two lookups from outer map to be distinct. That distinction is only necessary when inner map has an embedded timer. Otherwise it will make the verifier state pruning to be conservative which will cause complex programs to hit 1M insn_processed limit. Tighten map_uid logic to apply to inner maps with timers only.
--- kernel/bpf/verifier.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/bpf/verifier.c +2 -1
@@ -1143,7 +1143,8 @@ static void mark_ptr_not_null_reg(struct bpf_reg_state *reg)/* transfer reg's id which is unique for every map_lookup_elem * as UID of the inner map. */ - reg->map_uid = reg->id; +if (map_value_has_timer (map->inner_map_meta)) + reg->map_uid = reg->id; }else if (map->map_type ==BPF_MAP_TYPE_XSKMAP ) { reg->type =PTR_TO_XDP_SOCK ; } else if (map->map_type == BPF_MAP_TYPE_SOCKMAP ||
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 109/279 net/ipa: ipa_resource: Fix wrong for loop range
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 27df68d579c67ef6c39a5047559b6a7c08c96219 ]
The source group count was mistakenly assigned to both dst and src loops. Fix it to make IPA probe and work again.
--- drivers/net/ipa/ipa_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipa/ipa_resource.c +1 -1
@@ -52,7 +52,7 @@ static bool ipa_resource_limits_valid(struct ipa *ipa,return false; } - group_count = data->rsrc_group_src_count; + group_count = data->rsrc_group_dst_count;if (!group_count || group_count >IPA_RESOURCE_GROUP_MAX )return false;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 107/279 samples/bpf: Fix incorrect use of strlen in xdp_redirect_cpu
In reply to Greg Kroah-HartmanFrom: Kumar Kartikeya Dwivedi <[email protected]>
[ Upstream commit 2453afe3845523d9dfe89dbfb3d71abfa095e260 ]
Commit b599015f044d ("samples/bpf: Fix application of sizeof to pointer") tried to fix a bug where sizeof was incorrectly applied to a pointer instead of the array string was being copied to, to find the destination buffer size, but ended up using strlen, which is still incorrect. However, on closer look ifname_buf has no other use, hence directly use optarg.
--- samples/bpf/xdp_redirect_cpu_user.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
samples/bpf/xdp_redirect_cpu_user.c +2 -3
@@ -309,7 +309,6 @@ int main(int argc, char **argv)const char *mprog_filename =NULL , *mprog_name =NULL ;struct xdp_redirect_cpu *skel;struct bpf_map_info info = {}; -char ifname_buf[IF_NAMESIZE ];struct bpf_cpumap_val value;__u32 infosz =sizeof (info);int ret =EXIT_FAIL_OPTION ;
@@ -390,10 +389,10 @@ int main(int argc, char **argv)case 'd' :if (strlen (optarg) >=IF_NAMESIZE ) {fprintf (stderr,"-d/--dev name too long\n" ); +usage (argv, long_options, __doc__, mask, true, skel->obj); goto end_cpu; } -safe_strncpy (ifname_buf, optarg,strlen (ifname_buf)); - ifindex =if_nametoindex (ifname_buf); + ifindex =if_nametoindex (optarg);if (!ifindex) ifindex =strtoul (optarg,NULL ,0 );if (!ifindex) {
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 110/279 tcp: Fix uninitialized access in skb frags array for Rx 0cp.
In reply to Greg Kroah-HartmanFrom: Arjun Roy <[email protected]>
[ Upstream commit 70701b83e208767f2720d8cd3e6a62cddafb3a30 ]
TCP Receive zerocopy iterates through the SKB queue via tcp_recv_skb(), acquiring a pointer to an SKB and an offset within that SKB to read from. From there, it iterates the SKB frags array to determine which offset to start remapping pages from.
However, this is built on the assumption that the offset read so far within the SKB is smaller than the SKB length. If this assumption is violated, we can attempt to read an invalid frags array element, which would cause a fault.
tcp_recv_skb() can cause such an SKB to be returned when the TCP FIN flag is set. Therefore, we must guard against this occurrence inside skb_advance_frag().
One way that we can reproduce this error follows:
1) In a receiver program, call getsockopt(TCP_ZEROCOPY_RECEIVE) with:
char some_array[32 * 1024];
struct tcp_zerocopy_receive zc = {
.copybuf_address = (__u64) &some_array[0],
.copybuf_len = 32 * 1024,
};
2) In a sender program, after a TCP handshake, send the following sequence of packets:
i) Seq = [X, X+4000]
ii) Seq = [X+4000, X+5000]
iii) Seq = [X+4000, X+5000], Flags = FIN | URG, urgptr=1000
(This can happen without URG, if we have a signal pending, but URG is a convenient way to reproduce the behaviour).
In this case, the following event sequence will occur on the receiver:
tcp_zerocopy_receive():
-> receive_fallback_to_copy() // copybuf_len >= inq
-> tcp_recvmsg_locked() // reads 5000 bytes, then breaks due to URG -> tcp_recv_skb() // yields skb with skb->len == offset -> tcp_zerocopy_set_hint_for_skb()
-> skb_advance_to_frag() // will returns a frags ptr. >= nr_frags -> find_next_mappable_frag() // will dereference this bad frags ptr.
With this patch, skb_advance_to_frag() will no longer return an invalid frags pointer, and will return NULL instead, fixing the issue.
--- net/ipv4/tcp.c | 3 +++ 1 file changed, 3 insertions(+)
net/ipv4/tcp.c +3 -0
@@ -1776,6 +1776,9 @@ static skb_frag_t *skb_advance_to_frag(struct sk_buff *skb, u32 offset_skb, {skb_frag_t *frag; +if (unlikely (offset_skb >= skb->len)) +return NULL ; + offset_skb -=skb_headlen (skb);if ((int )offset_skb <0 ||skb_has_frag_list (skb))return NULL ;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 112/279 nl80211: fix radio statistics in survey dump
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit ce6b69749961426c6d822215ded9e67154e1ad4f ]
Even if userspace specifies the NL80211_ATTR_SURVEY_RADIO_STATS attribute, we cannot get the statistics because we're not really parsing the incoming attributes properly any more.
Fix this by passing the attrbuf to nl80211_prepare_wdev_dump() and filling it there, if given, and using a local version only if no output is desired.
Since I'm touching it anyway, make nl80211_prepare_wdev_dump() static.
--- net/wireless/nl80211.c | 34 +++++++++++++++++++--------------- net/wireless/nl80211.h | 6 +----- 2 files changed, 20 insertions(+), 20 deletions(-)
net/wireless/nl80211.c +19 -15
@@ -922,33 +922,37 @@ nl80211_packet_pattern_policy[MAX_NL80211_PKTPAT + 1] = { [NL80211_PKTPAT_OFFSET] = { .type = NLA_U32 }, }; -int nl80211_prepare_wdev_dump (struct netlink_callback *cb, -struct cfg80211_registered_device **rdev, -struct wireless_dev **wdev) +static int nl80211_prepare_wdev_dump (struct netlink_callback *cb, +struct cfg80211_registered_device **rdev, +struct wireless_dev **wdev, +struct nlattr **attrbuf) {int err;if (!cb->args[0 ]) { -struct nlattr **attrbuf; +struct nlattr **attrbuf_free =NULL ; - attrbuf =kcalloc (NUM_NL80211_ATTR ,sizeof (*attrbuf), -GFP_KERNEL ); -if (!attrbuf) -return -ENOMEM ; +if (!attrbuf) { + attrbuf =kcalloc (NUM_NL80211_ATTR ,sizeof (*attrbuf), +GFP_KERNEL ); +if (!attrbuf) +return -ENOMEM ; + attrbuf_free = attrbuf; + } err =nlmsg_parse_deprecated (cb->nlh,GENL_HDRLEN + nl80211_fam.hdrsize, attrbuf, nl80211_fam.maxattr, nl80211_policy,NULL );if (err) { -kfree (attrbuf); +kfree (attrbuf_free);return err; }rtnl_lock (); *wdev =__cfg80211_wdev_from_attrs (NULL ,sock_net (cb->skb->sk), attrbuf); -kfree (attrbuf); +kfree (attrbuf_free);if (IS_ERR (*wdev)) {rtnl_unlock ();return PTR_ERR (*wdev);
@@ -6001,7 +6005,7 @@ static int nl80211_dump_station(struct sk_buff *skb,int sta_idx = cb->args[2 ];int err; - err =nl80211_prepare_wdev_dump (cb, &rdev, &wdev); + err =nl80211_prepare_wdev_dump (cb, &rdev, &wdev,NULL );if (err)return err;/* nl80211_prepare_wdev_dump acquired it in the successful case */
@@ -6896,7 +6900,7 @@ static int nl80211_dump_mpath(struct sk_buff *skb,int path_idx = cb->args[2 ];int err; - err =nl80211_prepare_wdev_dump (cb, &rdev, &wdev); + err =nl80211_prepare_wdev_dump (cb, &rdev, &wdev,NULL );if (err)return err;/* nl80211_prepare_wdev_dump acquired it in the successful case */
@@ -7096,7 +7100,7 @@ static int nl80211_dump_mpp(struct sk_buff *skb,int path_idx = cb->args[2 ];int err; - err =nl80211_prepare_wdev_dump (cb, &rdev, &wdev); + err =nl80211_prepare_wdev_dump (cb, &rdev, &wdev,NULL );if (err)return err;/* nl80211_prepare_wdev_dump acquired it in the successful case */
@@ -9518,7 +9522,7 @@ static int nl80211_dump_scan(struct sk_buff *skb, struct netlink_callback *cb)int start = cb->args[2 ], idx =0 ;int err; - err =nl80211_prepare_wdev_dump (cb, &rdev, &wdev); + err =nl80211_prepare_wdev_dump (cb, &rdev, &wdev,NULL );if (err)return err;/* nl80211_prepare_wdev_dump acquired it in the successful case */
@@ -9651,7 +9655,7 @@ static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb)if (!attrbuf)return -ENOMEM ; - res =nl80211_prepare_wdev_dump (cb, &rdev, &wdev); + res =nl80211_prepare_wdev_dump (cb, &rdev, &wdev, attrbuf);if (res) {kfree (attrbuf);return res;
net/wireless/nl80211.h +1 -5
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ /* * Portions of this file -* Copyright (C) 2018, 2020 Intel Corporation +* Copyright (C) 2018, 2020-2021 Intel Corporation */ #ifndef __NET_WIRELESS_NL80211_H#define __NET_WIRELESS_NL80211_H
@@ -22,10 +22,6 @@ static inline u64 wdev_id(struct wireless_dev *wdev) ((u64 )wiphy_to_rdev (wdev->wiphy)->wiphy_idx <<32 ); } -int nl80211_prepare_wdev_dump (struct netlink_callback *cb, -struct cfg80211_registered_device **rdev, -struct wireless_dev **wdev); -int nl80211_parse_chandef (struct cfg80211_registered_device *rdev,struct genl_info *info,struct cfg80211_chan_def *chandef);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 89/279 f2fs: fix incorrect return value in f2fs_sanity_check_ckpt()
In reply to Greg Kroah-HartmanFrom: Chao Yu <[email protected]>
[ Upstream commit ca98d72141dd81f42893a9a43d7ededab3355fba ]
As Pavel Machek reported in [1]
This code looks quite confused: part of function returns 1 on corruption, part returns -errno. The problem is not stable-specific.
[1] https://lkml.org/lkml/2021/9/19/207
Let's fix to make 'insane cp_payload case' to return 1 rater than EFSCORRUPTED, so that return value can be kept consistent for all error cases, it can avoid confusion of code logic.
--- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/super.c +1 -1
@@ -3487,7 +3487,7 @@ skip_cross: NR_CURSEG_PERSIST_TYPE + nat_bits_blocks >= blocks_per_seg)) {f2fs_warn (sbi,"Insane cp_payload: %u, nat_bits_blocks: %u)" , cp_payload, nat_bits_blocks); -return -EFSCORRUPTED ; +return 1 ; }if (unlikely (f2fs_cp_error (sbi))) {
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 91/279 clk/ast2600: Fix soc revision for AHB
In reply to Greg Kroah-HartmanFrom: Joel Stanley <[email protected]>
[ Upstream commit f45c5b1c27293f834682e89003f88b3512329ab4 ]
Move the soc revision parsing to the initial probe, saving the driver from parsing the register multiple times.
Use this variable to select the correct divisor table for the AHB clock. Before this fix the A2 would have used the A0 table.
--- drivers/clk/clk-ast2600.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/clk/clk-ast2600.c +7 -5
@@ -51,6 +51,8 @@ static DEFINE_SPINLOCK(aspeed_g6_clk_lock);static struct clk_hw_onecell_data *aspeed_g6_clk_data;static void __iomem *scu_g6_base; +/* AST2600 revision: A0, A1, A2, etc */ +static u8 soc_rev;/* * Clocks marked with CLK_IS_CRITICAL:
@@ -191,9 +193,8 @@ static struct clk_hw *ast2600_calc_pll(const char *name, u32 val)static struct clk_hw *ast2600_calc_apll (const char *name,u32 val) {unsigned int mult, div; -u32 chip_id =readl (scu_g6_base +ASPEED_G6_SILICON_REV ); -if (((chip_id &CHIP_REVISION_ID ) >>16 ) >=2 ) { +if (soc_rev >=2 ) {if (val &BIT (24 )) {/* Pass through mode */ mult = div =1 ;
@@ -707,7 +708,7 @@ static const u32 ast2600_a1_axi_ahb200_tbl[] = {static void __init aspeed_g6_cc (struct regmap *map) {struct clk_hw *hw; -u32 val, div, divbits, chip_id, axi_div, ahb_div; +u32 val, div, divbits, axi_div, ahb_div;clk_hw_register_fixed_rate (NULL ,"clkin" ,NULL ,0 ,25000000 );
@@ -738,8 +739,7 @@ static void __init aspeed_g6_cc(struct regmap *map) axi_div =2 ; divbits = (val >>11 ) &0x3 ; -regmap_read (map,ASPEED_G6_SILICON_REV , &chip_id); -if (chip_id &BIT (16 )) { +if (soc_rev >=1 ) {if (!divbits) { ahb_div = ast2600_a1_axi_ahb200_tbl[(val >>8 ) &0x3 ];if (val &BIT (16 ))
@@ -784,6 +784,8 @@ static void __init aspeed_g6_cc_init(struct device_node *np)if (!scu_g6_base)return ; + soc_rev = (readl (scu_g6_base +ASPEED_G6_SILICON_REV ) &CHIP_REVISION_ID ) >>16 ; + aspeed_g6_clk_data =kzalloc (struct_size (aspeed_g6_clk_data, hws,ASPEED_G6_NUM_CLKS ),GFP_KERNEL );if (!aspeed_g6_clk_data)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 141/279 btrfs: make 1-bit bit-fields of scrub_page unsigned int
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit d08e38b62327961295be1c63b562cd46ec97cd07 ]
The bitfields have_csum and io_error are currently signed which is not recommended as the representation is an implementation defined behaviour. Fix this by making the bit-fields unsigned ints.
--- fs/btrfs/scrub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/scrub.c +2 -2
@@ -73,8 +73,8 @@ struct scrub_page {u64 physical_for_dev_replace;atomic_t refs;u8 mirror_num; - int have_csum:1; - int io_error:1; + unsigned int have_csum:1; + unsigned int io_error:1;u8 csum[BTRFS_CSUM_SIZE ];struct scrub_recover *recover;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 142/279 RDMA/core: Set send and receive CQ before forwarding to the driver
In reply to Greg Kroah-HartmanFrom: Leon Romanovsky <[email protected]>
[ Upstream commit 6cd7397d01c4a3e09757840299e4f114f0aa5fa0 ]
Preset both receive and send CQ pointers prior to call to the drivers and overwrite it later again till the mlx4 is going to be changed do not overwrite ibqp properties.
This change is needed for mlx5, because in case of QP creation failure, it will go to the path of QP destroy which relies on proper CQ pointers.
BUG: KASAN: use-after-free in create_qp.cold+0x164/0x16e [mlx5_ib] Write of size 8 at addr ffff8880064c55c0 by task a.out/246 CPU: 0 PID: 246 Comm: a.out Not tainted 5.15.0+ #291 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x45/0x59 print_address_description.constprop.0+0x1f/0x140 kasan_report.cold+0x83/0xdf create_qp.cold+0x164/0x16e [mlx5_ib] mlx5_ib_create_qp+0x358/0x28a0 [mlx5_ib] create_qp.part.0+0x45b/0x6a0 [ib_core] ib_create_qp_user+0x97/0x150 [ib_core] ib_uverbs_handler_UVERBS_METHOD_QP_CREATE+0x92c/0x1250 [ib_uverbs] ib_uverbs_cmd_verbs+0x1c38/0x3150 [ib_uverbs] ib_uverbs_ioctl+0x169/0x260 [ib_uverbs] __x64_sys_ioctl+0x866/0x14d0 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae Allocated by task 246: kasan_save_stack+0x1b/0x40 __kasan_kmalloc+0xa4/0xd0 create_qp.part.0+0x92/0x6a0 [ib_core] ib_create_qp_user+0x97/0x150 [ib_core] ib_uverbs_handler_UVERBS_METHOD_QP_CREATE+0x92c/0x1250 [ib_uverbs] ib_uverbs_cmd_verbs+0x1c38/0x3150 [ib_uverbs] ib_uverbs_ioctl+0x169/0x260 [ib_uverbs] __x64_sys_ioctl+0x866/0x14d0 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 246: kasan_save_stack+0x1b/0x40 kasan_set_track+0x1c/0x30 kasan_set_free_info+0x20/0x30 __kasan_slab_free+0x10c/0x150 slab_free_freelist_hook+0xb4/0x1b0 kfree+0xe7/0x2a0 create_qp.part.0+0x52b/0x6a0 [ib_core] ib_create_qp_user+0x97/0x150 [ib_core] ib_uverbs_handler_UVERBS_METHOD_QP_CREATE+0x92c/0x1250 [ib_uverbs] ib_uverbs_cmd_verbs+0x1c38/0x3150 [ib_uverbs] ib_uverbs_ioctl+0x169/0x260 [ib_uverbs] __x64_sys_ioctl+0x866/0x14d0 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae
--- drivers/infiniband/core/verbs.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/infiniband/core/verbs.c +3 -0
@@ -1232,6 +1232,9 @@ static struct ib_qp *create_qp(struct ib_device *dev, struct ib_pd *pd,INIT_LIST_HEAD (&qp->rdma_mrs);INIT_LIST_HEAD (&qp->sig_mrs); + qp->send_cq = attr->send_cq; + qp->recv_cq = attr->recv_cq; +rdma_restrack_new (&qp->res,RDMA_RESTRACK_QP );WARN_ONCE (!udata && !caller,"Missing kernel QP owner" );rdma_restrack_set_name (&qp->res, udata ?NULL : caller);
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 143/279 net/mlx5e: kTLS, Fix crash in RX resync flow
In reply to Greg Kroah-HartmanFrom: Tariq Toukan <[email protected]>
[ Upstream commit cc4a9cc03faa6d8db1a6954bb536f2c1e63bdff6 ]
For the TLS RX resync flow, we maintain a list of TLS contexts that require some attention, to communicate their resync information to the HW.
Here we fix list corruptions, by protecting the entries against movements coming from resync_handle_seq_match(), until their resync handling in napi is fully completed.
--- .../mellanox/mlx5/core/en_accel/ktls_rx.c | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c +17 -6
@@ -55,6 +55,7 @@ struct mlx5e_ktls_offload_context_rx {DECLARE_BITMAP (flags,MLX5E_NUM_PRIV_RX_FLAGS );/* resync */ +spinlock_t lock;/* protects resync fields */ struct mlx5e_ktls_rx_resync_ctx resync;struct list_head list; };
@@ -386,14 +387,18 @@ static void resync_handle_seq_match(struct mlx5e_ktls_offload_context_rx *priv_rstruct mlx5e_icosq *sq;bool trigger_poll; -memcpy (info->rec_seq, &priv_rx->resync.sw_rcd_sn_be,sizeof (info->rec_seq)); - sq = &c->async_icosq; ktls_resync = sq->ktls_resync; + trigger_poll = false;spin_lock_bh (&ktls_resync->lock); -list_add_tail (&priv_rx->list, &ktls_resync->list); - trigger_poll = !test_and_set_bit (MLX5E_SQ_STATE_PENDING_TLS_RX_RESYNC , &sq->state); +spin_lock_bh (&priv_rx->lock); +memcpy (info->rec_seq, &priv_rx->resync.sw_rcd_sn_be,sizeof (info->rec_seq)); +if (list_empty (&priv_rx->list)) { +list_add_tail (&priv_rx->list, &ktls_resync->list); + trigger_poll = !test_and_set_bit (MLX5E_SQ_STATE_PENDING_TLS_RX_RESYNC , &sq->state); + } +spin_unlock_bh (&priv_rx->lock);spin_unlock_bh (&ktls_resync->lock);if (!trigger_poll)
@@ -617,6 +622,8 @@ int mlx5e_ktls_add_rx(struct net_device *netdev, struct sock *sk,if (err) goto err_create_key; +INIT_LIST_HEAD (&priv_rx->list); +spin_lock_init (&priv_rx->lock); priv_rx->crypto_info = *(struct tls12_crypto_info_aes_gcm_128 *)crypto_info;
@@ -730,10 +737,14 @@ bool mlx5e_ktls_rx_handle_resync_list(struct mlx5e_channel *c, int budget) priv_rx =list_first_entry (&local_list, struct mlx5e_ktls_offload_context_rx, list); +spin_lock (&priv_rx->lock); cseg =post_static_params (sq, priv_rx); -if (IS_ERR (cseg)) +if (IS_ERR (cseg)) { +spin_unlock (&priv_rx->lock);break ; -list_del (&priv_rx->list); + } +list_del_init (&priv_rx->list); +spin_unlock (&priv_rx->lock); db_cseg = cseg; }if (db_cseg)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 137/279 gpio: rockchip: needs GENERIC_IRQ_CHIP to fix build errors
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit d6912b1251b47e6b04ea8c8881dfb35a6e7a3e29 ]
gpio-rockchip uses interfaces that are provided by the Kconfig symbol GENERIC_IRQ_CHIP, so the driver should select that symbol in order to prevent build errors.
Fixes these build errors (and more):
aarch64-linux-ld: drivers/gpio/gpio-rockchip.o: in function `rockchip_irq_disable':
gpio-rockchip.c:(.text+0x454): undefined reference to `irq_gc_mask_set_bit'
aarch64-linux-ld: drivers/gpio/gpio-rockchip.o: in function `rockchip_irq_enable':
gpio-rockchip.c:(.text+0x478): undefined reference to `irq_gc_mask_clr_bit'
aarch64-linux-ld: drivers/gpio/gpio-rockchip.o: in function `rockchip_interrupts_register':
gpio-rockchip.c:(.text+0x518): undefined reference to `irq_generic_chip_ops'
aarch64-linux-ld: gpio-rockchip.c:(.text+0x594): undefined reference to `__irq_alloc_domain_generic_chips'
aarch64-linux-ld: gpio-rockchip.c:(.text+0x5cc): undefined reference to `irq_get_domain_generic_chip'
aarch64-linux-ld: gpio-rockchip.c:(.text+0x5e0): undefined reference to `irq_gc_ack_set_bit'
aarch64-linux-ld: gpio-rockchip.c:(.text+0x604): undefined reference to `irq_gc_set_wake'
--- drivers/gpio/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpio/Kconfig +1 -0
@@ -523,6 +523,7 @@ config GPIO_REG config GPIO_ROCKCHIP tristate "Rockchip GPIO support" depends on ARCH_ROCKCHIP || COMPILE_TEST + select GENERIC_IRQ_CHIP select GPIOLIB_IRQCHIP default ARCH_ROCKCHIP help
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 138/279 platform/x86: hp_accel: Fix an error handling path in lis3lv02d_probe()
In reply to Greg Kroah-HartmanFrom: Christophe JAILLET <[email protected]>
[ Upstream commit c961a7d2aa23ae19e0099fbcdf1040fb760eea83 ]
If 'led_classdev_register()' fails, some additional resources should be released.
Add the missing 'i8042_remove_filter()' and 'lis3lv02d_remove_fs()' calls that are already in the remove function but are missing here.
--- drivers/platform/x86/hp_accel.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/platform/x86/hp_accel.c +2 -0
@@ -331,9 +331,11 @@ static int lis3lv02d_probe(struct platform_device *device)INIT_WORK (&hpled_led.work, delayed_set_status_worker); ret =led_classdev_register (NULL , &hpled_led.led_classdev);if (ret) { +i8042_remove_filter (hp_accel_i8042_filter);lis3lv02d_joystick_disable (&lis3_dev);lis3lv02d_poweroff (&lis3_dev);flush_work (&hpled_led.work); +lis3lv02d_remove_fs (&lis3_dev);return ret; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 134/279 MIPS: generic/yamon-dt: fix uninitialized variable error
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit 255e51da15baed47531beefd02f222e4dc01f1c1 ]
In the case where fw_getenv returns an error when fetching values for ememsizea and memsize then variable phys_memsize is not assigned a variable and will be uninitialized on a zero check of phys_memsize. Fix this by initializing phys_memsize to zero.
Cleans up cppcheck error:arch/mips/generic/yamon-dt.c:100:7: error: Uninitialized variable: phys_memsize [uninitvar]
--- arch/mips/generic/yamon-dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/generic/yamon-dt.c +1 -1
@@ -75,7 +75,7 @@ static unsigned int __init gen_fdt_mem_array(__init int yamon_dt_append_memory (void *fdt,const struct yamon_mem_region *regions) { -unsigned long phys_memsize, memsize; +unsigned long phys_memsize =0 , memsize;__be32 mem_array[2 *MAX_MEM_ARRAY_ENTRIES ];unsigned int mem_entries;int i, err, mem_off;
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 133/279 bpf: Fix toctou on read-only maps constant scalar tracking
In reply to Greg Kroah-HartmanFrom: Daniel Borkmann <[email protected]>
[ Upstream commit 353050be4c19e102178ccc05988101887c25ae53 ]
Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is checking whether maps are read-only both from BPF program side and user space side, and then, given their content is constant, reading out their data via map->ops->map_direct_value_addr() which is then subsequently used as known scalar value for the register, that is, it is marked as __mark_reg_known() with the read value at verification time. Before a23740ec43ba, the register content was marked as an unknown scalar so the verifier could not make any assumptions about the map content.
The current implementation however is prone to a TOCTOU race, meaning, the value read as known scalar for the register is not guaranteed to be exactly the same at a later point when the program is executed, and as such, the prior made assumptions of the verifier with regards to the program will be invalid which can cause issues such as OOB access, etc.
While the BPF_F_RDONLY_PROG map flag is always fixed and required to be specified at map creation time, the map->frozen property is initially set to false for the map given the map value needs to be populated, e.g. for global data sections. Once complete, the loader "freezes" the map from user space such that no subsequent updates/deletes are possible anymore. For the rest of the lifetime of the map, this freeze one-time trigger cannot be undone anymore after a successful BPF_MAP_FREEZE cmd return. Meaning, any new BPF_* cmd calls which would update/delete map entries will be rejected with -EPERM since map_get_sys_perms() removes the FMODE_CAN_WRITE permission. This also means that pending update/delete map entries must still complete before this guarantee is given. This corner case is not an issue for loaders since they create and prepare such program private map in successive steps.
However, a malicious user is able to trigger this TOCTOU race in two different
ways: i) via userfaultfd, and ii) via batched updates. For i) userfaultfd is used to expand the competition interval, so that map_update_elem() can modify the contents of the map after map_freeze() and bpf_prog_load() were executed. This works, because userfaultfd halts the parallel thread which triggered a map_update_elem() at the time where we copy key/value from the user buffer and this already passed the FMODE_CAN_WRITE capability test given at that time the map was not "frozen". Then, the main thread performs the map_freeze() and bpf_prog_load(), and once that had completed successfully, the other thread is woken up to complete the pending map_update_elem() which then changes the map content. For ii) the idea of the batched update is similar, meaning, when there are a large number of updates to be processed, it can increase the competition interval between the two. It is therefore possible in practice to modify the contents of the map after executing map_freeze() and bpf_prog_load().
One way to fix both i) and ii) at the same time is to expand the use of the map's map->writecnt. The latter was introduced in fc9702273e2e ("bpf: Add mmap() support for BPF_MAP_TYPE_ARRAY") and further refined in 1f6cb19be2e2 ("bpf:
Prevent re-mmap()'ing BPF map as writable for initially r/o mapping") with the rationale to make a writable mmap()'ing of a map mutually exclusive with read-only freezing. The counter indicates writable mmap() mappings and then prevents/fails the freeze operation. Its semantics can be expanded beyond just mmap() by generally indicating ongoing write phases. This would essentially span any parallel regular and batched flavor of update/delete operation and then also have map_freeze() fail with -EBUSY. For the check_mem_access() in the verifier we expand upon the bpf_map_is_rdonly() check ensuring that all last pending writes have completed via bpf_map_write_active() test. Once the map->frozen is set and bpf_map_write_active() indicates a map->writecnt of 0 only then we are really guaranteed to use the map's data as known constants. For map->frozen being set and pending writes in process of still being completed we fall back to marking that register as unknown scalar so we don't end up making assumptions about it. With this, both TOCTOU reproducers from i) and ii) are fixed.
Note that the map->writecnt has been converted into a atomic64 in the fix in order to avoid a double freeze_mutex mutex_{un,}lock() pair when updating map->writecnt in the various map update/delete BPF_* cmd flavors. Spanning the freeze_mutex over entire map update/delete operations in syscall side would not be possible due to then causing everything to be serialized. Similarly, something like synchronize_rcu() after setting map->frozen to wait for update/deletes to complete is not possible either since it would also have to span the user copy which can sleep. On the libbpf side, this won't break d66562fba1ce ("libbpf: Add BPF object skeleton support") as the anonymous mmap()-ed "map initialization image" is remapped as a BPF map-backed mmap()-ed memory where for .rodata it's non-writable.
--- include/linux/bpf.h | 3 ++- kernel/bpf/syscall.c | 57 +++++++++++++++++++++++++++---------------- kernel/bpf/verifier.c | 17 ++++++++++++- 3 files changed, 54 insertions(+), 23 deletions(-)
include/linux/bpf.h +2 -1
@@ -190,7 +190,7 @@ struct bpf_map {atomic64_t usercnt;struct work_struct work;struct mutex freeze_mutex; -u64 writecnt;/* writable mmap cnt; protected by freeze_mutex */ +atomic64_t writecnt; };static inline bool map_value_has_spin_lock (const struct bpf_map *map)
@@ -1387,6 +1387,7 @@ void bpf_map_put(struct bpf_map *map);void *bpf_map_area_alloc (u64 size,int numa_node);void *bpf_map_area_mmapable_alloc (u64 size,int numa_node);void bpf_map_area_free (void *base); +bool bpf_map_write_active (const struct bpf_map *map);void bpf_map_init_from_attr (struct bpf_map *map,union bpf_attr *attr); int generic_map_lookup_batch(struct bpf_map *map, const union bpf_attr *attr,
kernel/bpf/syscall.c +36 -21
145 lines not on this page · raw message
kernel/bpf/verifier.c +16 -1
@@ -3885,7 +3885,22 @@ static void coerce_reg_to_size(struct bpf_reg_state *reg, int size)static bool bpf_map_is_rdonly (const struct bpf_map *map) { -return (map->map_flags &BPF_F_RDONLY_PROG ) && map->frozen; +/* A map is considered read-only if the following condition are true: +* +* 1) BPF program side cannot change any of the map content. The +* BPF_F_RDONLY_PROG flag is throughout the lifetime of a map +* and was set at map creation time. +* 2) The map value(s) have been initialized from user space by a +* loader and then "frozen", such that no new map update/delete +* operations from syscall side are possible for the rest of +* the map's lifetime from that point onwards. +* 3) Any parallel/pending map update/delete operations from syscall +* side have been completed. Only after that point, it's safe to +* assume that map value(s) are immutable. +*/ +return (map->map_flags &BPF_F_RDONLY_PROG ) && +READ_ONCE (map->frozen) && + !bpf_map_write_active (map); }static int bpf_map_direct_read (struct bpf_map *map,int off,int size,u64 *val)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 131/279 iavf: Fix for setting queues to 0
In reply to Greg Kroah-HartmanFrom: Grzegorz Szczurek <[email protected]>
[ Upstream commit 9a6e9e483a9684a34573fd9f9e30ecfb047cb8cb ]
Now setting combine to 0 will be rejected with the appropriate error code.
This has been implemented by adding a condition that checks the value of combine equal to zero.
Without this patch, when the user requested it, no error was returned and combine was set to the default value for VF.
--- drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/iavf/iavf_ethtool.c +1 -1
@@ -1787,7 +1787,7 @@ static int iavf_set_channels(struct net_device *netdev,/* All of these should have already been checked by ethtool before this * even gets to us, but just to be sure. */ -if (num_req > adapter->vsi_res->num_queue_pairs) +if (num_req ==0 || num_req > adapter->vsi_res->num_queue_pairs)return -EINVAL ;if (num_req == adapter->num_active_queues)
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 148/279 net/mlx5: E-Switch, rebuild lag only when needed
In reply to Greg Kroah-HartmanFrom: Mark Bloch <[email protected]>
[ Upstream commit 2eb0cb31bc4ce2ede5460cf3ef433b40cf5f040d ]
A user can enable VFs without changing E-Switch mode, this can happen when a user moves straight to switchdev mode and only once in switchdev VFs are enabled via the sysfs interface.
The cited commit assumed this isn't possible and exposed a single API function where the E-switch calls into the lag code, breaks the lag and prevents any other lag operations to take place until the E-switch update has ended.
Breaking the hardware lag when it isn't needed can make it such that hardware lag can't be enabled again.
In the sysfs call path check if the current E-Switch mode is NONE, in the context of the function it can only mean the E-Switch is moving out of NONE mode and the hardware lag should be disabled and enabled once the mode change has ended. If the mode isn't NONE it means VFs are about to be enabled and such operation doesn't require toggling the hardware lag.
--- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +10 -2
@@ -1305,12 +1305,17 @@ abort:*/ int mlx5_eswitch_enable (struct mlx5_eswitch *esw,int num_vfs) { +bool toggle_lag;int ret;if (!mlx5_esw_allowed (esw))return 0 ; -mlx5_lag_disable_change (esw->dev); + toggle_lag = esw->mode ==MLX5_ESWITCH_NONE ; + +if (toggle_lag) +mlx5_lag_disable_change (esw->dev); +down_write (&esw->mode_lock);if (esw->mode ==MLX5_ESWITCH_NONE ) { ret =mlx5_eswitch_enable_locked (esw,MLX5_ESWITCH_LEGACY , num_vfs);
@@ -1324,7 +1329,10 @@ int mlx5_eswitch_enable(struct mlx5_eswitch *esw, int num_vfs) esw->esw_funcs.num_vfs = num_vfs; }up_write (&esw->mode_lock); -mlx5_lag_enable_change (esw->dev); + +if (toggle_lag) +mlx5_lag_enable_change (esw->dev); +return ret; }
Signature · 1 line
2.33.0
Greg Kroah-Hartman
maintainerPATCH 122/279 NFSD: Fix exposure in nfsd4_decode_bitmap()
In reply to Greg Kroah-HartmanFrom: Chuck Lever <[email protected]>
[ Upstream commit c0019b7db1d7ac62c711cda6b357a659d46428fe ]
[email protected] reports:
Quoted 5 lines
nfsd4_decode_bitmap4()will write beyond bmval[bmlen-1] if the RPC directs it to do so. This can causenfsd4_decode_state_protect4_a()to write client-supplied data beyond the end of nfsd4_exchange_id.spo_must_allow[] when called bynfsd4_decode_exchange_id().
Rewrite the loops so nfsd4_decode_bitmap() cannot iterate beyond @bmlen.
Reported by: [email protected]
--- fs/nfsd/nfs4xdr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
fs/nfsd/nfs4xdr.c +2 -5
@@ -288,11 +288,8 @@ nfsd4_decode_bitmap4(struct nfsd4_compoundargs *argp, u32 *bmval, u32 bmlen) p =xdr_inline_decode (argp->xdr, count <<2 );if (!p)return nfserr_bad_xdr; - i =0 ; -while (i < count) - bmval[i++] =be32_to_cpup (p++); -while (i < bmlen) - bmval[i++] =0 ; +for (i =0 ; i < bmlen; i++) + bmval[i] = (i < count) ?be32_to_cpup (p++) :0 ;return nfs_ok; }
Signature · 1 line
2.33.0