]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Dec 2019 16:43:04 +0000 (17:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Dec 2019 16:43:04 +0000 (17:43 +0100)
added patches:
mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch
staging-rtl8192e-fix-potential-use-after-free.patch
usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch

queue-4.4/mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/staging-rtl8192e-fix-potential-use-after-free.patch [new file with mode: 0644]
queue-4.4/usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch [new file with mode: 0644]

diff --git a/queue-4.4/mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch b/queue-4.4/mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch
new file mode 100644 (file)
index 0000000..9a90439
--- /dev/null
@@ -0,0 +1,51 @@
+From 7a2b9e6ec84588b0be65cc0ae45a65bac431496b Mon Sep 17 00:00:00 2001
+From: Alexander Usyskin <alexander.usyskin@intel.com>
+Date: Tue, 5 Nov 2019 17:05:13 +0200
+Subject: mei: bus: prefix device names on bus with the bus name
+
+From: Alexander Usyskin <alexander.usyskin@intel.com>
+
+commit 7a2b9e6ec84588b0be65cc0ae45a65bac431496b upstream.
+
+Add parent device name to the name of devices on bus to avoid
+device names collisions for same client UUID available
+from different MEI heads. Namely this prevents sysfs collision under
+/sys/bus/mei/device/
+
+In the device part leave just UUID other parameters that are
+required for device matching are not required here and are
+just bloating the name.
+
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
+Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
+Link: https://lore.kernel.org/r/20191105150514.14010-1-tomas.winkler@intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/misc/mei/bus.c |    9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/drivers/misc/mei/bus.c
++++ b/drivers/misc/mei/bus.c
+@@ -761,15 +761,16 @@ static struct device_type mei_cl_device_
+ /**
+  * mei_cl_bus_set_name - set device name for me client device
++ *  <controller>-<client device>
++ *  Example: 0000:00:16.0-55213584-9a29-4916-badf-0fb7ed682aeb
+  *
+  * @cldev: me client device
+  */
+ static inline void mei_cl_bus_set_name(struct mei_cl_device *cldev)
+ {
+-      dev_set_name(&cldev->dev, "mei:%s:%pUl:%02X",
+-                   cldev->name,
+-                   mei_me_cl_uuid(cldev->me_cl),
+-                   mei_me_cl_ver(cldev->me_cl));
++      dev_set_name(&cldev->dev, "%s-%pUl",
++                   dev_name(cldev->bus->dev),
++                   mei_me_cl_uuid(cldev->me_cl));
+ }
+ /**
index f9a264d7944a38e005c3dd5e6bf445e27f2fce16..3437b7116c00f706c6a01b15a0c2a3c6abf2e4ab 100644 (file)
@@ -74,3 +74,6 @@ acpi-apei-switch-estatus-pool-to-use-vmalloc-memory.patch
 scsi-libsas-check-smp-phy-control-function-result.patch
 powerpc-pseries-dlpar-fix-a-missing-check-in-dlpar_p.patch
 mtd-remove-a-debug-trace-in-mtdpart.c.patch
+staging-rtl8192e-fix-potential-use-after-free.patch
+usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch
+mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch
diff --git a/queue-4.4/staging-rtl8192e-fix-potential-use-after-free.patch b/queue-4.4/staging-rtl8192e-fix-potential-use-after-free.patch
new file mode 100644 (file)
index 0000000..85d4407
--- /dev/null
@@ -0,0 +1,45 @@
+From b7aa39a2ed0112d07fc277ebd24a08a7b2368ab9 Mon Sep 17 00:00:00 2001
+From: Pan Bian <bianpan2016@163.com>
+Date: Tue, 5 Nov 2019 22:49:11 +0800
+Subject: staging: rtl8192e: fix potential use after free
+
+From: Pan Bian <bianpan2016@163.com>
+
+commit b7aa39a2ed0112d07fc277ebd24a08a7b2368ab9 upstream.
+
+The variable skb is released via kfree_skb() when the return value of
+_rtl92e_tx is not zero. However, after that, skb is accessed again to
+read its length, which may result in a use after free bug. This patch
+fixes the bug by moving the release operation to where skb is never
+used later.
+
+Signed-off-by: Pan Bian <bianpan2016@163.com>
+Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/1572965351-6745-1-git-send-email-bianpan2016@163.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/rtl8192e/rtl8192e/rtl_core.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+@@ -1631,14 +1631,15 @@ static void _rtl92e_hard_data_xmit(struc
+       memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
+       skb_push(skb, priv->rtllib->tx_headroom);
+       ret = _rtl92e_tx(dev, skb);
+-      if (ret != 0)
+-              kfree_skb(skb);
+       if (queue_index != MGNT_QUEUE) {
+               priv->rtllib->stats.tx_bytes += (skb->len -
+                                                priv->rtllib->tx_headroom);
+               priv->rtllib->stats.tx_packets++;
+       }
++
++      if (ret != 0)
++              kfree_skb(skb);
+ }
+ static int _rtl92e_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
diff --git a/queue-4.4/usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch b/queue-4.4/usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch
new file mode 100644 (file)
index 0000000..b8e796a
--- /dev/null
@@ -0,0 +1,56 @@
+From c1a1f273d0825774c80896b8deb1c9ea1d0b91e3 Mon Sep 17 00:00:00 2001
+From: Fabio D'Urso <fabiodurso@hotmail.it>
+Date: Thu, 14 Nov 2019 01:30:53 +0000
+Subject: USB: serial: ftdi_sio: add device IDs for U-Blox C099-F9P
+
+From: Fabio D'Urso <fabiodurso@hotmail.it>
+
+commit c1a1f273d0825774c80896b8deb1c9ea1d0b91e3 upstream.
+
+This device presents itself as a USB hub with three attached devices:
+ - An ACM serial port connected to the GPS module (not affected by this
+   commit)
+ - An FTDI serial port connected to the GPS module (1546:0502)
+ - Another FTDI serial port connected to the ODIN-W2 radio module
+   (1546:0503)
+
+This commit registers U-Blox's VID and the PIDs of the second and third
+devices.
+
+Datasheet: https://www.u-blox.com/sites/default/files/C099-F9P-AppBoard-Mbed-OS3-FW_UserGuide_%28UBX-18063024%29.pdf
+
+Signed-off-by: Fabio D'Urso <fabiodurso@hotmail.it>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c     |    3 +++
+ drivers/usb/serial/ftdi_sio_ids.h |    7 +++++++
+ 2 files changed, 10 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -1028,6 +1028,9 @@ static const struct usb_device_id id_tab
+       /* Sienna devices */
+       { USB_DEVICE(FTDI_VID, FTDI_SIENNA_PID) },
+       { USB_DEVICE(ECHELON_VID, ECHELON_U20_PID) },
++      /* U-Blox devices */
++      { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) },
++      { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
+       { }                                     /* Terminating entry */
+ };
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -1557,3 +1557,10 @@
+  */
+ #define UNJO_VID                      0x22B7
+ #define UNJO_ISODEBUG_V1_PID          0x150D
++
++/*
++ * U-Blox products (http://www.u-blox.com).
++ */
++#define UBLOX_VID                     0x1546
++#define UBLOX_C099F9P_ZED_PID         0x0502
++#define UBLOX_C099F9P_ODIN_PID                0x0503