From fb1040d9ac65e76a40600b2b5c80282fa1b48c9e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 2 Dec 2019 17:43:04 +0100 Subject: [PATCH] 4.4-stable patches 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 --- ...evice-names-on-bus-with-the-bus-name.patch | 51 +++++++++++++++++ queue-4.4/series | 3 + ...tl8192e-fix-potential-use-after-free.patch | 45 +++++++++++++++ ...o-add-device-ids-for-u-blox-c099-f9p.patch | 56 +++++++++++++++++++ 4 files changed, 155 insertions(+) create mode 100644 queue-4.4/mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch create mode 100644 queue-4.4/staging-rtl8192e-fix-potential-use-after-free.patch create mode 100644 queue-4.4/usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch 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 index 00000000000..9a90439323f --- /dev/null +++ b/queue-4.4/mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch @@ -0,0 +1,51 @@ +From 7a2b9e6ec84588b0be65cc0ae45a65bac431496b Mon Sep 17 00:00:00 2001 +From: Alexander Usyskin +Date: Tue, 5 Nov 2019 17:05:13 +0200 +Subject: mei: bus: prefix device names on bus with the bus name + +From: Alexander Usyskin + +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: +Signed-off-by: Alexander Usyskin +Signed-off-by: Tomas Winkler +Link: https://lore.kernel.org/r/20191105150514.14010-1-tomas.winkler@intel.com +Signed-off-by: Greg Kroah-Hartman + +--- + 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 ++ * - ++ * 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)); + } + + /** diff --git a/queue-4.4/series b/queue-4.4/series index f9a264d7944..3437b7116c0 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -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 index 00000000000..85d44073c8e --- /dev/null +++ b/queue-4.4/staging-rtl8192e-fix-potential-use-after-free.patch @@ -0,0 +1,45 @@ +From b7aa39a2ed0112d07fc277ebd24a08a7b2368ab9 Mon Sep 17 00:00:00 2001 +From: Pan Bian +Date: Tue, 5 Nov 2019 22:49:11 +0800 +Subject: staging: rtl8192e: fix potential use after free + +From: Pan Bian + +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 +Reviewed-by: Dan Carpenter +Cc: stable +Link: https://lore.kernel.org/r/1572965351-6745-1-git-send-email-bianpan2016@163.com +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..b8e796a33c0 --- /dev/null +++ b/queue-4.4/usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch @@ -0,0 +1,56 @@ +From c1a1f273d0825774c80896b8deb1c9ea1d0b91e3 Mon Sep 17 00:00:00 2001 +From: Fabio D'Urso +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 + +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 +Cc: stable +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + 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 -- 2.47.3