]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2020 16:46:59 +0000 (17:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2020 16:46:59 +0000 (17:46 +0100)
added patches:
arm64-dts-meson-odroid-c2-disable-usb_otg-bus-to-avoid-power-failed-warning.patch
bluetooth-btusb-fix-pm-leak-in-error-case-of-setup.patch
bluetooth-delete-a-stray-unlock.patch
bluetooth-fix-memory-leak-in-hci_connect_le_scan.patch
dt-bindings-clock-renesas-rcar-usb2-clock-sel-fix-typo-in-example.patch
fix-compat-handling-of-ficlonerange-fideduperange-and-fs_ioc_fiemap.patch
media-flexcop-usb-ensure-eio-is-returned-on-error-condition.patch
media-usb-fix-memory-leak-in-af9005_identify_state.patch
regulator-ab8500-remove-ab8505-usb-regulator.patch
tty-serial-msm_serial-fix-lockup-for-sysrq-and-oops.patch

queue-4.19/arm64-dts-meson-odroid-c2-disable-usb_otg-bus-to-avoid-power-failed-warning.patch [new file with mode: 0644]
queue-4.19/bluetooth-btusb-fix-pm-leak-in-error-case-of-setup.patch [new file with mode: 0644]
queue-4.19/bluetooth-delete-a-stray-unlock.patch [new file with mode: 0644]
queue-4.19/bluetooth-fix-memory-leak-in-hci_connect_le_scan.patch [new file with mode: 0644]
queue-4.19/dt-bindings-clock-renesas-rcar-usb2-clock-sel-fix-typo-in-example.patch [new file with mode: 0644]
queue-4.19/fix-compat-handling-of-ficlonerange-fideduperange-and-fs_ioc_fiemap.patch [new file with mode: 0644]
queue-4.19/media-flexcop-usb-ensure-eio-is-returned-on-error-condition.patch [new file with mode: 0644]
queue-4.19/media-usb-fix-memory-leak-in-af9005_identify_state.patch [new file with mode: 0644]
queue-4.19/regulator-ab8500-remove-ab8505-usb-regulator.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/tty-serial-msm_serial-fix-lockup-for-sysrq-and-oops.patch [new file with mode: 0644]

diff --git a/queue-4.19/arm64-dts-meson-odroid-c2-disable-usb_otg-bus-to-avoid-power-failed-warning.patch b/queue-4.19/arm64-dts-meson-odroid-c2-disable-usb_otg-bus-to-avoid-power-failed-warning.patch
new file mode 100644 (file)
index 0000000..10d4565
--- /dev/null
@@ -0,0 +1,142 @@
+From 72c9b5f6f75fbc6c47e0a2d02bc3838a2a47c90a Mon Sep 17 00:00:00 2001
+From: Anand Moon <linux.amoon@gmail.com>
+Date: Mon, 2 Sep 2019 05:49:35 +0000
+Subject: arm64: dts: meson: odroid-c2: Disable usb_otg bus to avoid power failed warning
+
+From: Anand Moon <linux.amoon@gmail.com>
+
+commit 72c9b5f6f75fbc6c47e0a2d02bc3838a2a47c90a upstream.
+
+usb_otg bus needs to get initialize from the u-boot to be configured
+to used as power source to SBC or usb otg port will get configured
+as host device. Right now this support is missing in the u-boot and
+phy driver so to avoid power failed warning, we would disable this
+feature  until proper fix is found.
+
+[    2.716048] phy phy-c0000000.phy.0: USB ID detect failed!
+[    2.720186] phy phy-c0000000.phy.0: phy poweron failed --> -22
+[    2.726001] ------------[ cut here ]------------
+[    2.730583] WARNING: CPU: 0 PID: 12 at drivers/regulator/core.c:2039 _regulator_put+0x3c/0xe8
+[    2.738983] Modules linked in:
+[    2.742005] CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.2.9-1-ARCH #1
+[    2.748643] Hardware name: Hardkernel ODROID-C2 (DT)
+[    2.753566] Workqueue: events deferred_probe_work_func
+[    2.758649] pstate: 60000005 (nZCv daif -PAN -UAO)
+[    2.763394] pc : _regulator_put+0x3c/0xe8
+[    2.767361] lr : _regulator_put+0x3c/0xe8
+[    2.771326] sp : ffff000011aa3a50
+[    2.774604] x29: ffff000011aa3a50 x28: ffff80007ed1b600
+[    2.779865] x27: ffff80007f7036a8 x26: ffff80007f7036a8
+[    2.785126] x25: 0000000000000000 x24: ffff000011a44458
+[    2.790387] x23: ffff000011344218 x22: 0000000000000009
+[    2.795649] x21: ffff000011aa3b68 x20: ffff80007ed1b500
+[    2.800910] x19: ffff80007ed1b500 x18: 0000000000000010
+[    2.806171] x17: 000000005be5943c x16: 00000000f1c73b29
+[    2.811432] x15: ffffffffffffffff x14: ffff0000117396c8
+[    2.816694] x13: ffff000091aa37a7 x12: ffff000011aa37af
+[    2.821955] x11: ffff000011763000 x10: ffff000011aa3730
+[    2.827216] x9 : 00000000ffffffd0 x8 : ffff000010871760
+[    2.832477] x7 : 00000000000000d0 x6 : ffff0000119d151b
+[    2.837739] x5 : 000000000000000f x4 : 0000000000000000
+[    2.843000] x3 : 0000000000000000 x2 : 38104b2678c20100
+[    2.848261] x1 : 0000000000000000 x0 : 0000000000000024
+[    2.853523] Call trace:
+[    2.855940]  _regulator_put+0x3c/0xe8
+[    2.859562]  regulator_put+0x34/0x48
+[    2.863098]  regulator_bulk_free+0x40/0x58
+[    2.867153]  devm_regulator_bulk_release+0x24/0x30
+[    2.871896]  release_nodes+0x1f0/0x2e0
+[    2.875604]  devres_release_all+0x64/0xa4
+[    2.879571]  really_probe+0x1c8/0x3e0
+[    2.883194]  driver_probe_device+0xe4/0x138
+[    2.887334]  __device_attach_driver+0x90/0x110
+[    2.891733]  bus_for_each_drv+0x8c/0xd8
+[    2.895527]  __device_attach+0xdc/0x160
+[    2.899322]  device_initial_probe+0x24/0x30
+[    2.903463]  bus_probe_device+0x9c/0xa8
+[    2.907258]  deferred_probe_work_func+0xa0/0xf0
+[    2.911745]  process_one_work+0x1b4/0x408
+[    2.915711]  worker_thread+0x54/0x4b8
+[    2.919334]  kthread+0x12c/0x130
+[    2.922526]  ret_from_fork+0x10/0x1c
+[    2.926060] ---[ end trace 51a68f4c0035d6c0 ]---
+[    2.930691] ------------[ cut here ]------------
+[    2.935242] WARNING: CPU: 0 PID: 12 at drivers/regulator/core.c:2039 _regulator_put+0x3c/0xe8
+[    2.943653] Modules linked in:
+[    2.946675] CPU: 0 PID: 12 Comm: kworker/0:1 Tainted: G        W         5.2.9-1-ARCH #1
+[    2.954694] Hardware name: Hardkernel ODROID-C2 (DT)
+[    2.959613] Workqueue: events deferred_probe_work_func
+[    2.964700] pstate: 60000005 (nZCv daif -PAN -UAO)
+[    2.969445] pc : _regulator_put+0x3c/0xe8
+[    2.973412] lr : _regulator_put+0x3c/0xe8
+[    2.977377] sp : ffff000011aa3a50
+[    2.980655] x29: ffff000011aa3a50 x28: ffff80007ed1b600
+[    2.985916] x27: ffff80007f7036a8 x26: ffff80007f7036a8
+[    2.991177] x25: 0000000000000000 x24: ffff000011a44458
+[    2.996439] x23: ffff000011344218 x22: 0000000000000009
+[    3.001700] x21: ffff000011aa3b68 x20: ffff80007ed1bd00
+[    3.006961] x19: ffff80007ed1bd00 x18: 0000000000000010
+[    3.012222] x17: 000000005be5943c x16: 00000000f1c73b29
+[    3.017484] x15: ffffffffffffffff x14: ffff0000117396c8
+[    3.022745] x13: ffff000091aa37a7 x12: ffff000011aa37af
+[    3.028006] x11: ffff000011763000 x10: ffff000011aa3730
+[    3.033267] x9 : 00000000ffffffd0 x8 : ffff000010871760
+[    3.038528] x7 : 00000000000000fd x6 : ffff0000119d151b
+[    3.043790] x5 : 000000000000000f x4 : 0000000000000000
+[    3.049051] x3 : 0000000000000000 x2 : 38104b2678c20100
+[    3.054312] x1 : 0000000000000000 x0 : 0000000000000024
+[    3.059574] Call trace:
+[    3.061991]  _regulator_put+0x3c/0xe8
+[    3.065613]  regulator_put+0x34/0x48
+[    3.069149]  regulator_bulk_free+0x40/0x58
+[    3.073203]  devm_regulator_bulk_release+0x24/0x30
+[    3.077947]  release_nodes+0x1f0/0x2e0
+[    3.081655]  devres_release_all+0x64/0xa4
+[    3.085622]  really_probe+0x1c8/0x3e0
+[    3.089245]  driver_probe_device+0xe4/0x138
+[    3.093385]  __device_attach_driver+0x90/0x110
+[    3.097784]  bus_for_each_drv+0x8c/0xd8
+[    3.101578]  __device_attach+0xdc/0x160
+[    3.105373]  device_initial_probe+0x24/0x30
+[    3.109514]  bus_probe_device+0x9c/0xa8
+[    3.113309]  deferred_probe_work_func+0xa0/0xf0
+[    3.117796]  process_one_work+0x1b4/0x408
+[    3.121762]  worker_thread+0x54/0x4b8
+[    3.125384]  kthread+0x12c/0x130
+[    3.128575]  ret_from_fork+0x10/0x1c
+[    3.132110] ---[ end trace 51a68f4c0035d6c1 ]---
+[    3.136753] dwc2: probe of c9000000.usb failed with error -22
+
+Fixes: 5a0803bd5ae2 ("ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes")
+Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+Cc: Jerome Brunet <jbrunet@baylibre.com>
+Cc: Neil Armstrong <narmstrong@baylibre.com>
+Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+Signed-off-by: Anand Moon <linux.amoon@gmail.com>
+Signed-off-by: Kevin Hilman <khilman@baylibre.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+@@ -293,7 +293,7 @@
+ };
+ &usb0_phy {
+-      status = "okay";
++      status = "disabled";
+       phy-supply = <&usb_otg_pwr>;
+ };
+@@ -303,7 +303,7 @@
+ };
+ &usb0 {
+-      status = "okay";
++      status = "disabled";
+ };
+ &usb1 {
diff --git a/queue-4.19/bluetooth-btusb-fix-pm-leak-in-error-case-of-setup.patch b/queue-4.19/bluetooth-btusb-fix-pm-leak-in-error-case-of-setup.patch
new file mode 100644 (file)
index 0000000..95fdc36
--- /dev/null
@@ -0,0 +1,41 @@
+From 3d44a6fd0775e6215e836423e27f8eedf8c871ea Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Thu, 14 Nov 2019 16:01:18 +0100
+Subject: Bluetooth: btusb: fix PM leak in error case of setup
+
+From: Oliver Neukum <oneukum@suse.com>
+
+commit 3d44a6fd0775e6215e836423e27f8eedf8c871ea upstream.
+
+If setup() fails a reference for runtime PM has already
+been taken. Proper use of the error handling in btusb_open()is needed.
+You cannot just return.
+
+Fixes: ace31982585a3 ("Bluetooth: btusb: Add setup callback for chip init on USB")
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bluetooth/btusb.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -1138,7 +1138,7 @@ static int btusb_open(struct hci_dev *hd
+       if (data->setup_on_usb) {
+               err = data->setup_on_usb(hdev);
+               if (err < 0)
+-                      return err;
++                      goto setup_fail;
+       }
+       data->intf->needs_remote_wakeup = 1;
+@@ -1170,6 +1170,7 @@ done:
+ failed:
+       clear_bit(BTUSB_INTR_RUNNING, &data->flags);
++setup_fail:
+       usb_autopm_put_interface(data->intf);
+       return err;
+ }
diff --git a/queue-4.19/bluetooth-delete-a-stray-unlock.patch b/queue-4.19/bluetooth-delete-a-stray-unlock.patch
new file mode 100644 (file)
index 0000000..3d8ec4e
--- /dev/null
@@ -0,0 +1,36 @@
+From df66499a1fab340c167250a5743931dc50d5f0fa Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Tue, 19 Nov 2019 09:17:05 +0300
+Subject: Bluetooth: delete a stray unlock
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit df66499a1fab340c167250a5743931dc50d5f0fa upstream.
+
+We used to take a lock in amp_physical_cfm() but then we moved it to
+the caller function.  Unfortunately the unlock on this error path was
+overlooked so it leads to a double unlock.
+
+Fixes: a514b17fab51 ("Bluetooth: Refactor locking in amp_physical_cfm")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/bluetooth/l2cap_core.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/net/bluetooth/l2cap_core.c
++++ b/net/bluetooth/l2cap_core.c
+@@ -4918,10 +4918,8 @@ void __l2cap_physical_cfm(struct l2cap_c
+       BT_DBG("chan %p, result %d, local_amp_id %d, remote_amp_id %d",
+              chan, result, local_amp_id, remote_amp_id);
+-      if (chan->state == BT_DISCONN || chan->state == BT_CLOSED) {
+-              l2cap_chan_unlock(chan);
++      if (chan->state == BT_DISCONN || chan->state == BT_CLOSED)
+               return;
+-      }
+       if (chan->state != BT_CONNECTED) {
+               l2cap_do_create(chan, result, local_amp_id, remote_amp_id);
diff --git a/queue-4.19/bluetooth-fix-memory-leak-in-hci_connect_le_scan.patch b/queue-4.19/bluetooth-fix-memory-leak-in-hci_connect_le_scan.patch
new file mode 100644 (file)
index 0000000..f0906d0
--- /dev/null
@@ -0,0 +1,36 @@
+From d088337c38a5cd8f0230fbf2d514ff7672f9d0d3 Mon Sep 17 00:00:00 2001
+From: Navid Emamdoost <navid.emamdoost@gmail.com>
+Date: Thu, 21 Nov 2019 14:20:36 -0600
+Subject: Bluetooth: Fix memory leak in hci_connect_le_scan
+
+From: Navid Emamdoost <navid.emamdoost@gmail.com>
+
+commit d088337c38a5cd8f0230fbf2d514ff7672f9d0d3 upstream.
+
+In the implementation of hci_connect_le_scan() when conn is added via
+hci_conn_add(), if hci_explicit_conn_params_set() fails the allocated
+memory for conn is leaked. Use hci_conn_del() to release it.
+
+Fixes: f75113a26008 ("Bluetooth: add hci_connect_le_scan")
+Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/bluetooth/hci_conn.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/net/bluetooth/hci_conn.c
++++ b/net/bluetooth/hci_conn.c
+@@ -1173,8 +1173,10 @@ struct hci_conn *hci_connect_le_scan(str
+       if (!conn)
+               return ERR_PTR(-ENOMEM);
+-      if (hci_explicit_conn_params_set(hdev, dst, dst_type) < 0)
++      if (hci_explicit_conn_params_set(hdev, dst, dst_type) < 0) {
++              hci_conn_del(conn);
+               return ERR_PTR(-EBUSY);
++      }
+       conn->state = BT_CONNECT;
+       set_bit(HCI_CONN_SCANNING, &conn->flags);
diff --git a/queue-4.19/dt-bindings-clock-renesas-rcar-usb2-clock-sel-fix-typo-in-example.patch b/queue-4.19/dt-bindings-clock-renesas-rcar-usb2-clock-sel-fix-typo-in-example.patch
new file mode 100644 (file)
index 0000000..8fcbdb3
--- /dev/null
@@ -0,0 +1,35 @@
+From 830dbce7c76ea529decac7d23b808c1e7da3d891 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+Date: Wed, 16 Oct 2019 16:56:50 +0200
+Subject: dt-bindings: clock: renesas: rcar-usb2-clock-sel: Fix typo in example
+
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+
+commit 830dbce7c76ea529decac7d23b808c1e7da3d891 upstream.
+
+The documented compatible value for R-Car H3 is
+"renesas,r8a7795-rcar-usb2-clock-sel", not
+"renesas,r8a77950-rcar-usb2-clock-sel".
+
+Fixes: 311accb64570db45 ("clk: renesas: rcar-usb2-clock-sel: Add R-Car USB 2.0 clock selector PHY")
+Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+Acked-by: Rob Herring <robh@kernel.org>
+Link: https://lore.kernel.org/r/20191016145650.30003-1-geert+renesas@glider.be
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.txt |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.txt
++++ b/Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.txt
+@@ -46,7 +46,7 @@ Required properties:
+ Example (R-Car H3):
+       usb2_clksel: clock-controller@e6590630 {
+-              compatible = "renesas,r8a77950-rcar-usb2-clock-sel",
++              compatible = "renesas,r8a7795-rcar-usb2-clock-sel",
+                            "renesas,rcar-gen3-usb2-clock-sel";
+               reg = <0 0xe6590630 0 0x02>;
+               clocks = <&cpg CPG_MOD 703>, <&usb_extal>, <&usb_xtal>;
diff --git a/queue-4.19/fix-compat-handling-of-ficlonerange-fideduperange-and-fs_ioc_fiemap.patch b/queue-4.19/fix-compat-handling-of-ficlonerange-fideduperange-and-fs_ioc_fiemap.patch
new file mode 100644 (file)
index 0000000..89ff2d6
--- /dev/null
@@ -0,0 +1,38 @@
+From 6b2daec19094a90435abe67d16fb43b1a5527254 Mon Sep 17 00:00:00 2001
+From: Al Viro <viro@zeniv.linux.org.uk>
+Date: Sun, 21 Apr 2019 18:53:50 -0400
+Subject: fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAP
+
+From: Al Viro <viro@zeniv.linux.org.uk>
+
+commit 6b2daec19094a90435abe67d16fb43b1a5527254 upstream.
+
+Unlike FICLONE, all of those take a pointer argument; they do need
+compat_ptr() applied to arg.
+
+Fixes: d79bdd52d8be ("vfs: wire up compat ioctl for CLONE/CLONE_RANGE")
+Fixes: 54dbc1517237 ("vfs: hoist the btrfs deduplication ioctl to the vfs")
+Fixes: ceac204e1da9 ("fs: make fiemap work from compat_ioctl")
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/compat_ioctl.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/fs/compat_ioctl.c
++++ b/fs/compat_ioctl.c
+@@ -1401,10 +1401,11 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned i
+ #endif
+       case FICLONE:
++              goto do_ioctl;
+       case FICLONERANGE:
+       case FIDEDUPERANGE:
+       case FS_IOC_FIEMAP:
+-              goto do_ioctl;
++              goto found_handler;
+       case FIBMAP:
+       case FIGETBSZ:
diff --git a/queue-4.19/media-flexcop-usb-ensure-eio-is-returned-on-error-condition.patch b/queue-4.19/media-flexcop-usb-ensure-eio-is-returned-on-error-condition.patch
new file mode 100644 (file)
index 0000000..7d2a066
--- /dev/null
@@ -0,0 +1,37 @@
+From 74a96b51a36de4d86660fbc56b05d86668162d6b Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Fri, 25 Oct 2019 15:33:39 +0200
+Subject: media: flexcop-usb: ensure -EIO is returned on error condition
+
+From: Colin Ian King <colin.king@canonical.com>
+
+commit 74a96b51a36de4d86660fbc56b05d86668162d6b upstream.
+
+An earlier commit hard coded a return 0 to function flexcop_usb_i2c_req
+even though the an -EIO was intended to be returned in the case where
+ret != buflen.  Fix this by replacing the return 0 with the return of
+ret to return the error return code.
+
+Addresses-Coverity: ("Unused value")
+
+Fixes: b430eaba0be5 ("[media] flexcop-usb: don't use stack for DMA")
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Signed-off-by: Sean Young <sean@mess.org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/usb/b2c2/flexcop-usb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/usb/b2c2/flexcop-usb.c
++++ b/drivers/media/usb/b2c2/flexcop-usb.c
+@@ -294,7 +294,7 @@ static int flexcop_usb_i2c_req(struct fl
+       mutex_unlock(&fc_usb->data_mutex);
+-      return 0;
++      return ret;
+ }
+ /* actual bus specific access functions,
diff --git a/queue-4.19/media-usb-fix-memory-leak-in-af9005_identify_state.patch b/queue-4.19/media-usb-fix-memory-leak-in-af9005_identify_state.patch
new file mode 100644 (file)
index 0000000..06af2ee
--- /dev/null
@@ -0,0 +1,37 @@
+From 2289adbfa559050d2a38bcd9caac1c18b800e928 Mon Sep 17 00:00:00 2001
+From: Navid Emamdoost <navid.emamdoost@gmail.com>
+Date: Wed, 9 Oct 2019 12:01:47 -0300
+Subject: media: usb: fix memory leak in af9005_identify_state
+
+From: Navid Emamdoost <navid.emamdoost@gmail.com>
+
+commit 2289adbfa559050d2a38bcd9caac1c18b800e928 upstream.
+
+In af9005_identify_state when returning -EIO the allocated buffer should
+be released. Replace the "return -EIO" with assignment into ret and move
+deb_info() under a check.
+
+Fixes: af4e067e1dcf ("V4L/DVB (5625): Add support for the AF9005 demodulator from Afatech")
+Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/usb/dvb-usb/af9005.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/usb/dvb-usb/af9005.c
++++ b/drivers/media/usb/dvb-usb/af9005.c
+@@ -985,8 +985,9 @@ static int af9005_identify_state(struct
+       else if (reply == 0x02)
+               *cold = 0;
+       else
+-              return -EIO;
+-      deb_info("Identify state cold = %d\n", *cold);
++              ret = -EIO;
++      if (!ret)
++              deb_info("Identify state cold = %d\n", *cold);
+ err:
+       kfree(buf);
diff --git a/queue-4.19/regulator-ab8500-remove-ab8505-usb-regulator.patch b/queue-4.19/regulator-ab8500-remove-ab8505-usb-regulator.patch
new file mode 100644 (file)
index 0000000..e9b5abb
--- /dev/null
@@ -0,0 +1,75 @@
+From 99c4f70df3a6446c56ca817c2d0f9c12d85d4e7c Mon Sep 17 00:00:00 2001
+From: Stephan Gerhold <stephan@gerhold.net>
+Date: Wed, 6 Nov 2019 18:31:24 +0100
+Subject: regulator: ab8500: Remove AB8505 USB regulator
+
+From: Stephan Gerhold <stephan@gerhold.net>
+
+commit 99c4f70df3a6446c56ca817c2d0f9c12d85d4e7c upstream.
+
+The USB regulator was removed for AB8500 in
+commit 41a06aa738ad ("regulator: ab8500: Remove USB regulator").
+It was then added for AB8505 in
+commit 547f384f33db ("regulator: ab8500: add support for ab8505").
+
+However, there was never an entry added for it in
+ab8505_regulator_match. This causes all regulators after it
+to be initialized with the wrong device tree data, eventually
+leading to an out-of-bounds array read.
+
+Given that it is not used anywhere in the kernel, it seems
+likely that similar arguments against supporting it exist for
+AB8505 (it is controlled by hardware).
+
+Therefore, simply remove it like for AB8500 instead of adding
+an entry in ab8505_regulator_match.
+
+Fixes: 547f384f33db ("regulator: ab8500: add support for ab8505")
+Cc: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Link: https://lore.kernel.org/r/20191106173125.14496-1-stephan@gerhold.net
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/regulator/ab8500.c       |   17 -----------------
+ include/linux/regulator/ab8500.h |    1 -
+ 2 files changed, 18 deletions(-)
+
+--- a/drivers/regulator/ab8500.c
++++ b/drivers/regulator/ab8500.c
+@@ -956,23 +956,6 @@ static struct ab8500_regulator_info
+               .update_val_idle        = 0x82,
+               .update_val_normal      = 0x02,
+       },
+-      [AB8505_LDO_USB] = {
+-              .desc = {
+-                      .name           = "LDO-USB",
+-                      .ops            = &ab8500_regulator_mode_ops,
+-                      .type           = REGULATOR_VOLTAGE,
+-                      .id             = AB8505_LDO_USB,
+-                      .owner          = THIS_MODULE,
+-                      .n_voltages     = 1,
+-                      .volt_table     = fixed_3300000_voltage,
+-              },
+-              .update_bank            = 0x03,
+-              .update_reg             = 0x82,
+-              .update_mask            = 0x03,
+-              .update_val             = 0x01,
+-              .update_val_idle        = 0x03,
+-              .update_val_normal      = 0x01,
+-      },
+       [AB8505_LDO_AUDIO] = {
+               .desc = {
+                       .name           = "LDO-AUDIO",
+--- a/include/linux/regulator/ab8500.h
++++ b/include/linux/regulator/ab8500.h
+@@ -38,7 +38,6 @@ enum ab8505_regulator_id {
+       AB8505_LDO_AUX6,
+       AB8505_LDO_INTCORE,
+       AB8505_LDO_ADC,
+-      AB8505_LDO_USB,
+       AB8505_LDO_AUDIO,
+       AB8505_LDO_ANAMIC1,
+       AB8505_LDO_ANAMIC2,
index 56886b58f69e3274c977e3fc23a0d15324ed66e8..f0b8817f381f93662faff793397b273a22edf787 100644 (file)
@@ -82,3 +82,13 @@ hid-i2c-hid-reset-alps-touchpads-on-resume.patch
 acpi-sysfs-change-acpi_maskable_gpe_max-to-0x100.patch
 xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch
 platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch
+bluetooth-btusb-fix-pm-leak-in-error-case-of-setup.patch
+bluetooth-delete-a-stray-unlock.patch
+bluetooth-fix-memory-leak-in-hci_connect_le_scan.patch
+media-flexcop-usb-ensure-eio-is-returned-on-error-condition.patch
+regulator-ab8500-remove-ab8505-usb-regulator.patch
+media-usb-fix-memory-leak-in-af9005_identify_state.patch
+dt-bindings-clock-renesas-rcar-usb2-clock-sel-fix-typo-in-example.patch
+arm64-dts-meson-odroid-c2-disable-usb_otg-bus-to-avoid-power-failed-warning.patch
+tty-serial-msm_serial-fix-lockup-for-sysrq-and-oops.patch
+fix-compat-handling-of-ficlonerange-fideduperange-and-fs_ioc_fiemap.patch
diff --git a/queue-4.19/tty-serial-msm_serial-fix-lockup-for-sysrq-and-oops.patch b/queue-4.19/tty-serial-msm_serial-fix-lockup-for-sysrq-and-oops.patch
new file mode 100644 (file)
index 0000000..16975d9
--- /dev/null
@@ -0,0 +1,68 @@
+From 0e4f7f920a5c6bfe5e851e989f27b35a0cc7fb7e Mon Sep 17 00:00:00 2001
+From: Leo Yan <leo.yan@linaro.org>
+Date: Wed, 27 Nov 2019 22:15:43 +0800
+Subject: tty: serial: msm_serial: Fix lockup for sysrq and oops
+
+From: Leo Yan <leo.yan@linaro.org>
+
+commit 0e4f7f920a5c6bfe5e851e989f27b35a0cc7fb7e upstream.
+
+As the commit 677fe555cbfb ("serial: imx: Fix recursive locking bug")
+has mentioned the uart driver might cause recursive locking between
+normal printing and the kernel debugging facilities (e.g. sysrq and
+oops).  In the commit it gave out suggestion for fixing recursive
+locking issue: "The solution is to avoid locking in the sysrq case
+and trylock in the oops_in_progress case."
+
+This patch follows the suggestion (also used the exactly same code with
+other serial drivers, e.g. amba-pl011.c) to fix the recursive locking
+issue, this can avoid stuck caused by deadlock and print out log for
+sysrq and oops.
+
+Fixes: 04896a77a97b ("msm_serial: serial driver for MSM7K onboard serial peripheral.")
+Signed-off-by: Leo Yan <leo.yan@linaro.org>
+Reviewed-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
+Link: https://lore.kernel.org/r/20191127141544.4277-2-leo.yan@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/msm_serial.c |   13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+--- a/drivers/tty/serial/msm_serial.c
++++ b/drivers/tty/serial/msm_serial.c
+@@ -1580,6 +1580,7 @@ static void __msm_console_write(struct u
+       int num_newlines = 0;
+       bool replaced = false;
+       void __iomem *tf;
++      int locked = 1;
+       if (is_uartdm)
+               tf = port->membase + UARTDM_TF;
+@@ -1592,7 +1593,13 @@ static void __msm_console_write(struct u
+                       num_newlines++;
+       count += num_newlines;
+-      spin_lock(&port->lock);
++      if (port->sysrq)
++              locked = 0;
++      else if (oops_in_progress)
++              locked = spin_trylock(&port->lock);
++      else
++              spin_lock(&port->lock);
++
+       if (is_uartdm)
+               msm_reset_dm_count(port, count);
+@@ -1628,7 +1635,9 @@ static void __msm_console_write(struct u
+               iowrite32_rep(tf, buf, 1);
+               i += num_chars;
+       }
+-      spin_unlock(&port->lock);
++
++      if (locked)
++              spin_unlock(&port->lock);
+ }
+ static void msm_console_write(struct console *co, const char *s,