]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Apr 2021 08:05:08 +0000 (10:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Apr 2021 08:05:08 +0000 (10:05 +0200)
added patches:
cdc-acm-fix-break-rx-code-path-adding-necessary-calls.patch
usb-cdc-acm-downgrade-message-to-debug.patch
usb-cdc-acm-fix-use-after-free-after-probe-failure.patch
usb-quirks-ignore-remote-wake-up-on-fibocom-l850-gl-lte-modem.patch

queue-4.4/cdc-acm-fix-break-rx-code-path-adding-necessary-calls.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/usb-cdc-acm-downgrade-message-to-debug.patch [new file with mode: 0644]
queue-4.4/usb-cdc-acm-fix-use-after-free-after-probe-failure.patch [new file with mode: 0644]
queue-4.4/usb-quirks-ignore-remote-wake-up-on-fibocom-l850-gl-lte-modem.patch [new file with mode: 0644]

diff --git a/queue-4.4/cdc-acm-fix-break-rx-code-path-adding-necessary-calls.patch b/queue-4.4/cdc-acm-fix-break-rx-code-path-adding-necessary-calls.patch
new file mode 100644 (file)
index 0000000..522fcee
--- /dev/null
@@ -0,0 +1,35 @@
+From 08dff274edda54310d6f1cf27b62fddf0f8d146e Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Thu, 11 Mar 2021 14:37:14 +0100
+Subject: cdc-acm: fix BREAK rx code path adding necessary calls
+
+From: Oliver Neukum <oneukum@suse.com>
+
+commit 08dff274edda54310d6f1cf27b62fddf0f8d146e upstream.
+
+Counting break events is nice but we should actually report them to
+the tty layer.
+
+Fixes: 5a6a62bdb9257 ("cdc-acm: add TIOCMIWAIT")
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+Link: https://lore.kernel.org/r/20210311133714.31881-1-oneukum@suse.com
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/class/cdc-acm.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -334,8 +334,10 @@ static void acm_ctrl_irq(struct urb *urb
+                       acm->iocount.dsr++;
+               if (difference & ACM_CTRL_DCD)
+                       acm->iocount.dcd++;
+-              if (newctrl & ACM_CTRL_BRK)
++              if (newctrl & ACM_CTRL_BRK) {
+                       acm->iocount.brk++;
++                      tty_insert_flip_char(&acm->port, 0, TTY_BREAK);
++              }
+               if (newctrl & ACM_CTRL_RI)
+                       acm->iocount.rng++;
+               if (newctrl & ACM_CTRL_FRAMING)
index 290f5ab14a826cc96a5ef37164c6058469d739e1..91d4bb4282a67428acfadfec02bec98d392786ad 100644 (file)
@@ -20,3 +20,7 @@ reiserfs-update-reiserfs_xattrs_initialized-condition.patch
 pinctrl-rockchip-fix-restore-error-in-resume.patch
 extcon-fix-error-handling-in-extcon_dev_register.patch
 firewire-nosy-fix-a-use-after-free-bug-in-nosy_ioctl.patch
+usb-quirks-ignore-remote-wake-up-on-fibocom-l850-gl-lte-modem.patch
+cdc-acm-fix-break-rx-code-path-adding-necessary-calls.patch
+usb-cdc-acm-downgrade-message-to-debug.patch
+usb-cdc-acm-fix-use-after-free-after-probe-failure.patch
diff --git a/queue-4.4/usb-cdc-acm-downgrade-message-to-debug.patch b/queue-4.4/usb-cdc-acm-downgrade-message-to-debug.patch
new file mode 100644 (file)
index 0000000..0b39975
--- /dev/null
@@ -0,0 +1,33 @@
+From e4c77070ad45fc940af1d7fb1e637c349e848951 Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Thu, 11 Mar 2021 14:01:26 +0100
+Subject: USB: cdc-acm: downgrade message to debug
+
+From: Oliver Neukum <oneukum@suse.com>
+
+commit e4c77070ad45fc940af1d7fb1e637c349e848951 upstream.
+
+This failure is so common that logging an error here amounts
+to spamming log files.
+
+Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com>
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20210311130126.15972-2-oneukum@suse.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/class/cdc-acm.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -550,7 +550,8 @@ static void acm_port_dtr_rts(struct tty_
+       res = acm_set_control(acm, val);
+       if (res && (acm->ctrl_caps & USB_CDC_CAP_LINE))
+-              dev_err(&acm->control->dev, "failed to set dtr/rts\n");
++              /* This is broken in too many devices to spam the logs */
++              dev_dbg(&acm->control->dev, "failed to set dtr/rts\n");
+ }
+ static int acm_port_activate(struct tty_port *port, struct tty_struct *tty)
diff --git a/queue-4.4/usb-cdc-acm-fix-use-after-free-after-probe-failure.patch b/queue-4.4/usb-cdc-acm-fix-use-after-free-after-probe-failure.patch
new file mode 100644 (file)
index 0000000..134964e
--- /dev/null
@@ -0,0 +1,39 @@
+From 4e49bf376c0451ad2eae2592e093659cde12be9a Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Mon, 22 Mar 2021 16:53:12 +0100
+Subject: USB: cdc-acm: fix use-after-free after probe failure
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 4e49bf376c0451ad2eae2592e093659cde12be9a upstream.
+
+If tty-device registration fails the driver would fail to release the
+data interface. When the device is later disconnected, the disconnect
+callback would still be called for the data interface and would go about
+releasing already freed resources.
+
+Fixes: c93d81955005 ("usb: cdc-acm: fix error handling in acm_probe()")
+Cc: stable@vger.kernel.org      # 3.9
+Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
+Acked-by: Oliver Neukum <oneukum@suse.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Link: https://lore.kernel.org/r/20210322155318.9837-3-johan@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/class/cdc-acm.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -1502,6 +1502,11 @@ skip_countries:
+       return 0;
+ alloc_fail8:
++      if (!acm->combined_interfaces) {
++              /* Clear driver data so that disconnect() returns early. */
++              usb_set_intfdata(data_interface, NULL);
++              usb_driver_release_interface(&acm_driver, data_interface);
++      }
+       if (acm->country_codes) {
+               device_remove_file(&acm->control->dev,
+                               &dev_attr_wCountryCodes);
diff --git a/queue-4.4/usb-quirks-ignore-remote-wake-up-on-fibocom-l850-gl-lte-modem.patch b/queue-4.4/usb-quirks-ignore-remote-wake-up-on-fibocom-l850-gl-lte-modem.patch
new file mode 100644 (file)
index 0000000..e124fb1
--- /dev/null
@@ -0,0 +1,42 @@
+From 0bd860493f81eb2a46173f6f5e44cc38331c8dbd Mon Sep 17 00:00:00 2001
+From: Vincent Palatin <vpalatin@chromium.org>
+Date: Fri, 19 Mar 2021 13:48:02 +0100
+Subject: USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem
+
+From: Vincent Palatin <vpalatin@chromium.org>
+
+commit 0bd860493f81eb2a46173f6f5e44cc38331c8dbd upstream.
+
+This LTE modem (M.2 card) has a bug in its power management:
+there is some kind of race condition for U3 wake-up between the host and
+the device. The modem firmware sometimes crashes/locks when both events
+happen at the same time and the modem fully drops off the USB bus (and
+sometimes re-enumerates, sometimes just gets stuck until the next
+reboot).
+
+Tested with the modem wired to the XHCI controller on an AMD 3015Ce
+platform. Without the patch, the modem dropped of the USB bus 5 times in
+3 days. With the quirk, it stayed connected for a week while the
+'runtime_suspended_time' counter incremented as excepted.
+
+Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
+Link: https://lore.kernel.org/r/20210319124802.2315195-1-vpalatin@chromium.org
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/core/quirks.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -321,6 +321,10 @@ static const struct usb_device_id usb_qu
+       /* DJI CineSSD */
+       { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM },
++      /* Fibocom L850-GL LTE Modem */
++      { USB_DEVICE(0x2cb7, 0x0007), .driver_info =
++                      USB_QUIRK_IGNORE_REMOTE_WAKEUP },
++
+       /* INTEL VALUE SSD */
+       { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },