From: Sasha Levin Date: Fri, 29 May 2020 15:05:01 +0000 (-0400) Subject: Fixes for 5.4 X-Git-Tag: v4.4.226~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6dddb0aaa0960dfd4690d6ebd54ede316e5e0b8b;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.4 Signed-off-by: Sasha Levin --- diff --git a/queue-5.4/alsa-usb-audio-add-mapping-for-asrock-trx40-creator.patch b/queue-5.4/alsa-usb-audio-add-mapping-for-asrock-trx40-creator.patch new file mode 100644 index 00000000000..fdc679eb10d --- /dev/null +++ b/queue-5.4/alsa-usb-audio-add-mapping-for-asrock-trx40-creator.patch @@ -0,0 +1,60 @@ +From 5955c385be2839f8099ba19e486bf09a5f95c49e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 3 May 2020 15:16:39 +0100 +Subject: ALSA: usb-audio: add mapping for ASRock TRX40 Creator + +From: Andrew Oakley + +[ Upstream commit da7a8f1a8fc3e14c6dcc52b4098bddb8f20390be ] + +This is another TRX40 based motherboard with ALC1220-VB USB-audio +that requires a static mapping table. + +This motherboard also has a PCI device which advertises no codecs. The +PCI ID is 1022:1487 and PCI SSID is 1022:d102. As this is using the AMD +vendor ID, don't blacklist for now in case other boards have a working +audio device with the same ssid. + +alsa-info.sh report for this board: +http://alsa-project.org/db/?f=0a742f89066527497b77ce16bca486daccf8a70c + +Signed-off-by: Andrew Oakley +Link: https://lore.kernel.org/r/20200503141639.35519-1-andrew@adoakley.name +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/usb/mixer_maps.c | 5 +++++ + sound/usb/quirks-table.h | 1 + + 2 files changed, 6 insertions(+) + +diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c +index 39d6c6fa5e33..2255f9abd7a5 100644 +--- a/sound/usb/mixer_maps.c ++++ b/sound/usb/mixer_maps.c +@@ -529,6 +529,11 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { + .map = trx40_mobo_map, + .connector_map = trx40_mobo_connector_map, + }, ++ { /* Asrock TRX40 Creator */ ++ .id = USB_ID(0x26ce, 0x0a01), ++ .map = trx40_mobo_map, ++ .connector_map = trx40_mobo_connector_map, ++ }, + { 0 } /* terminator */ + }; + +diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h +index 8c2f5c23e1b4..aa4c16ce0e57 100644 +--- a/sound/usb/quirks-table.h ++++ b/sound/usb/quirks-table.h +@@ -3647,6 +3647,7 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), + ALC1220_VB_DESKTOP(0x0414, 0xa002), /* Gigabyte TRX40 Aorus Pro WiFi */ + ALC1220_VB_DESKTOP(0x0db0, 0x0d64), /* MSI TRX40 Creator */ + ALC1220_VB_DESKTOP(0x0db0, 0x543d), /* MSI TRX40 */ ++ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */ + #undef ALC1220_VB_DESKTOP + + #undef USB_DEVICE_VENDOR_SPEC +-- +2.25.1 + diff --git a/queue-5.4/arm-dts-rockchip-fix-phy-nodename-for-rk3228-evb.patch b/queue-5.4/arm-dts-rockchip-fix-phy-nodename-for-rk3228-evb.patch new file mode 100644 index 00000000000..898ed89ecda --- /dev/null +++ b/queue-5.4/arm-dts-rockchip-fix-phy-nodename-for-rk3228-evb.patch @@ -0,0 +1,49 @@ +From 7546a7e29a3654bb248f392ec75260fbdd2a323e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 16 Apr 2020 19:03:20 +0200 +Subject: ARM: dts: rockchip: fix phy nodename for rk3228-evb + +From: Johan Jonker + +[ Upstream commit 287e0d538fcec2f6e8eb1e565bf0749f3b90186d ] + +A test with the command below gives for example this error: + +arch/arm/boot/dts/rk3228-evb.dt.yaml: phy@0: +'#phy-cells' is a required property + +The phy nodename is normally used by a phy-handle. +This node is however compatible with +"ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22" +which is just been added to 'ethernet-phy.yaml'. +So change nodename to 'ethernet-phy' for which '#phy-cells' +is not a required property + +make ARCH=arm dtbs_check +DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/ +phy/phy-provider.yaml + +Signed-off-by: Johan Jonker +Signed-off-by: Heiko Stuebner +Link: https://lore.kernel.org/r/20200416170321.4216-1-jbx6244@gmail.com +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/rk3228-evb.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/rk3228-evb.dts b/arch/arm/boot/dts/rk3228-evb.dts +index 5670b33fd1bd..aed879db6c15 100644 +--- a/arch/arm/boot/dts/rk3228-evb.dts ++++ b/arch/arm/boot/dts/rk3228-evb.dts +@@ -46,7 +46,7 @@ + #address-cells = <1>; + #size-cells = <0>; + +- phy: phy@0 { ++ phy: ethernet-phy@0 { + compatible = "ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22"; + reg = <0>; + clocks = <&cru SCLK_MAC_PHY>; +-- +2.25.1 + diff --git a/queue-5.4/arm-dts-rockchip-fix-phy-nodename-for-rk3229-xms6.patch b/queue-5.4/arm-dts-rockchip-fix-phy-nodename-for-rk3229-xms6.patch new file mode 100644 index 00000000000..0206912f536 --- /dev/null +++ b/queue-5.4/arm-dts-rockchip-fix-phy-nodename-for-rk3229-xms6.patch @@ -0,0 +1,49 @@ +From 5ed4eb729655fc11644992c01ec01119bbbabc2d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 16 Apr 2020 19:03:21 +0200 +Subject: ARM: dts: rockchip: fix phy nodename for rk3229-xms6 + +From: Johan Jonker + +[ Upstream commit 621c8d0c233e260232278a4cfd3380caa3c1da29 ] + +A test with the command below gives for example this error: + +arch/arm/boot/dts/rk3229-xms6.dt.yaml: phy@0: +'#phy-cells' is a required property + +The phy nodename is normally used by a phy-handle. +This node is however compatible with +"ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22" +which is just been added to 'ethernet-phy.yaml'. +So change nodename to 'ethernet-phy' for which '#phy-cells' +is not a required property + +make ARCH=arm dtbs_check +DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/ +phy/phy-provider.yaml + +Signed-off-by: Johan Jonker +Signed-off-by: Heiko Stuebner +Link: https://lore.kernel.org/r/20200416170321.4216-2-jbx6244@gmail.com +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/rk3229-xms6.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/rk3229-xms6.dts b/arch/arm/boot/dts/rk3229-xms6.dts +index 679fc2b00e5a..933ef69da32a 100644 +--- a/arch/arm/boot/dts/rk3229-xms6.dts ++++ b/arch/arm/boot/dts/rk3229-xms6.dts +@@ -150,7 +150,7 @@ + #address-cells = <1>; + #size-cells = <0>; + +- phy: phy@0 { ++ phy: ethernet-phy@0 { + compatible = "ethernet-phy-id1234.d400", + "ethernet-phy-ieee802.3-c22"; + reg = <0>; +-- +2.25.1 + diff --git a/queue-5.4/arm-dts-rockchip-fix-pinctrl-sub-nodename-for-spi-in.patch b/queue-5.4/arm-dts-rockchip-fix-pinctrl-sub-nodename-for-spi-in.patch new file mode 100644 index 00000000000..1d7f1272a1e --- /dev/null +++ b/queue-5.4/arm-dts-rockchip-fix-pinctrl-sub-nodename-for-spi-in.patch @@ -0,0 +1,61 @@ +From db86788d3252534a6620874c19d17e7c87337f87 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 24 Apr 2020 14:39:23 +0200 +Subject: ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi + +From: Johan Jonker + +[ Upstream commit 855bdca1781c79eb661f89c8944c4a719ce720e8 ] + +A test with the command below gives these errors: + +arch/arm/boot/dts/rk3229-evb.dt.yaml: spi-0: +'#address-cells' is a required property +arch/arm/boot/dts/rk3229-evb.dt.yaml: spi-1: +'#address-cells' is a required property +arch/arm/boot/dts/rk3229-xms6.dt.yaml: spi-0: +'#address-cells' is a required property +arch/arm/boot/dts/rk3229-xms6.dt.yaml: spi-1: +'#address-cells' is a required property + +The $nodename pattern for spi nodes is +"^spi(@.*|-[0-9a-f])*$". To prevent warnings rename +'spi-0' and 'spi-1' pinctrl sub nodenames to +'spi0' and 'spi1' in 'rk322x.dtsi'. + +make ARCH=arm dtbs_check +DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/spi-controller.yaml + +Signed-off-by: Johan Jonker +Link: https://lore.kernel.org/r/20200424123923.8192-1-jbx6244@gmail.com +Signed-off-by: Heiko Stuebner +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/rk322x.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi +index c60784f3aa75..6bb78b19c555 100644 +--- a/arch/arm/boot/dts/rk322x.dtsi ++++ b/arch/arm/boot/dts/rk322x.dtsi +@@ -1033,7 +1033,7 @@ + }; + }; + +- spi-0 { ++ spi0 { + spi0_clk: spi0-clk { + rockchip,pins = <0 RK_PB1 2 &pcfg_pull_up>; + }; +@@ -1051,7 +1051,7 @@ + }; + }; + +- spi-1 { ++ spi1 { + spi1_clk: spi1-clk { + rockchip,pins = <0 RK_PC7 2 &pcfg_pull_up>; + }; +-- +2.25.1 + diff --git a/queue-5.4/arm-dts-rockchip-swap-clock-names-of-gpu-nodes.patch b/queue-5.4/arm-dts-rockchip-swap-clock-names-of-gpu-nodes.patch new file mode 100644 index 00000000000..9058f319da0 --- /dev/null +++ b/queue-5.4/arm-dts-rockchip-swap-clock-names-of-gpu-nodes.patch @@ -0,0 +1,67 @@ +From 04be8b2a9b09bee80c89f1066cf2d6f3785a95d4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 25 Apr 2020 21:25:00 +0200 +Subject: ARM: dts: rockchip: swap clock-names of gpu nodes + +From: Johan Jonker + +[ Upstream commit b14f3898d2c25a9b47a61fb879d0b1f3af92c59b ] + +Dts files with Rockchip 'gpu' nodes were manually verified. +In order to automate this process arm,mali-utgard.txt +has been converted to yaml. In the new setup dtbs_check with +arm,mali-utgard.yaml expects clock-names values +in the same order, so fix that. + +Signed-off-by: Johan Jonker +Link: https://lore.kernel.org/r/20200425192500.1808-1-jbx6244@gmail.com +Signed-off-by: Heiko Stuebner +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/rk3036.dtsi | 2 +- + arch/arm/boot/dts/rk322x.dtsi | 2 +- + arch/arm/boot/dts/rk3xxx.dtsi | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi +index c776321b2cc4..d282a7b638d8 100644 +--- a/arch/arm/boot/dts/rk3036.dtsi ++++ b/arch/arm/boot/dts/rk3036.dtsi +@@ -128,7 +128,7 @@ + assigned-clocks = <&cru SCLK_GPU>; + assigned-clock-rates = <100000000>; + clocks = <&cru SCLK_GPU>, <&cru SCLK_GPU>; +- clock-names = "core", "bus"; ++ clock-names = "bus", "core"; + resets = <&cru SRST_GPU>; + status = "disabled"; + }; +diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi +index 340ed6ccb08f..c60784f3aa75 100644 +--- a/arch/arm/boot/dts/rk322x.dtsi ++++ b/arch/arm/boot/dts/rk322x.dtsi +@@ -561,7 +561,7 @@ + "pp1", + "ppmmu1"; + clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>; +- clock-names = "core", "bus"; ++ clock-names = "bus", "core"; + resets = <&cru SRST_GPU_A>; + status = "disabled"; + }; +diff --git a/arch/arm/boot/dts/rk3xxx.dtsi b/arch/arm/boot/dts/rk3xxx.dtsi +index 97307a405e60..bce0b05ef7bf 100644 +--- a/arch/arm/boot/dts/rk3xxx.dtsi ++++ b/arch/arm/boot/dts/rk3xxx.dtsi +@@ -84,7 +84,7 @@ + compatible = "arm,mali-400"; + reg = <0x10090000 0x10000>; + clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>; +- clock-names = "core", "bus"; ++ clock-names = "bus", "core"; + assigned-clocks = <&cru ACLK_GPU>; + assigned-clock-rates = <100000000>; + resets = <&cru SRST_GPU>; +-- +2.25.1 + diff --git a/queue-5.4/arm64-dts-rockchip-fix-status-for-gmac2phy-in-rk3328.patch b/queue-5.4/arm64-dts-rockchip-fix-status-for-gmac2phy-in-rk3328.patch new file mode 100644 index 00000000000..6351b501d5e --- /dev/null +++ b/queue-5.4/arm64-dts-rockchip-fix-status-for-gmac2phy-in-rk3328.patch @@ -0,0 +1,37 @@ +From 999f8d7805adcf44753d14d2652c2f7538c04c7f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 25 Apr 2020 14:23:45 +0200 +Subject: arm64: dts: rockchip: fix status for &gmac2phy in rk3328-evb.dts + +From: Johan Jonker + +[ Upstream commit c617ed88502d0b05149e7f32f3b3fd8a0663f7e2 ] + +The status was removed of the '&gmac2phy' node with the apply +of a patch long time ago, so fix status for '&gmac2phy' +in 'rk3328-evb.dts'. + +Signed-off-by: Johan Jonker +Link: https://lore.kernel.org/r/20200425122345.12902-2-jbx6244@gmail.com +Signed-off-by: Heiko Stuebner +Signed-off-by: Sasha Levin +--- + arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts b/arch/arm64/boot/dts/rockchip/rk3328-evb.dts +index 6abc6f4a86cf..05265b38cc02 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3328-evb.dts +@@ -86,7 +86,7 @@ + assigned-clock-rate = <50000000>; + assigned-clocks = <&cru SCLK_MAC2PHY>; + assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>; +- ++ status = "okay"; + }; + + &i2c1 { +-- +2.25.1 + diff --git a/queue-5.4/arm64-dts-rockchip-swap-interrupts-interrupt-names-r.patch b/queue-5.4/arm64-dts-rockchip-swap-interrupts-interrupt-names-r.patch new file mode 100644 index 00000000000..7d97b79bfd7 --- /dev/null +++ b/queue-5.4/arm64-dts-rockchip-swap-interrupts-interrupt-names-r.patch @@ -0,0 +1,49 @@ +From a9e7714b9a4e6caf03610d7ae00b04e4eae95d2e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 25 Apr 2020 16:38:37 +0200 +Subject: arm64: dts: rockchip: swap interrupts interrupt-names rk3399 gpu node + +From: Johan Jonker + +[ Upstream commit c604fd810bda667bdc20b2c041917baa7803e0fb ] + +Dts files with Rockchip rk3399 'gpu' nodes were manually verified. +In order to automate this process arm,mali-midgard.txt +has been converted to yaml. In the new setup dtbs_check with +arm,mali-midgard.yaml expects interrupts and interrupt-names values +in the same order. Fix this for rk3399. + +make ARCH=arm64 dtbs_check +DT_SCHEMA_FILES=Documentation/devicetree/bindings/gpu/ +arm,mali-midgard.yaml + +Signed-off-by: Johan Jonker +Link: https://lore.kernel.org/r/20200425143837.18706-1-jbx6244@gmail.com +Signed-off-by: Heiko Stuebner +Signed-off-by: Sasha Levin +--- + arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi +index cd97016b7c18..c5d8d1c58291 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi +@@ -1881,10 +1881,10 @@ + gpu: gpu@ff9a0000 { + compatible = "rockchip,rk3399-mali", "arm,mali-t860"; + reg = <0x0 0xff9a0000 0x0 0x10000>; +- interrupts = , +- , +- ; +- interrupt-names = "gpu", "job", "mmu"; ++ interrupts = , ++ , ++ ; ++ interrupt-names = "job", "mmu", "gpu"; + clocks = <&cru ACLK_GPU>; + power-domains = <&power RK3399_PD_GPU>; + status = "disabled"; +-- +2.25.1 + diff --git a/queue-5.4/cachefiles-fix-race-between-read_waiter-and-read_cop.patch b/queue-5.4/cachefiles-fix-race-between-read_waiter-and-read_cop.patch new file mode 100644 index 00000000000..9409452b927 --- /dev/null +++ b/queue-5.4/cachefiles-fix-race-between-read_waiter-and-read_cop.patch @@ -0,0 +1,126 @@ +From e03b734e5c1cd0cb03e4f52db0e02fd56b73592d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 7 May 2020 08:50:22 -0400 +Subject: cachefiles: Fix race between read_waiter and read_copier involving + op->to_do + +From: Lei Xue + +[ Upstream commit 7bb0c5338436dae953622470d52689265867f032 ] + +There is a potential race in fscache operation enqueuing for reading and +copying multiple pages from cachefiles to netfs. The problem can be seen +easily on a heavy loaded system (for example many processes reading files +continually on an NFS share covered by fscache triggered this problem within +a few minutes). + +The race is due to cachefiles_read_waiter() adding the op to the monitor +to_do list and then then drop the object->work_lock spinlock before +completing fscache_enqueue_operation(). Once the lock is dropped, +cachefiles_read_copier() grabs the op, completes processing it, and +makes it through fscache_retrieval_complete() which sets the op->state to +the final state of FSCACHE_OP_ST_COMPLETE(4). When cachefiles_read_waiter() +finally gets through the remainder of fscache_enqueue_operation() +it sees the invalid state, and hits the ASSERTCMP and the following +oops is seen: +[ 2259.612361] FS-Cache: +[ 2259.614785] FS-Cache: Assertion failed +[ 2259.618639] FS-Cache: 4 == 5 is false +[ 2259.622456] ------------[ cut here ]------------ +[ 2259.627190] kernel BUG at fs/fscache/operation.c:70! +... +[ 2259.791675] RIP: 0010:[] [] fscache_enqueue_operation+0xff/0x170 [fscache] +[ 2259.802059] RSP: 0000:ffffa0263d543be0 EFLAGS: 00010046 +[ 2259.807521] RAX: 0000000000000019 RBX: ffffa01a4d390480 RCX: 0000000000000006 +[ 2259.814847] RDX: 0000000000000000 RSI: 0000000000000046 RDI: ffffa0263d553890 +[ 2259.822176] RBP: ffffa0263d543be8 R08: 0000000000000000 R09: ffffa0263c2d8708 +[ 2259.829502] R10: 0000000000001e7f R11: 0000000000000000 R12: ffffa01a4d390480 +[ 2259.844483] R13: ffff9fa9546c5920 R14: ffffa0263d543c80 R15: ffffa0293ff9bf10 +[ 2259.859554] FS: 00007f4b6efbd700(0000) GS:ffffa0263d540000(0000) knlGS:0000000000000000 +[ 2259.875571] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +[ 2259.889117] CR2: 00007f49e1624ff0 CR3: 0000012b38b38000 CR4: 00000000007607e0 +[ 2259.904015] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +[ 2259.918764] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 +[ 2259.933449] PKRU: 55555554 +[ 2259.943654] Call Trace: +[ 2259.953592] +[ 2259.955577] [] cachefiles_read_waiter+0x92/0xf0 [cachefiles] +[ 2259.978039] [] __wake_up_common+0x82/0x120 +[ 2259.991392] [] __wake_up_common_lock+0x83/0xc0 +[ 2260.004930] [] ? task_rq_unlock+0x20/0x20 +[ 2260.017863] [] __wake_up+0x13/0x20 +[ 2260.030230] [] __wake_up_bit+0x50/0x70 +[ 2260.042535] [] unlock_page+0x2b/0x30 +[ 2260.054495] [] page_endio+0x29/0x90 +[ 2260.066184] [] mpage_end_io+0x51/0x80 + +CPU1 +cachefiles_read_waiter() + 20 static int cachefiles_read_waiter(wait_queue_entry_t *wait, unsigned mode, + 21 int sync, void *_key) + 22 { +... + 61 spin_lock(&object->work_lock); + 62 list_add_tail(&monitor->op_link, &op->to_do); + 63 spin_unlock(&object->work_lock); + + 64 + 65 fscache_enqueue_retrieval(op); +182 static inline void fscache_enqueue_retrieval(struct fscache_retrieval *op) +183 { +184 fscache_enqueue_operation(&op->op); +185 } + 58 void fscache_enqueue_operation(struct fscache_operation *op) + 59 { + 60 struct fscache_cookie *cookie = op->object->cookie; + 61 + 62 _enter("{OBJ%x OP%x,%u}", + 63 op->object->debug_id, op->debug_id, atomic_read(&op->usage)); + 64 + 65 ASSERT(list_empty(&op->pend_link)); + 66 ASSERT(op->processor != NULL); + 67 ASSERT(fscache_object_is_available(op->object)); + 68 ASSERTCMP(atomic_read(&op->usage), >, 0); + + +CPU2 +cachefiles_read_copier() +168 while (!list_empty(&op->to_do)) { +... +202 fscache_end_io(op, monitor->netfs_page, error); +203 put_page(monitor->netfs_page); +204 fscache_retrieval_complete(op, 1); + +CPU1 + 58 void fscache_enqueue_operation(struct fscache_operation *op) + 59 { +... + 69 ASSERTIFCMP(op->state != FSCACHE_OP_ST_IN_PROGRESS, + 70 op->state, ==, FSCACHE_OP_ST_CANCELLED); + +Signed-off-by: Lei Xue +Signed-off-by: Dave Wysochanski +Signed-off-by: David Howells +Signed-off-by: Sasha Levin +--- + fs/cachefiles/rdwr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c +index 44a3ce1e4ce4..ad057ed2b30b 100644 +--- a/fs/cachefiles/rdwr.c ++++ b/fs/cachefiles/rdwr.c +@@ -60,9 +60,9 @@ static int cachefiles_read_waiter(wait_queue_entry_t *wait, unsigned mode, + object = container_of(op->op.object, struct cachefiles_object, fscache); + spin_lock(&object->work_lock); + list_add_tail(&monitor->op_link, &op->to_do); ++ fscache_enqueue_retrieval(op); + spin_unlock(&object->work_lock); + +- fscache_enqueue_retrieval(op); + fscache_put_retrieval(op); + return 0; + } +-- +2.25.1 + diff --git a/queue-5.4/cifs-fix-null-pointer-check-in-cifs_read.patch b/queue-5.4/cifs-fix-null-pointer-check-in-cifs_read.patch new file mode 100644 index 00000000000..4ebffe999a7 --- /dev/null +++ b/queue-5.4/cifs-fix-null-pointer-check-in-cifs_read.patch @@ -0,0 +1,36 @@ +From 710874c498142d8dbea53500f87cf1f070c73d4e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 13 May 2020 10:27:16 -0500 +Subject: cifs: Fix null pointer check in cifs_read + +From: Steve French + +[ Upstream commit 9bd21d4b1a767c3abebec203342f3820dcb84662 ] + +Coverity scan noted a redundant null check + +Coverity-id: 728517 +Reported-by: Coverity +Signed-off-by: Steve French +Reviewed-by: Shyam Prasad N +Signed-off-by: Sasha Levin +--- + fs/cifs/file.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/cifs/file.c b/fs/cifs/file.c +index b095094c0842..4959dbe740f7 100644 +--- a/fs/cifs/file.c ++++ b/fs/cifs/file.c +@@ -3997,7 +3997,7 @@ cifs_read(struct file *file, char *read_data, size_t read_size, loff_t *offset) + * than it negotiated since it will refuse the read + * then. + */ +- if ((tcon->ses) && !(tcon->ses->capabilities & ++ if (!(tcon->ses->capabilities & + tcon->ses->server->vals->cap_large_files)) { + current_read_size = min_t(uint, + current_read_size, CIFSMaxBufSize); +-- +2.25.1 + diff --git a/queue-5.4/clk-ti-am33xx-fix-rtc-clock-parent.patch b/queue-5.4/clk-ti-am33xx-fix-rtc-clock-parent.patch new file mode 100644 index 00000000000..822e970fdff --- /dev/null +++ b/queue-5.4/clk-ti-am33xx-fix-rtc-clock-parent.patch @@ -0,0 +1,41 @@ +From 54b07d3c3417b075a9e02a7062e6ea8110d53237 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 24 Apr 2020 18:23:01 +0300 +Subject: clk: ti: am33xx: fix RTC clock parent + +From: Tero Kristo + +[ Upstream commit dc6dbd51009fc412729c307161f442c0a08618f4 ] + +Right now, trying to use RTC purely with the ti-sysc / clkctrl framework +fails to enable the RTC module properly. Based on experimentation, this +appears to be because RTC is sourced from the clkdiv32k optional clock. +TRM is not very clear on this topic, but fix the RTC to use the proper +source clock nevertheless. + +Reported-by: Tony Lindgren +Signed-off-by: Tero Kristo +Link: https://lkml.kernel.org/r/20200424152301.4018-1-t-kristo@ti.com +Acked-by: Tony Lindgren +Signed-off-by: Stephen Boyd +Signed-off-by: Sasha Levin +--- + drivers/clk/ti/clk-33xx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/clk/ti/clk-33xx.c b/drivers/clk/ti/clk-33xx.c +index a360d3109555..73f567d8022f 100644 +--- a/drivers/clk/ti/clk-33xx.c ++++ b/drivers/clk/ti/clk-33xx.c +@@ -212,7 +212,7 @@ static const struct omap_clkctrl_reg_data am3_mpu_clkctrl_regs[] __initconst = { + }; + + static const struct omap_clkctrl_reg_data am3_l4_rtc_clkctrl_regs[] __initconst = { +- { AM3_L4_RTC_RTC_CLKCTRL, NULL, CLKF_SW_SUP, "clk_32768_ck" }, ++ { AM3_L4_RTC_RTC_CLKCTRL, NULL, CLKF_SW_SUP, "clk-24mhz-clkctrl:0000:0" }, + { 0 }, + }; + +-- +2.25.1 + diff --git a/queue-5.4/csky-fixup-msa-highest-3-bits-mask.patch b/queue-5.4/csky-fixup-msa-highest-3-bits-mask.patch new file mode 100644 index 00000000000..3b6d9078b13 --- /dev/null +++ b/queue-5.4/csky-fixup-msa-highest-3-bits-mask.patch @@ -0,0 +1,58 @@ +From b0d0462ff153119d13f201b779ad9feb1c973cb6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 21 Apr 2020 15:56:28 +0800 +Subject: csky: Fixup msa highest 3 bits mask + +From: Liu Yibin + +[ Upstream commit 165f2d2858013253042809df082b8df7e34e86d7 ] + +Just as comment mentioned, the msa format: + + cr<30/31, 15> MSA register format: + 31 - 29 | 28 - 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 + BA Reserved SH WA B SO SEC C D V + +So we should shift 29 bits not 28 bits for mask + +Signed-off-by: Liu Yibin +Signed-off-by: Guo Ren +Signed-off-by: Sasha Levin +--- + arch/csky/abiv1/inc/abi/entry.h | 4 ++-- + arch/csky/abiv2/inc/abi/entry.h | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/csky/abiv1/inc/abi/entry.h b/arch/csky/abiv1/inc/abi/entry.h +index 5056ebb902d1..61d94ec7dd16 100644 +--- a/arch/csky/abiv1/inc/abi/entry.h ++++ b/arch/csky/abiv1/inc/abi/entry.h +@@ -167,8 +167,8 @@ + * BA Reserved C D V + */ + cprcr r6, cpcr30 +- lsri r6, 28 +- lsli r6, 28 ++ lsri r6, 29 ++ lsli r6, 29 + addi r6, 0xe + cpwcr r6, cpcr30 + +diff --git a/arch/csky/abiv2/inc/abi/entry.h b/arch/csky/abiv2/inc/abi/entry.h +index 111973c6c713..9023828ede97 100644 +--- a/arch/csky/abiv2/inc/abi/entry.h ++++ b/arch/csky/abiv2/inc/abi/entry.h +@@ -225,8 +225,8 @@ + */ + mfcr r6, cr<30, 15> /* Get MSA0 */ + 2: +- lsri r6, 28 +- lsli r6, 28 ++ lsri r6, 29 ++ lsli r6, 29 + addi r6, 0x1ce + mtcr r6, cr<30, 15> /* Set MSA0 */ + +-- +2.25.1 + diff --git a/queue-5.4/csky-fixup-perf-callchain-unwind.patch b/queue-5.4/csky-fixup-perf-callchain-unwind.patch new file mode 100644 index 00000000000..fa71d79f16f --- /dev/null +++ b/queue-5.4/csky-fixup-perf-callchain-unwind.patch @@ -0,0 +1,93 @@ +From 3a0d16a5f4cb694eef1da4f64693b6981be9d860 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 20 Apr 2020 12:55:23 +0800 +Subject: csky: Fixup perf callchain unwind + +From: Mao Han + +[ Upstream commit 229a0ddee1108a3f82a873e6cbbe35c92c540444 ] + + [ 5221.974084] Unable to handle kernel paging request at virtual address 0xfffff000, pc: 0x8002c18e + [ 5221.985929] Oops: 00000000 + [ 5221.989488] + [ 5221.989488] CURRENT PROCESS: + [ 5221.989488] + [ 5221.992877] COMM=callchain_test PID=11962 + [ 5221.995213] TEXT=00008000-000087e0 DATA=00009f1c-0000a018 BSS=0000a018-0000b000 + [ 5221.999037] USER-STACK=7fc18e20 KERNEL-STACK=be204680 + [ 5221.999037] + [ 5222.003292] PC: 0x8002c18e (perf_callchain_kernel+0x3e/0xd4) + [ 5222.007957] LR: 0x8002c198 (perf_callchain_kernel+0x48/0xd4) + [ 5222.074873] Call Trace: + [ 5222.074873] [<800a248e>] get_perf_callchain+0x20a/0x29c + [ 5222.074873] [<8009d964>] perf_callchain+0x64/0x80 + [ 5222.074873] [<8009dc1c>] perf_prepare_sample+0x29c/0x4b8 + [ 5222.074873] [<8009de6e>] perf_event_output_forward+0x36/0x98 + [ 5222.074873] [<800497e0>] search_exception_tables+0x20/0x44 + [ 5222.074873] [<8002cbb6>] do_page_fault+0x92/0x378 + [ 5222.074873] [<80098608>] __perf_event_overflow+0x54/0xdc + [ 5222.074873] [<80098778>] perf_swevent_hrtimer+0xe8/0x164 + [ 5222.074873] [<8002ddd0>] update_mmu_cache+0x0/0xd8 + [ 5222.074873] [<8002c014>] user_backtrace+0x58/0xc4 + [ 5222.074873] [<8002c0b4>] perf_callchain_user+0x34/0xd0 + [ 5222.074873] [<800a2442>] get_perf_callchain+0x1be/0x29c + [ 5222.074873] [<8009d964>] perf_callchain+0x64/0x80 + [ 5222.074873] [<8009d834>] perf_output_sample+0x78c/0x858 + [ 5222.074873] [<8009dc1c>] perf_prepare_sample+0x29c/0x4b8 + [ 5222.074873] [<8009de94>] perf_event_output_forward+0x5c/0x98 + [ 5222.097846] + [ 5222.097846] [<800a0300>] perf_event_exit_task+0x58/0x43c + [ 5222.097846] [<8006c874>] hrtimer_interrupt+0x104/0x2ec + [ 5222.097846] [<800a0300>] perf_event_exit_task+0x58/0x43c + [ 5222.097846] [<80437bb6>] dw_apb_clockevent_irq+0x2a/0x4c + [ 5222.097846] [<8006c770>] hrtimer_interrupt+0x0/0x2ec + [ 5222.097846] [<8005f2e4>] __handle_irq_event_percpu+0xac/0x19c + [ 5222.097846] [<80437bb6>] dw_apb_clockevent_irq+0x2a/0x4c + [ 5222.097846] [<8005f408>] handle_irq_event_percpu+0x34/0x88 + [ 5222.097846] [<8005f480>] handle_irq_event+0x24/0x64 + [ 5222.097846] [<8006218c>] handle_level_irq+0x68/0xdc + [ 5222.097846] [<8005ec76>] __handle_domain_irq+0x56/0xa8 + [ 5222.097846] [<80450e90>] ck_irq_handler+0xac/0xe4 + [ 5222.097846] [<80029012>] csky_do_IRQ+0x12/0x24 + [ 5222.097846] [<8002a3a0>] csky_irq+0x70/0x80 + [ 5222.097846] [<800ca612>] alloc_set_pte+0xd2/0x238 + [ 5222.097846] [<8002ddd0>] update_mmu_cache+0x0/0xd8 + [ 5222.097846] [<800a0340>] perf_event_exit_task+0x98/0x43c + +The original fp check doesn't base on the real kernal stack region. +Invalid fp address may cause kernel panic. + +Signed-off-by: Mao Han +Signed-off-by: Guo Ren +Signed-off-by: Sasha Levin +--- + arch/csky/kernel/perf_callchain.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/arch/csky/kernel/perf_callchain.c b/arch/csky/kernel/perf_callchain.c +index e68ff375c8f8..ab55e98ee8f6 100644 +--- a/arch/csky/kernel/perf_callchain.c ++++ b/arch/csky/kernel/perf_callchain.c +@@ -12,12 +12,17 @@ struct stackframe { + + static int unwind_frame_kernel(struct stackframe *frame) + { +- if (kstack_end((void *)frame->fp)) ++ unsigned long low = (unsigned long)task_stack_page(current); ++ unsigned long high = low + THREAD_SIZE; ++ ++ if (unlikely(frame->fp < low || frame->fp > high)) + return -EPERM; +- if (frame->fp & 0x3 || frame->fp < TASK_SIZE) ++ ++ if (kstack_end((void *)frame->fp) || frame->fp & 0x3) + return -EPERM; + + *frame = *(struct stackframe *)frame->fp; ++ + if (__kernel_text_address(frame->lr)) { + int graph = 0; + +-- +2.25.1 + diff --git a/queue-5.4/csky-fixup-raw_copy_from_user.patch b/queue-5.4/csky-fixup-raw_copy_from_user.patch new file mode 100644 index 00000000000..693e6e1dd7a --- /dev/null +++ b/queue-5.4/csky-fixup-raw_copy_from_user.patch @@ -0,0 +1,237 @@ +From b82563b5fb38bde5645e670847a71f98f1d72ac5 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 7 Apr 2020 02:40:11 +0100 +Subject: csky: Fixup raw_copy_from_user() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Al Viro + +[ Upstream commit 51bb38cb78363fdad1f89e87357b7bc73e39ba88 ] + +If raw_copy_from_user(to, from, N) returns K, callers expect +the first N - K bytes starting at to to have been replaced with +the contents of corresponding area starting at from and the last +K bytes of destination *left* *unmodified*. + +What arch/sky/lib/usercopy.c is doing is broken - it can lead to e.g. +data corruption on write(2). + +raw_copy_to_user() is inaccurate about return value, which is a bug, +but consequences are less drastic than for raw_copy_from_user(). +And just what are those access_ok() doing in there? I mean, look into +linux/uaccess.h; that's where we do that check (as well as zero tail +on failure in the callers that need zeroing). + +AFAICS, all of that shouldn't be hard to fix; something like a patch +below might make a useful starting point. + +I would suggest moving these macros into usercopy.c (they are never +used anywhere else) and possibly expanding them there; if you leave +them alive, please at least rename __copy_user_zeroing(). Again, +it must not zero anything on failed read. + +Said that, I'm not sure we won't be better off simply turning +usercopy.c into usercopy.S - all that is left there is a couple of +functions, each consisting only of inline asm. + +Guo Ren reply: + +Yes, raw_copy_from_user is wrong, it's no need zeroing code. + +unsigned long _copy_from_user(void *to, const void __user *from, +unsigned long n) +{ + unsigned long res = n; + might_fault(); + if (likely(access_ok(from, n))) { + kasan_check_write(to, n); + res = raw_copy_from_user(to, from, n); + } + if (unlikely(res)) + memset(to + (n - res), 0, res); + return res; +} +EXPORT_SYMBOL(_copy_from_user); + +You are right and access_ok() should be removed. + +but, how about: +do { +... + "2: stw %3, (%1, 0) \n" \ ++ " subi %0, 4 \n" \ + "9: stw %4, (%1, 4) \n" \ ++ " subi %0, 4 \n" \ + "10: stw %5, (%1, 8) \n" \ ++ " subi %0, 4 \n" \ + "11: stw %6, (%1, 12) \n" \ ++ " subi %0, 4 \n" \ + " addi %2, 16 \n" \ + " addi %1, 16 \n" \ + +Don't expand __ex_table + +AI Viro reply: + +Hey, I've no idea about the instruction scheduling on csky - +if that doesn't slow the things down, all the better. It's just +that copy_to_user() and friends are on fairly hot codepaths, +and in quite a few situations they will dominate the speed of +e.g. read(2). So I tried to keep the fast path unchanged. +Up to the architecture maintainers, obviously. Which would be +you... + +As for the fixups size increase (__ex_table size is unchanged)... +You have each of those macros expanded exactly once. +So the size is not a serious argument, IMO - useless complexity +would be, if it is, in fact, useless; the size... not really, +especially since those extra subi will at least offset it. + +Again, up to you - asm optimizations of (essentially) +memcpy()-style loops are tricky and can depend upon the +fairly subtle details of architecture. So even on something +I know reasonably well I would resort to direct experiments +if I can't pass the buck to architecture maintainers. + +It *is* worth optimizing - this is where read() from a file +that is already in page cache spends most of the time, etc. + +Guo Ren reply: + +Thx, after fixup some typo “sub %0, 4”, apply the patch. + +TODO: + - user copy/from codes are still need optimizing. + +Signed-off-by: Al Viro +Signed-off-by: Guo Ren +Signed-off-by: Sasha Levin +--- + arch/csky/include/asm/uaccess.h | 49 +++++++++++++++++---------------- + arch/csky/lib/usercopy.c | 8 ++---- + 2 files changed, 28 insertions(+), 29 deletions(-) + +diff --git a/arch/csky/include/asm/uaccess.h b/arch/csky/include/asm/uaccess.h +index eaa1c3403a42..60f8a4112588 100644 +--- a/arch/csky/include/asm/uaccess.h ++++ b/arch/csky/include/asm/uaccess.h +@@ -254,7 +254,7 @@ do { \ + + extern int __get_user_bad(void); + +-#define __copy_user(to, from, n) \ ++#define ___copy_to_user(to, from, n) \ + do { \ + int w0, w1, w2, w3; \ + asm volatile( \ +@@ -289,31 +289,34 @@ do { \ + " subi %0, 4 \n" \ + " br 3b \n" \ + "5: cmpnei %0, 0 \n" /* 1B */ \ +- " bf 8f \n" \ ++ " bf 13f \n" \ + " ldb %3, (%2, 0) \n" \ + "6: stb %3, (%1, 0) \n" \ + " addi %2, 1 \n" \ + " addi %1, 1 \n" \ + " subi %0, 1 \n" \ + " br 5b \n" \ +- "7: br 8f \n" \ ++ "7: subi %0, 4 \n" \ ++ "8: subi %0, 4 \n" \ ++ "12: subi %0, 4 \n" \ ++ " br 13f \n" \ + ".section __ex_table, \"a\" \n" \ + ".align 2 \n" \ +- ".long 2b, 7b \n" \ +- ".long 9b, 7b \n" \ +- ".long 10b, 7b \n" \ ++ ".long 2b, 13f \n" \ ++ ".long 4b, 13f \n" \ ++ ".long 6b, 13f \n" \ ++ ".long 9b, 12b \n" \ ++ ".long 10b, 8b \n" \ + ".long 11b, 7b \n" \ +- ".long 4b, 7b \n" \ +- ".long 6b, 7b \n" \ + ".previous \n" \ +- "8: \n" \ ++ "13: \n" \ + : "=r"(n), "=r"(to), "=r"(from), "=r"(w0), \ + "=r"(w1), "=r"(w2), "=r"(w3) \ + : "0"(n), "1"(to), "2"(from) \ + : "memory"); \ + } while (0) + +-#define __copy_user_zeroing(to, from, n) \ ++#define ___copy_from_user(to, from, n) \ + do { \ + int tmp; \ + int nsave; \ +@@ -356,22 +359,22 @@ do { \ + " addi %1, 1 \n" \ + " subi %0, 1 \n" \ + " br 5b \n" \ +- "8: mov %3, %0 \n" \ +- " movi %4, 0 \n" \ +- "9: stb %4, (%1, 0) \n" \ +- " addi %1, 1 \n" \ +- " subi %3, 1 \n" \ +- " cmpnei %3, 0 \n" \ +- " bt 9b \n" \ +- " br 7f \n" \ ++ "8: stw %3, (%1, 0) \n" \ ++ " subi %0, 4 \n" \ ++ " bf 7f \n" \ ++ "9: subi %0, 8 \n" \ ++ " bf 7f \n" \ ++ "13: stw %3, (%1, 8) \n" \ ++ " subi %0, 12 \n" \ ++ " bf 7f \n" \ + ".section __ex_table, \"a\" \n" \ + ".align 2 \n" \ +- ".long 2b, 8b \n" \ ++ ".long 2b, 7f \n" \ ++ ".long 4b, 7f \n" \ ++ ".long 6b, 7f \n" \ + ".long 10b, 8b \n" \ +- ".long 11b, 8b \n" \ +- ".long 12b, 8b \n" \ +- ".long 4b, 8b \n" \ +- ".long 6b, 8b \n" \ ++ ".long 11b, 9b \n" \ ++ ".long 12b,13b \n" \ + ".previous \n" \ + "7: \n" \ + : "=r"(n), "=r"(to), "=r"(from), "=r"(nsave), \ +diff --git a/arch/csky/lib/usercopy.c b/arch/csky/lib/usercopy.c +index 647a23986fb5..3c9bd645e643 100644 +--- a/arch/csky/lib/usercopy.c ++++ b/arch/csky/lib/usercopy.c +@@ -7,10 +7,7 @@ + unsigned long raw_copy_from_user(void *to, const void *from, + unsigned long n) + { +- if (access_ok(from, n)) +- __copy_user_zeroing(to, from, n); +- else +- memset(to, 0, n); ++ ___copy_from_user(to, from, n); + return n; + } + EXPORT_SYMBOL(raw_copy_from_user); +@@ -18,8 +15,7 @@ EXPORT_SYMBOL(raw_copy_from_user); + unsigned long raw_copy_to_user(void *to, const void *from, + unsigned long n) + { +- if (access_ok(to, n)) +- __copy_user(to, from, n); ++ ___copy_to_user(to, from, n); + return n; + } + EXPORT_SYMBOL(raw_copy_to_user); +-- +2.25.1 + diff --git a/queue-5.4/csky-fixup-remove-duplicate-irq_disable.patch b/queue-5.4/csky-fixup-remove-duplicate-irq_disable.patch new file mode 100644 index 00000000000..c908db3c3d0 --- /dev/null +++ b/queue-5.4/csky-fixup-remove-duplicate-irq_disable.patch @@ -0,0 +1,36 @@ +From 41a41003bf05ebbcfe919d933f2c92d419751da8 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 13 May 2020 15:54:15 +0800 +Subject: csky: Fixup remove duplicate irq_disable + +From: Liu Yibin + +[ Upstream commit 6633a5aa8eb6bda70eb3a9837efd28a67ccc6e0a ] + +Interrupt has been disabled in __schedule() with local_irq_disable() +and enabled in finish_task_switch->finish_lock_switch() with +local_irq_enabled(), So needn't to disable irq here. + +Signed-off-by: Liu Yibin +Signed-off-by: Guo Ren +Signed-off-by: Sasha Levin +--- + arch/csky/kernel/entry.S | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/arch/csky/kernel/entry.S b/arch/csky/kernel/entry.S +index a7a5b67df898..65c55f22532a 100644 +--- a/arch/csky/kernel/entry.S ++++ b/arch/csky/kernel/entry.S +@@ -318,8 +318,6 @@ ENTRY(__switch_to) + + mfcr a2, psr /* Save PSR value */ + stw a2, (a3, THREAD_SR) /* Save PSR in task struct */ +- bclri a2, 6 /* Disable interrupts */ +- mtcr a2, psr + + SAVE_SWITCH_STACK + +-- +2.25.1 + diff --git a/queue-5.4/drivers-net-hamradio-fix-suspicious-rcu-usage-warnin.patch b/queue-5.4/drivers-net-hamradio-fix-suspicious-rcu-usage-warnin.patch new file mode 100644 index 00000000000..2695c625a67 --- /dev/null +++ b/queue-5.4/drivers-net-hamradio-fix-suspicious-rcu-usage-warnin.patch @@ -0,0 +1,44 @@ +From 66871afc96d166b6afd9830467c19f92a6ebba58 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 14 May 2020 19:41:15 +0530 +Subject: drivers: net: hamradio: Fix suspicious RCU usage warning in + bpqether.c + +From: Madhuparna Bhowmik + +[ Upstream commit 95f59bf88bb75281cc626e283ecefdd5d5641427 ] + +This patch fixes the following warning: +============================= +WARNING: suspicious RCU usage +5.7.0-rc5-next-20200514-syzkaller #0 Not tainted +----------------------------- +drivers/net/hamradio/bpqether.c:149 RCU-list traversed in non-reader section!! + +Since rtnl lock is held, pass this cond in list_for_each_entry_rcu(). + +Reported-by: syzbot+bb82cafc737c002d11ca@syzkaller.appspotmail.com +Signed-off-by: Madhuparna Bhowmik +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/hamradio/bpqether.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c +index fbea6f232819..e2ad3c2e8df5 100644 +--- a/drivers/net/hamradio/bpqether.c ++++ b/drivers/net/hamradio/bpqether.c +@@ -127,7 +127,8 @@ static inline struct net_device *bpq_get_ax25_dev(struct net_device *dev) + { + struct bpqdev *bpq; + +- list_for_each_entry_rcu(bpq, &bpq_devices, bpq_list) { ++ list_for_each_entry_rcu(bpq, &bpq_devices, bpq_list, ++ lockdep_rtnl_is_held()) { + if (bpq->ethdev == dev) + return bpq->axdev; + } +-- +2.25.1 + diff --git a/queue-5.4/drm-amd-powerplay-perform-pg-ungate-prior-to-cg-unga.patch b/queue-5.4/drm-amd-powerplay-perform-pg-ungate-prior-to-cg-unga.patch new file mode 100644 index 00000000000..8af502c9ea5 --- /dev/null +++ b/queue-5.4/drm-amd-powerplay-perform-pg-ungate-prior-to-cg-unga.patch @@ -0,0 +1,64 @@ +From 22b875c6cd5dab08ac43009c2a3ecd45b3e1eec7 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 30 Apr 2020 14:38:39 +0800 +Subject: drm/amd/powerplay: perform PG ungate prior to CG ungate + +From: Evan Quan + +[ Upstream commit f4fcfa4282c1a1bf51475ebb0ffda623eebf1191 ] + +Since gfxoff should be disabled first before trying to access those +GC registers. + +Signed-off-by: Evan Quan +Reviewed-by: Alex Deucher +Signed-off-by: Alex Deucher +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 6 +++--- + drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +index 8bb5fbef7de0..9eb3a0dcd1f2 100644 +--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c ++++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +@@ -320,12 +320,12 @@ static void pp_dpm_en_umd_pstate(struct pp_hwmgr *hwmgr, + if (*level & profile_mode_mask) { + hwmgr->saved_dpm_level = hwmgr->dpm_level; + hwmgr->en_umd_pstate = true; +- amdgpu_device_ip_set_clockgating_state(hwmgr->adev, +- AMD_IP_BLOCK_TYPE_GFX, +- AMD_CG_STATE_UNGATE); + amdgpu_device_ip_set_powergating_state(hwmgr->adev, + AMD_IP_BLOCK_TYPE_GFX, + AMD_PG_STATE_UNGATE); ++ amdgpu_device_ip_set_clockgating_state(hwmgr->adev, ++ AMD_IP_BLOCK_TYPE_GFX, ++ AMD_CG_STATE_UNGATE); + } + } else { + /* exit umd pstate, restore level, enable gfx cg*/ +diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +index a066e9297777..b51a124e505a 100644 +--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c ++++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +@@ -1541,12 +1541,12 @@ static int smu_enable_umd_pstate(void *handle, + if (*level & profile_mode_mask) { + smu_dpm_ctx->saved_dpm_level = smu_dpm_ctx->dpm_level; + smu_dpm_ctx->enable_umd_pstate = true; +- amdgpu_device_ip_set_clockgating_state(smu->adev, +- AMD_IP_BLOCK_TYPE_GFX, +- AMD_CG_STATE_UNGATE); + amdgpu_device_ip_set_powergating_state(smu->adev, + AMD_IP_BLOCK_TYPE_GFX, + AMD_PG_STATE_UNGATE); ++ amdgpu_device_ip_set_clockgating_state(smu->adev, ++ AMD_IP_BLOCK_TYPE_GFX, ++ AMD_CG_STATE_UNGATE); + } + } else { + /* exit umd pstate, restore level, enable gfx cg*/ +-- +2.25.1 + diff --git a/queue-5.4/drm-amdgpu-drop-unnecessary-cancel_delayed_work_sync.patch b/queue-5.4/drm-amdgpu-drop-unnecessary-cancel_delayed_work_sync.patch new file mode 100644 index 00000000000..f512bb24c3e --- /dev/null +++ b/queue-5.4/drm-amdgpu-drop-unnecessary-cancel_delayed_work_sync.patch @@ -0,0 +1,73 @@ +From c954d7c65c4ed3c03552da713ccc953e7846f4f3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 30 Apr 2020 11:24:02 +0800 +Subject: drm/amdgpu: drop unnecessary cancel_delayed_work_sync on PG ungate + +From: Evan Quan + +[ Upstream commit 1fe48ec08d9f2e26d893a6c05bd6c99a3490f9ef ] + +As this is already properly handled in amdgpu_gfx_off_ctrl(). In fact, +this unnecessary cancel_delayed_work_sync may leave a small time window +for race condition and is dangerous. + +Signed-off-by: Evan Quan +Reviewed-by: Alex Deucher +Signed-off-by: Alex Deucher +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 +----- + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +++--------- + 2 files changed, 4 insertions(+), 14 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +index 14417cebe38b..6f118292e40f 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +@@ -4290,11 +4290,7 @@ static int gfx_v10_0_set_powergating_state(void *handle, + switch (adev->asic_type) { + case CHIP_NAVI10: + case CHIP_NAVI14: +- if (!enable) { +- amdgpu_gfx_off_ctrl(adev, false); +- cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work); +- } else +- amdgpu_gfx_off_ctrl(adev, true); ++ amdgpu_gfx_off_ctrl(adev, enable); + break; + default: + break; +diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +index c34ddaa65324..6004fdacc866 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +@@ -4839,10 +4839,9 @@ static int gfx_v9_0_set_powergating_state(void *handle, + switch (adev->asic_type) { + case CHIP_RAVEN: + case CHIP_RENOIR: +- if (!enable) { ++ if (!enable) + amdgpu_gfx_off_ctrl(adev, false); +- cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work); +- } ++ + if (adev->pg_flags & AMD_PG_SUPPORT_RLC_SMU_HS) { + gfx_v9_0_enable_sck_slow_down_on_power_up(adev, true); + gfx_v9_0_enable_sck_slow_down_on_power_down(adev, true); +@@ -4868,12 +4867,7 @@ static int gfx_v9_0_set_powergating_state(void *handle, + amdgpu_gfx_off_ctrl(adev, true); + break; + case CHIP_VEGA12: +- if (!enable) { +- amdgpu_gfx_off_ctrl(adev, false); +- cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work); +- } else { +- amdgpu_gfx_off_ctrl(adev, true); +- } ++ amdgpu_gfx_off_ctrl(adev, enable); + break; + default: + break; +-- +2.25.1 + diff --git a/queue-5.4/drm-amdgpu-use-gem-obj-reference-for-kfd-bos.patch b/queue-5.4/drm-amdgpu-use-gem-obj-reference-for-kfd-bos.patch new file mode 100644 index 00000000000..5bb73e134cb --- /dev/null +++ b/queue-5.4/drm-amdgpu-use-gem-obj-reference-for-kfd-bos.patch @@ -0,0 +1,55 @@ +From ab5e25c1888c0c45f6e2f54a419f825ae8629e3c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 May 2020 14:02:43 -0400 +Subject: drm/amdgpu: Use GEM obj reference for KFD BOs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Felix Kuehling + +[ Upstream commit 39b3128d7ffd44e400e581e6f49e88cb42bef9a1 ] + +Releasing the AMDGPU BO ref directly leads to problems when BOs were +exported as DMA bufs. Releasing the GEM reference makes sure that the +AMDGPU/TTM BO is not freed too early. + +Also take a GEM reference when importing BOs from DMABufs to keep +references to imported BOs balances properly. + +Signed-off-by: Felix Kuehling +Tested-by: Alex Sierra +Acked-by: Christian König +Reviewed-by: Alex Sierra +Signed-off-by: Alex Deucher +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +index 6d021ecc8d59..edb561baf8b9 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +@@ -1288,7 +1288,7 @@ int amdgpu_amdkfd_gpuvm_free_memory_of_gpu( + } + + /* Free the BO*/ +- amdgpu_bo_unref(&mem->bo); ++ drm_gem_object_put_unlocked(&mem->bo->tbo.base); + mutex_destroy(&mem->lock); + kfree(mem); + +@@ -1630,7 +1630,8 @@ int amdgpu_amdkfd_gpuvm_import_dmabuf(struct kgd_dev *kgd, + AMDGPU_VM_PAGE_READABLE | AMDGPU_VM_PAGE_WRITEABLE | + AMDGPU_VM_PAGE_EXECUTABLE | AMDGPU_VM_MTYPE_NC; + +- (*mem)->bo = amdgpu_bo_ref(bo); ++ drm_gem_object_get(&bo->tbo.base); ++ (*mem)->bo = bo; + (*mem)->va = va; + (*mem)->domain = (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM) ? + AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT; +-- +2.25.1 + diff --git a/queue-5.4/gfs2-don-t-call-quota_unhold-if-quotas-are-not-locke.patch b/queue-5.4/gfs2-don-t-call-quota_unhold-if-quotas-are-not-locke.patch new file mode 100644 index 00000000000..3236898422c --- /dev/null +++ b/queue-5.4/gfs2-don-t-call-quota_unhold-if-quotas-are-not-locke.patch @@ -0,0 +1,46 @@ +From 9770d5c15d378a2c3e70bf014eb6e39c23fe9106 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 May 2020 11:55:03 -0500 +Subject: gfs2: don't call quota_unhold if quotas are not locked + +From: Bob Peterson + +[ Upstream commit c9cb9e381985bbbe8acd2695bbe6bd24bf06b81c ] + +Before this patch, function gfs2_quota_unlock checked if quotas are +turned off, and if so, it branched to label out, which called +gfs2_quota_unhold. With the new system of gfs2_qa_get and put, we +no longer want to call gfs2_quota_unhold or we won't balance our +gets and puts. + +Signed-off-by: Bob Peterson +Signed-off-by: Andreas Gruenbacher +Signed-off-by: Sasha Levin +--- + fs/gfs2/quota.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c +index cbee745169b8..91ca4920bf03 100644 +--- a/fs/gfs2/quota.c ++++ b/fs/gfs2/quota.c +@@ -1113,7 +1113,7 @@ void gfs2_quota_unlock(struct gfs2_inode *ip) + int found; + + if (!test_and_clear_bit(GIF_QD_LOCKED, &ip->i_flags)) +- goto out; ++ return; + + for (x = 0; x < ip->i_qadata->qa_qd_num; x++) { + struct gfs2_quota_data *qd; +@@ -1150,7 +1150,6 @@ void gfs2_quota_unlock(struct gfs2_inode *ip) + qd_unlock(qda[x]); + } + +-out: + gfs2_quota_unhold(ip); + } + +-- +2.25.1 + diff --git a/queue-5.4/gfs2-grab-glock-reference-sooner-in-gfs2_add_revoke.patch b/queue-5.4/gfs2-grab-glock-reference-sooner-in-gfs2_add_revoke.patch new file mode 100644 index 00000000000..9ce606fd54b --- /dev/null +++ b/queue-5.4/gfs2-grab-glock-reference-sooner-in-gfs2_add_revoke.patch @@ -0,0 +1,44 @@ +From 415e5b25be2834cde13965fab643ef24db1c1fe1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 May 2020 11:56:46 -0500 +Subject: gfs2: Grab glock reference sooner in gfs2_add_revoke + +From: Andreas Gruenbacher + +[ Upstream commit f4e2f5e1a527ce58fc9f85145b03704779a3123e ] + +This patch rearranges gfs2_add_revoke so that the extra glock +reference is added earlier on in the function to avoid races in which +the glock is freed before the new reference is taken. + +Signed-off-by: Andreas Gruenbacher +Signed-off-by: Bob Peterson +Signed-off-by: Sasha Levin +--- + fs/gfs2/log.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c +index 47bc27d4169e..110e5c4db819 100644 +--- a/fs/gfs2/log.c ++++ b/fs/gfs2/log.c +@@ -598,13 +598,13 @@ void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd) + struct buffer_head *bh = bd->bd_bh; + struct gfs2_glock *gl = bd->bd_gl; + ++ sdp->sd_log_num_revoke++; ++ if (atomic_inc_return(&gl->gl_revokes) == 1) ++ gfs2_glock_hold(gl); + bh->b_private = NULL; + bd->bd_blkno = bh->b_blocknr; + gfs2_remove_from_ail(bd); /* drops ref on bh */ + bd->bd_bh = NULL; +- sdp->sd_log_num_revoke++; +- if (atomic_inc_return(&gl->gl_revokes) == 1) +- gfs2_glock_hold(gl); + set_bit(GLF_LFLUSH, &gl->gl_flags); + list_add(&bd->bd_list, &sdp->sd_log_revokes); + } +-- +2.25.1 + diff --git a/queue-5.4/gfs2-move-privileged-user-check-to-gfs2_quota_lock_c.patch b/queue-5.4/gfs2-move-privileged-user-check-to-gfs2_quota_lock_c.patch new file mode 100644 index 00000000000..ff12bc97298 --- /dev/null +++ b/queue-5.4/gfs2-move-privileged-user-check-to-gfs2_quota_lock_c.patch @@ -0,0 +1,57 @@ +From ee01a0d0d6d11e6b49ab6703179054289fcf1fe7 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 May 2020 11:53:21 -0500 +Subject: gfs2: move privileged user check to gfs2_quota_lock_check + +From: Bob Peterson + +[ Upstream commit 4ed0c30811cb4d30ef89850b787a53a84d5d2bcb ] + +Before this patch, function gfs2_quota_lock checked if it was called +from a privileged user, and if so, it bypassed the quota check: +superuser can operate outside the quotas. +That's the wrong place for the check because the lock/unlock functions +are separate from the lock_check function, and you can do lock and +unlock without actually checking the quotas. + +This patch moves the check to gfs2_quota_lock_check. + +Signed-off-by: Bob Peterson +Signed-off-by: Andreas Gruenbacher +Signed-off-by: Sasha Levin +--- + fs/gfs2/quota.c | 3 +-- + fs/gfs2/quota.h | 3 ++- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c +index 7c016a082aa6..cbee745169b8 100644 +--- a/fs/gfs2/quota.c ++++ b/fs/gfs2/quota.c +@@ -1040,8 +1040,7 @@ int gfs2_quota_lock(struct gfs2_inode *ip, kuid_t uid, kgid_t gid) + u32 x; + int error = 0; + +- if (capable(CAP_SYS_RESOURCE) || +- sdp->sd_args.ar_quota != GFS2_QUOTA_ON) ++ if (sdp->sd_args.ar_quota != GFS2_QUOTA_ON) + return 0; + + error = gfs2_quota_hold(ip, uid, gid); +diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h +index 765627d9a91e..fe68a91dc16f 100644 +--- a/fs/gfs2/quota.h ++++ b/fs/gfs2/quota.h +@@ -44,7 +44,8 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip, + int ret; + + ap->allowed = UINT_MAX; /* Assume we are permitted a whole lot */ +- if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF) ++ if (capable(CAP_SYS_RESOURCE) || ++ sdp->sd_args.ar_quota == GFS2_QUOTA_OFF) + return 0; + ret = gfs2_quota_lock(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); + if (ret) +-- +2.25.1 + diff --git a/queue-5.4/gpio-tegra-mask-gpio-irqs-during-irq-shutdown.patch b/queue-5.4/gpio-tegra-mask-gpio-irqs-during-irq-shutdown.patch new file mode 100644 index 00000000000..57005a14811 --- /dev/null +++ b/queue-5.4/gpio-tegra-mask-gpio-irqs-during-irq-shutdown.patch @@ -0,0 +1,39 @@ +From f2d6111f8c875d443a407ba01f61cb6da769d94a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 27 Apr 2020 17:26:05 -0600 +Subject: gpio: tegra: mask GPIO IRQs during IRQ shutdown + +From: Stephen Warren + +[ Upstream commit 0cf253eed5d2bdf7bb3152457b38f39b012955f7 ] + +The driver currently leaves GPIO IRQs unmasked even when the GPIO IRQ +client has released the GPIO IRQ. This allows the HW to raise IRQs, and +SW to process them, after shutdown. Fix this by masking the IRQ when it's +shut down. This is usually taken care of by the irqchip core, but since +this driver has a custom irq_shutdown implementation, it must do this +explicitly itself. + +Signed-off-by: Stephen Warren +Link: https://lore.kernel.org/r/20200427232605.11608-1-swarren@wwwdotorg.org +Signed-off-by: Linus Walleij +Signed-off-by: Sasha Levin +--- + drivers/gpio/gpio-tegra.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c +index 8a01d3694b28..cecde5440a39 100644 +--- a/drivers/gpio/gpio-tegra.c ++++ b/drivers/gpio/gpio-tegra.c +@@ -365,6 +365,7 @@ static void tegra_gpio_irq_shutdown(struct irq_data *d) + struct tegra_gpio_info *tgi = bank->tgi; + unsigned int gpio = d->hwirq; + ++ tegra_gpio_irq_mask(d); + gpiochip_unlock_as_irq(&tgi->gc, gpio); + } + +-- +2.25.1 + diff --git a/queue-5.4/hwmon-nct7904-fix-incorrect-range-of-temperature-lim.patch b/queue-5.4/hwmon-nct7904-fix-incorrect-range-of-temperature-lim.patch new file mode 100644 index 00000000000..96956fc8bed --- /dev/null +++ b/queue-5.4/hwmon-nct7904-fix-incorrect-range-of-temperature-lim.patch @@ -0,0 +1,46 @@ +From ade98526f3aae45d80c673894e6c7341aa409747 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 12 May 2020 09:38:06 +0000 +Subject: hwmon: (nct7904) Fix incorrect range of temperature limit registers + +From: Amy Shih + +[ Upstream commit 7b2fd270af27edaf02acb41a7babe805a9441914 ] + +The format of temperature limitation registers are 8-bit 2's complement +and the range is -128~127. +Converts the reading value to signed char to fix the incorrect range +of temperature limitation registers. + +Signed-off-by: Amy Shih +Signed-off-by: Guenter Roeck +Signed-off-by: Sasha Levin +--- + drivers/hwmon/nct7904.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c +index 281c81edabc6..dfb122b5e1b7 100644 +--- a/drivers/hwmon/nct7904.c ++++ b/drivers/hwmon/nct7904.c +@@ -356,6 +356,7 @@ static int nct7904_read_temp(struct device *dev, u32 attr, int channel, + struct nct7904_data *data = dev_get_drvdata(dev); + int ret, temp; + unsigned int reg1, reg2, reg3; ++ s8 temps; + + switch (attr) { + case hwmon_temp_input: +@@ -461,7 +462,8 @@ static int nct7904_read_temp(struct device *dev, u32 attr, int channel, + + if (ret < 0) + return ret; +- *val = ret * 1000; ++ temps = ret; ++ *val = temps * 1000; + return 0; + } + +-- +2.25.1 + diff --git a/queue-5.4/ib-i40iw-remove-bogus-call-to-netdev_master_upper_de.patch b/queue-5.4/ib-i40iw-remove-bogus-call-to-netdev_master_upper_de.patch new file mode 100644 index 00000000000..5e86b932b10 --- /dev/null +++ b/queue-5.4/ib-i40iw-remove-bogus-call-to-netdev_master_upper_de.patch @@ -0,0 +1,92 @@ +From 35d1170eaaf35bbcfa3ab21bf80c3aac9fc18852 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 28 Apr 2020 16:15:11 +0300 +Subject: IB/i40iw: Remove bogus call to netdev_master_upper_dev_get() + +From: Denis V. Lunev + +[ Upstream commit 856ec7f64688387b100b7083cdf480ce3ac41227 ] + +Local variable netdev is not used in these calls. + +It should be noted, that this change is required to work in bonded mode. +Otherwise we would get the following assert: + + "RTNL: assertion failed at net/core/dev.c (5665)" + +With the calltrace as follows: + dump_stack+0x19/0x1b + netdev_master_upper_dev_get+0x61/0x70 + i40iw_addr_resolve_neigh+0x1e8/0x220 + i40iw_make_cm_node+0x296/0x700 + ? i40iw_find_listener.isra.10+0xcc/0x110 + i40iw_receive_ilq+0x3d4/0x810 + i40iw_puda_poll_completion+0x341/0x420 + i40iw_process_ceq+0xa5/0x280 + i40iw_ceq_dpc+0x1e/0x40 + tasklet_action+0x83/0x140 + __do_softirq+0x125/0x2bb + call_softirq+0x1c/0x30 + do_softirq+0x65/0xa0 + irq_exit+0x105/0x110 + do_IRQ+0x56/0xf0 + common_interrupt+0x16a/0x16a + ? cpuidle_enter_state+0x57/0xd0 + cpuidle_idle_call+0xde/0x230 + arch_cpu_idle+0xe/0xc0 + cpu_startup_entry+0x14a/0x1e0 + start_secondary+0x1f7/0x270 + start_cpu+0x5/0x14 + +Link: https://lore.kernel.org/r/20200428131511.11049-1-den@openvz.org +Signed-off-by: Denis V. Lunev +Acked-by: Shiraz Saleem +Signed-off-by: Jason Gunthorpe +Signed-off-by: Sasha Levin +--- + drivers/infiniband/hw/i40iw/i40iw_cm.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c +index 2d6a378e8560..b1df93b69df4 100644 +--- a/drivers/infiniband/hw/i40iw/i40iw_cm.c ++++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c +@@ -1987,7 +1987,6 @@ static int i40iw_addr_resolve_neigh(struct i40iw_device *iwdev, + struct rtable *rt; + struct neighbour *neigh; + int rc = arpindex; +- struct net_device *netdev = iwdev->netdev; + __be32 dst_ipaddr = htonl(dst_ip); + __be32 src_ipaddr = htonl(src_ip); + +@@ -1997,9 +1996,6 @@ static int i40iw_addr_resolve_neigh(struct i40iw_device *iwdev, + return rc; + } + +- if (netif_is_bond_slave(netdev)) +- netdev = netdev_master_upper_dev_get(netdev); +- + neigh = dst_neigh_lookup(&rt->dst, &dst_ipaddr); + + rcu_read_lock(); +@@ -2065,7 +2061,6 @@ static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev, + { + struct neighbour *neigh; + int rc = arpindex; +- struct net_device *netdev = iwdev->netdev; + struct dst_entry *dst; + struct sockaddr_in6 dst_addr; + struct sockaddr_in6 src_addr; +@@ -2086,9 +2081,6 @@ static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev, + return rc; + } + +- if (netif_is_bond_slave(netdev)) +- netdev = netdev_master_upper_dev_get(netdev); +- + neigh = dst_neigh_lookup(dst, dst_addr.sin6_addr.in6_u.u6_addr32); + + rcu_read_lock(); +-- +2.25.1 + diff --git a/queue-5.4/net-freescale-select-config_fixed_phy-where-needed.patch b/queue-5.4/net-freescale-select-config_fixed_phy-where-needed.patch new file mode 100644 index 00000000000..d96a0220dd8 --- /dev/null +++ b/queue-5.4/net-freescale-select-config_fixed_phy-where-needed.patch @@ -0,0 +1,66 @@ +From 40b530ff5ac05be3aeecfb245353f9eaca582c06 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 9 May 2020 14:04:52 +0200 +Subject: net: freescale: select CONFIG_FIXED_PHY where needed + +From: Arnd Bergmann + +[ Upstream commit 99352c79af3e5f2e4724abf37fa5a2a3299b1c81 ] + +I ran into a randconfig build failure with CONFIG_FIXED_PHY=m +and CONFIG_GIANFAR=y: + +x86_64-linux-ld: drivers/net/ethernet/freescale/gianfar.o:(.rodata+0x418): undefined reference to `fixed_phy_change_carrier' + +It seems the same thing can happen with dpaa and ucc_geth, so change +all three to do an explicit 'select FIXED_PHY'. + +The fixed-phy driver actually has an alternative stub function that +theoretically allows building network drivers when fixed-phy is +disabled, but I don't see how that would help here, as the drivers +presumably would not work then. + +Signed-off-by: Arnd Bergmann +Acked-by: Florian Fainelli +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/freescale/Kconfig | 2 ++ + drivers/net/ethernet/freescale/dpaa/Kconfig | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/drivers/net/ethernet/freescale/Kconfig b/drivers/net/ethernet/freescale/Kconfig +index 6a7e8993119f..941c7e667afc 100644 +--- a/drivers/net/ethernet/freescale/Kconfig ++++ b/drivers/net/ethernet/freescale/Kconfig +@@ -77,6 +77,7 @@ config UCC_GETH + depends on QUICC_ENGINE + select FSL_PQ_MDIO + select PHYLIB ++ select FIXED_PHY + ---help--- + This driver supports the Gigabit Ethernet mode of the QUICC Engine, + which is available on some Freescale SOCs. +@@ -90,6 +91,7 @@ config GIANFAR + depends on HAS_DMA + select FSL_PQ_MDIO + select PHYLIB ++ select FIXED_PHY + select CRC32 + ---help--- + This driver supports the Gigabit TSEC on the MPC83xx, MPC85xx, +diff --git a/drivers/net/ethernet/freescale/dpaa/Kconfig b/drivers/net/ethernet/freescale/dpaa/Kconfig +index 3b325733a4f8..0a54c7e0e4ae 100644 +--- a/drivers/net/ethernet/freescale/dpaa/Kconfig ++++ b/drivers/net/ethernet/freescale/dpaa/Kconfig +@@ -3,6 +3,7 @@ menuconfig FSL_DPAA_ETH + tristate "DPAA Ethernet" + depends on FSL_DPAA && FSL_FMAN + select PHYLIB ++ select FIXED_PHY + select FSL_FMAN_MAC + ---help--- + Data Path Acceleration Architecture Ethernet driver, +-- +2.25.1 + diff --git a/queue-5.4/net-microchip-encx24j600-add-missed-kthread_stop.patch b/queue-5.4/net-microchip-encx24j600-add-missed-kthread_stop.patch new file mode 100644 index 00000000000..013fe1a08e4 --- /dev/null +++ b/queue-5.4/net-microchip-encx24j600-add-missed-kthread_stop.patch @@ -0,0 +1,53 @@ +From 24738be6d82f295ebacc6045efa3e797859292e9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 7 May 2020 23:13:20 +0800 +Subject: net: microchip: encx24j600: add missed kthread_stop + +From: Chuhong Yuan + +[ Upstream commit ff8ce319e9c25e920d994cc35236f0bb32dfc8f3 ] + +This driver calls kthread_run() in probe, but forgets to call +kthread_stop() in probe failure and remove. +Add the missed kthread_stop() to fix it. + +Signed-off-by: Chuhong Yuan +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/microchip/encx24j600.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/microchip/encx24j600.c b/drivers/net/ethernet/microchip/encx24j600.c +index 52c41d11f565..c3a6edc0ddf6 100644 +--- a/drivers/net/ethernet/microchip/encx24j600.c ++++ b/drivers/net/ethernet/microchip/encx24j600.c +@@ -1070,7 +1070,7 @@ static int encx24j600_spi_probe(struct spi_device *spi) + if (unlikely(ret)) { + netif_err(priv, probe, ndev, "Error %d initializing card encx24j600 card\n", + ret); +- goto out_free; ++ goto out_stop; + } + + eidled = encx24j600_read_reg(priv, EIDLED); +@@ -1088,6 +1088,8 @@ static int encx24j600_spi_probe(struct spi_device *spi) + + out_unregister: + unregister_netdev(priv->ndev); ++out_stop: ++ kthread_stop(priv->kworker_task); + out_free: + free_netdev(ndev); + +@@ -1100,6 +1102,7 @@ static int encx24j600_spi_remove(struct spi_device *spi) + struct encx24j600_priv *priv = dev_get_drvdata(&spi->dev); + + unregister_netdev(priv->ndev); ++ kthread_stop(priv->kworker_task); + + free_netdev(priv->ndev); + +-- +2.25.1 + diff --git a/queue-5.4/riscv-stacktrace-fix-undefined-reference-to-walk_sta.patch b/queue-5.4/riscv-stacktrace-fix-undefined-reference-to-walk_sta.patch new file mode 100644 index 00000000000..9817a2b76d9 --- /dev/null +++ b/queue-5.4/riscv-stacktrace-fix-undefined-reference-to-walk_sta.patch @@ -0,0 +1,37 @@ +From 48acb5dd47569e277a759adbbf9dbebc569c9321 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 11 May 2020 10:19:53 +0800 +Subject: riscv: stacktrace: Fix undefined reference to `walk_stackframe' + +From: Kefeng Wang + +[ Upstream commit 0502bee37cdef755d63eee60236562e5605e2480 ] + +Drop static declaration to fix following build error if FRAME_POINTER disabled, + riscv64-linux-ld: arch/riscv/kernel/perf_callchain.o: in function `.L0': + perf_callchain.c:(.text+0x2b8): undefined reference to `walk_stackframe' + +Reported-by: Hulk Robot +Signed-off-by: Kefeng Wang +Signed-off-by: Palmer Dabbelt +Signed-off-by: Sasha Levin +--- + arch/riscv/kernel/stacktrace.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c +index 0940681d2f68..19e46f4160cc 100644 +--- a/arch/riscv/kernel/stacktrace.c ++++ b/arch/riscv/kernel/stacktrace.c +@@ -63,7 +63,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, + + #else /* !CONFIG_FRAME_POINTER */ + +-static void notrace walk_stackframe(struct task_struct *task, ++void notrace walk_stackframe(struct task_struct *task, + struct pt_regs *regs, bool (*fn)(unsigned long, void *), void *arg) + { + unsigned long sp, pc; +-- +2.25.1 + diff --git a/queue-5.4/samples-bpf-fix-build-error.patch b/queue-5.4/samples-bpf-fix-build-error.patch new file mode 100644 index 00000000000..0729df0fa03 --- /dev/null +++ b/queue-5.4/samples-bpf-fix-build-error.patch @@ -0,0 +1,42 @@ +From 0c4a9d57bb6d7f48952be749b9719fd39c63b26f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 11 May 2020 13:32:34 +0200 +Subject: samples: bpf: Fix build error + +From: Matteo Croce + +[ Upstream commit 23ad04669f81f958e9a4121b0266228d2eb3c357 ] + +GCC 10 is very strict about symbol clash, and lwt_len_hist_user contains +a symbol which clashes with libbpf: + +/usr/bin/ld: samples/bpf/lwt_len_hist_user.o:(.bss+0x0): multiple definition of `bpf_log_buf'; samples/bpf/bpf_load.o:(.bss+0x8c0): first defined here +collect2: error: ld returned 1 exit status + +bpf_log_buf here seems to be a leftover, so removing it. + +Signed-off-by: Matteo Croce +Signed-off-by: Alexei Starovoitov +Acked-by: Yonghong Song +Link: https://lore.kernel.org/bpf/20200511113234.80722-1-mcroce@redhat.com +Signed-off-by: Sasha Levin +--- + samples/bpf/lwt_len_hist_user.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/samples/bpf/lwt_len_hist_user.c b/samples/bpf/lwt_len_hist_user.c +index 587b68b1f8dd..430a4b7e353e 100644 +--- a/samples/bpf/lwt_len_hist_user.c ++++ b/samples/bpf/lwt_len_hist_user.c +@@ -15,8 +15,6 @@ + #define MAX_INDEX 64 + #define MAX_STARS 38 + +-char bpf_log_buf[BPF_LOG_BUF_SIZE]; +- + static void stars(char *str, long val, long max, int width) + { + int i; +-- +2.25.1 + diff --git a/queue-5.4/series b/queue-5.4/series index a8046a479cb..4585406a65a 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -29,3 +29,34 @@ net-tls-free-record-only-on-encryption-error.patch net-sun-fix-missing-release-regions-in-cas_init_one.patch net-mlx4_core-fix-a-memory-leak-bug.patch mlxsw-spectrum-fix-use-after-free-of-split-unsplit-type_set-in-case-reload-fails.patch +arm-dts-rockchip-fix-phy-nodename-for-rk3228-evb.patch +arm-dts-rockchip-fix-phy-nodename-for-rk3229-xms6.patch +arm64-dts-rockchip-fix-status-for-gmac2phy-in-rk3328.patch +arm64-dts-rockchip-swap-interrupts-interrupt-names-r.patch +arm-dts-rockchip-swap-clock-names-of-gpu-nodes.patch +arm-dts-rockchip-fix-pinctrl-sub-nodename-for-spi-in.patch +gpio-tegra-mask-gpio-irqs-during-irq-shutdown.patch +alsa-usb-audio-add-mapping-for-asrock-trx40-creator.patch +net-microchip-encx24j600-add-missed-kthread_stop.patch +gfs2-move-privileged-user-check-to-gfs2_quota_lock_c.patch +gfs2-don-t-call-quota_unhold-if-quotas-are-not-locke.patch +gfs2-grab-glock-reference-sooner-in-gfs2_add_revoke.patch +drm-amdgpu-drop-unnecessary-cancel_delayed_work_sync.patch +drm-amd-powerplay-perform-pg-ungate-prior-to-cg-unga.patch +drm-amdgpu-use-gem-obj-reference-for-kfd-bos.patch +cachefiles-fix-race-between-read_waiter-and-read_cop.patch +usb-dwc3-pci-enable-extcon-driver-for-intel-merrifie.patch +usb-phy-twl6030-usb-fix-a-resource-leak-in-an-error-.patch +usb-gadget-legacy-fix-redundant-initialization-warni.patch +net-freescale-select-config_fixed_phy-where-needed.patch +ib-i40iw-remove-bogus-call-to-netdev_master_upper_de.patch +riscv-stacktrace-fix-undefined-reference-to-walk_sta.patch +clk-ti-am33xx-fix-rtc-clock-parent.patch +csky-fixup-msa-highest-3-bits-mask.patch +csky-fixup-perf-callchain-unwind.patch +csky-fixup-remove-duplicate-irq_disable.patch +hwmon-nct7904-fix-incorrect-range-of-temperature-lim.patch +cifs-fix-null-pointer-check-in-cifs_read.patch +csky-fixup-raw_copy_from_user.patch +samples-bpf-fix-build-error.patch +drivers-net-hamradio-fix-suspicious-rcu-usage-warnin.patch diff --git a/queue-5.4/usb-dwc3-pci-enable-extcon-driver-for-intel-merrifie.patch b/queue-5.4/usb-dwc3-pci-enable-extcon-driver-for-intel-merrifie.patch new file mode 100644 index 00000000000..f6b2e45928f --- /dev/null +++ b/queue-5.4/usb-dwc3-pci-enable-extcon-driver-for-intel-merrifie.patch @@ -0,0 +1,36 @@ +From 90d0f2d5319d233cf25a2b4565714aceda6e94a6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 4 May 2020 12:33:52 +0300 +Subject: usb: dwc3: pci: Enable extcon driver for Intel Merrifield + +From: Andy Shevchenko + +[ Upstream commit 066c09593454e89bc605ffdff1c9810061f9b1e1 ] + +Intel Merrifield provides a DR support via PMIC which has its own +extcon driver. + +Add a property string to link to that driver. + +Signed-off-by: Andy Shevchenko +Signed-off-by: Felipe Balbi +Signed-off-by: Sasha Levin +--- + drivers/usb/dwc3/dwc3-pci.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c +index 7051611229c9..b67372737dc9 100644 +--- a/drivers/usb/dwc3/dwc3-pci.c ++++ b/drivers/usb/dwc3/dwc3-pci.c +@@ -114,6 +114,7 @@ static const struct property_entry dwc3_pci_intel_properties[] = { + + static const struct property_entry dwc3_pci_mrfld_properties[] = { + PROPERTY_ENTRY_STRING("dr_mode", "otg"), ++ PROPERTY_ENTRY_STRING("linux,extcon-name", "mrfld_bcove_pwrsrc"), + PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"), + {} + }; +-- +2.25.1 + diff --git a/queue-5.4/usb-gadget-legacy-fix-redundant-initialization-warni.patch b/queue-5.4/usb-gadget-legacy-fix-redundant-initialization-warni.patch new file mode 100644 index 00000000000..125a0e2ac01 --- /dev/null +++ b/queue-5.4/usb-gadget-legacy-fix-redundant-initialization-warni.patch @@ -0,0 +1,63 @@ +From a120cd18aa9b07663d131cd120b7fcc294837a33 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 3 Apr 2020 22:16:51 +0900 +Subject: usb: gadget: legacy: fix redundant initialization warnings + +From: Masahiro Yamada + +[ Upstream commit d13cce757954fa663c69845611957396843ed87a ] + +Fix the following cppcheck warnings: + +drivers/usb/gadget/legacy/inode.c:1364:8: style: Redundant initialization for 'value'. The initialized value is overwritten$ + value = -EOPNOTSUPP; + ^ +drivers/usb/gadget/legacy/inode.c:1331:15: note: value is initialized + int value = -EOPNOTSUPP; + ^ +drivers/usb/gadget/legacy/inode.c:1364:8: note: value is overwritten + value = -EOPNOTSUPP; + ^ +drivers/usb/gadget/legacy/inode.c:1817:8: style: Redundant initialization for 'value'. The initialized value is overwritten$ + value = -EINVAL; + ^ +drivers/usb/gadget/legacy/inode.c:1787:18: note: value is initialized + ssize_t value = len, length = len; + ^ +drivers/usb/gadget/legacy/inode.c:1817:8: note: value is overwritten + value = -EINVAL; + ^ +Acked-by: Alan Stern +Reported-by: kbuild test robot +Signed-off-by: Masahiro Yamada +Signed-off-by: Felipe Balbi + +Signed-off-by: Sasha Levin +--- + drivers/usb/gadget/legacy/inode.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c +index b47938dff1a2..238f555fe494 100644 +--- a/drivers/usb/gadget/legacy/inode.c ++++ b/drivers/usb/gadget/legacy/inode.c +@@ -1361,7 +1361,6 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) + + req->buf = dev->rbuf; + req->context = NULL; +- value = -EOPNOTSUPP; + switch (ctrl->bRequest) { + + case USB_REQ_GET_DESCRIPTOR: +@@ -1784,7 +1783,7 @@ static ssize_t + dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) + { + struct dev_data *dev = fd->private_data; +- ssize_t value = len, length = len; ++ ssize_t value, length = len; + unsigned total; + u32 tag; + char *kbuf; +-- +2.25.1 + diff --git a/queue-5.4/usb-phy-twl6030-usb-fix-a-resource-leak-in-an-error-.patch b/queue-5.4/usb-phy-twl6030-usb-fix-a-resource-leak-in-an-error-.patch new file mode 100644 index 00000000000..d554126efeb --- /dev/null +++ b/queue-5.4/usb-phy-twl6030-usb-fix-a-resource-leak-in-an-error-.patch @@ -0,0 +1,65 @@ +From 96ac542f13b38321c0e31be968e9ad69b405fe0b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 27 Apr 2020 22:21:16 +0200 +Subject: usb: phy: twl6030-usb: Fix a resource leak in an error handling path + in 'twl6030_usb_probe()' + +From: Christophe JAILLET + +[ Upstream commit f058764d19000d98aef72010468db1f69faf9fa0 ] + +A call to 'regulator_get()' is hidden in 'twl6030_usb_ldo_init()'. A +corresponding put must be performed in the error handling path, as +already done in the remove function. + +While at it, also move a 'free_irq()' call in the error handling path in +order to be consistent. + +Reviewed-by: Dan Carpenter +Signed-off-by: Christophe JAILLET +Signed-off-by: Felipe Balbi +Signed-off-by: Sasha Levin +--- + drivers/usb/phy/phy-twl6030-usb.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c +index bfebf1f2e991..9a7e655d5280 100644 +--- a/drivers/usb/phy/phy-twl6030-usb.c ++++ b/drivers/usb/phy/phy-twl6030-usb.c +@@ -377,7 +377,7 @@ static int twl6030_usb_probe(struct platform_device *pdev) + if (status < 0) { + dev_err(&pdev->dev, "can't get IRQ %d, err %d\n", + twl->irq1, status); +- return status; ++ goto err_put_regulator; + } + + status = request_threaded_irq(twl->irq2, NULL, twl6030_usb_irq, +@@ -386,8 +386,7 @@ static int twl6030_usb_probe(struct platform_device *pdev) + if (status < 0) { + dev_err(&pdev->dev, "can't get IRQ %d, err %d\n", + twl->irq2, status); +- free_irq(twl->irq1, twl); +- return status; ++ goto err_free_irq1; + } + + twl->asleep = 0; +@@ -396,6 +395,13 @@ static int twl6030_usb_probe(struct platform_device *pdev) + dev_info(&pdev->dev, "Initialized TWL6030 USB module\n"); + + return 0; ++ ++err_free_irq1: ++ free_irq(twl->irq1, twl); ++err_put_regulator: ++ regulator_put(twl->usb3v3); ++ ++ return status; + } + + static int twl6030_usb_remove(struct platform_device *pdev) +-- +2.25.1 +