From: Sasha Levin Date: Mon, 8 Feb 2021 03:55:10 +0000 (-0500) Subject: Fixes for 4.4 X-Git-Tag: v4.4.257~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b4c8f1182e648d115df3936df96a03062d4b069;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.4 Signed-off-by: Sasha Levin --- diff --git a/queue-4.4/input-i8042-unbreak-pegatron-c15b.patch b/queue-4.4/input-i8042-unbreak-pegatron-c15b.patch new file mode 100644 index 00000000000..f16064b855a --- /dev/null +++ b/queue-4.4/input-i8042-unbreak-pegatron-c15b.patch @@ -0,0 +1,45 @@ +From 45b3080d851e80c217179c4374fd36750ef7b225 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 3 Jan 2021 17:59:51 -0800 +Subject: Input: i8042 - unbreak Pegatron C15B +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alexey Dobriyan + +[ Upstream commit a3a9060ecad030e2c7903b2b258383d2c716b56c ] + +g++ reports + + drivers/input/serio/i8042-x86ia64io.h:225:3: error: ‘.matches’ designator used multiple times in the same initializer list + +C99 semantics is that last duplicated initialiser wins, +so DMI entry gets overwritten. + +Fixes: a48491c65b51 ("Input: i8042 - add ByteSpeed touchpad to noloop table") +Signed-off-by: Alexey Dobriyan +Acked-by: Po-Hsu Lin +Link: https://lore.kernel.org/r/20201228072335.GA27766@localhost.localdomain +Signed-off-by: Dmitry Torokhov +Signed-off-by: Sasha Levin +--- + drivers/input/serio/i8042-x86ia64io.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h +index fa07be0b4500e..2317f8d3fef6f 100644 +--- a/drivers/input/serio/i8042-x86ia64io.h ++++ b/drivers/input/serio/i8042-x86ia64io.h +@@ -223,6 +223,8 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = { + DMI_MATCH(DMI_SYS_VENDOR, "PEGATRON CORPORATION"), + DMI_MATCH(DMI_PRODUCT_NAME, "C15B"), + }, ++ }, ++ { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ByteSpeed LLC"), + DMI_MATCH(DMI_PRODUCT_NAME, "ByteSpeed Laptop C15B"), +-- +2.27.0 + diff --git a/queue-4.4/net-lapb-copy-the-skb-before-sending-a-packet.patch b/queue-4.4/net-lapb-copy-the-skb-before-sending-a-packet.patch new file mode 100644 index 00000000000..56f93e92e88 --- /dev/null +++ b/queue-4.4/net-lapb-copy-the-skb-before-sending-a-packet.patch @@ -0,0 +1,51 @@ +From b71c159c5391edf3d75e560c86be21ffca0b121f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 31 Jan 2021 21:57:06 -0800 +Subject: net: lapb: Copy the skb before sending a packet + +From: Xie He + +[ Upstream commit 88c7a9fd9bdd3e453f04018920964c6f848a591a ] + +When sending a packet, we will prepend it with an LAPB header. +This modifies the shared parts of a cloned skb, so we should copy the +skb rather than just clone it, before we prepend the header. + +In "Documentation/networking/driver.rst" (the 2nd point), it states +that drivers shouldn't modify the shared parts of a cloned skb when +transmitting. + +The "dev_queue_xmit_nit" function in "net/core/dev.c", which is called +when an skb is being sent, clones the skb and sents the clone to +AF_PACKET sockets. Because the LAPB drivers first remove a 1-byte +pseudo-header before handing over the skb to us, if we don't copy the +skb before prepending the LAPB header, the first byte of the packets +received on AF_PACKET sockets can be corrupted. + +Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") +Signed-off-by: Xie He +Acked-by: Martin Schiller +Link: https://lore.kernel.org/r/20210201055706.415842-1-xie.he.0141@gmail.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + net/lapb/lapb_out.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/net/lapb/lapb_out.c b/net/lapb/lapb_out.c +index ba4d015bd1a67..7cbb77b7479a6 100644 +--- a/net/lapb/lapb_out.c ++++ b/net/lapb/lapb_out.c +@@ -87,7 +87,8 @@ void lapb_kick(struct lapb_cb *lapb) + skb = skb_dequeue(&lapb->write_queue); + + do { +- if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL) { ++ skbn = skb_copy(skb, GFP_ATOMIC); ++ if (!skbn) { + skb_queue_head(&lapb->write_queue, skb); + break; + } +-- +2.27.0 + diff --git a/queue-4.4/series b/queue-4.4/series index 08cfae80c00..91b1e49ea77 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -16,3 +16,5 @@ stable-clamp-sublevel-in-4.4-and-4.9.patch usb-serial-cp210x-add-pid-vid-for-wsda-200-usb.patch usb-serial-cp210x-add-new-vid-pid-for-supporting-teraoka-ad2000.patch usb-serial-option-adding-support-for-cinterion-mv31.patch +input-i8042-unbreak-pegatron-c15b.patch +net-lapb-copy-the-skb-before-sending-a-packet.patch