From: Greg Kroah-Hartman Date: Mon, 2 Dec 2019 16:43:50 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v5.4.2~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e1907cdbfa46f833723d75aec57ffb0ac10fb6d;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch staging-rtl8192e-fix-potential-use-after-free.patch staging-rtl8723bs-add-024c-0525-to-the-list-of-sdio-device-ids.patch staging-rtl8723bs-drop-acpi-device-ids.patch usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch --- diff --git a/queue-4.14/mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch b/queue-4.14/mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch new file mode 100644 index 00000000000..502d8acd3cd --- /dev/null +++ b/queue-4.14/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 +@@ -850,15 +850,16 @@ static const struct device_type mei_cl_d + + /** + * 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.14/series b/queue-4.14/series index b676fb9638e..23aaeaf0352 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -156,3 +156,8 @@ mtd-remove-a-debug-trace-in-mtdpart.c.patch mm-gup-add-missing-refcount-overflow-checks-on-s390.patch clk-at91-fix-update-bit-maps-on-cfg_mor-write.patch clk-at91-generated-set-audio_pll_allowed-in-at91_clk_register_generated.patch +staging-rtl8192e-fix-potential-use-after-free.patch +staging-rtl8723bs-drop-acpi-device-ids.patch +staging-rtl8723bs-add-024c-0525-to-the-list-of-sdio-device-ids.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.14/staging-rtl8192e-fix-potential-use-after-free.patch b/queue-4.14/staging-rtl8192e-fix-potential-use-after-free.patch new file mode 100644 index 00000000000..0c9ac6a6088 --- /dev/null +++ b/queue-4.14/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 +@@ -1630,14 +1630,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.14/staging-rtl8723bs-add-024c-0525-to-the-list-of-sdio-device-ids.patch b/queue-4.14/staging-rtl8723bs-add-024c-0525-to-the-list-of-sdio-device-ids.patch new file mode 100644 index 00000000000..72683901aea --- /dev/null +++ b/queue-4.14/staging-rtl8723bs-add-024c-0525-to-the-list-of-sdio-device-ids.patch @@ -0,0 +1,33 @@ +From 3d5f1eedbfd22ceea94b39989d6021b1958181f4 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 11 Nov 2019 12:38:45 +0100 +Subject: staging: rtl8723bs: Add 024c:0525 to the list of SDIO device-ids + +From: Hans de Goede + +commit 3d5f1eedbfd22ceea94b39989d6021b1958181f4 upstream. + +Add 024c:0525 to the list of SDIO device-ids, based on a patch found +in the Android X86 kernels. According to that patch this device id is +used on the Alcatel Plus 10 device. + +Reported-and-tested-by: youling257 +Signed-off-by: Hans de Goede +Cc: stable +Link: https://lore.kernel.org/r/20191111113846.24940-1-hdegoede@redhat.com +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c ++++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c +@@ -25,6 +25,7 @@ + static const struct sdio_device_id sdio_ids[] = + { + { SDIO_DEVICE(0x024c, 0x0523), }, ++ { SDIO_DEVICE(0x024c, 0x0525), }, + { SDIO_DEVICE(0x024c, 0x0623), }, + { SDIO_DEVICE(0x024c, 0x0626), }, + { SDIO_DEVICE(0x024c, 0xb723), }, diff --git a/queue-4.14/staging-rtl8723bs-drop-acpi-device-ids.patch b/queue-4.14/staging-rtl8723bs-drop-acpi-device-ids.patch new file mode 100644 index 00000000000..0caa3ecdd0a --- /dev/null +++ b/queue-4.14/staging-rtl8723bs-drop-acpi-device-ids.patch @@ -0,0 +1,38 @@ +From 2d9d2491530a156b9a5614adf9dc79285e35d55e Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 11 Nov 2019 12:38:46 +0100 +Subject: staging: rtl8723bs: Drop ACPI device ids + +From: Hans de Goede + +commit 2d9d2491530a156b9a5614adf9dc79285e35d55e upstream. + +The driver only binds by SDIO device-ids, all the ACPI device-id does +is causing the driver to load unnecessarily on devices where the DSDT +contains a bogus OBDA8723 device. + +Signed-off-by: Hans de Goede +Cc: stable +Link: https://lore.kernel.org/r/20191111113846.24940-2-hdegoede@redhat.com +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c ++++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c +@@ -30,13 +30,7 @@ static const struct sdio_device_id sdio_ + { SDIO_DEVICE(0x024c, 0xb723), }, + { /* end: all zeroes */ }, + }; +-static const struct acpi_device_id acpi_ids[] = { +- {"OBDA8723", 0x0000}, +- {} +-}; +- + MODULE_DEVICE_TABLE(sdio, sdio_ids); +-MODULE_DEVICE_TABLE(acpi, acpi_ids); + + static int rtw_drv_init(struct sdio_func *func, const struct sdio_device_id *id); + static void rtw_dev_remove(struct sdio_func *func); diff --git a/queue-4.14/usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch b/queue-4.14/usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch new file mode 100644 index 00000000000..ecf67b213f8 --- /dev/null +++ b/queue-4.14/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 +@@ -1558,3 +1558,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