]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.14
authorSasha Levin <sashal@kernel.org>
Fri, 5 Jun 2020 01:12:20 +0000 (21:12 -0400)
committerSasha Levin <sashal@kernel.org>
Fri, 5 Jun 2020 01:12:20 +0000 (21:12 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.14/arc-fix-iccm-dccm-runtime-size-checks.patch [new file with mode: 0644]
queue-4.14/arc-plat-eznps-restrict-to-config_isa_arcompact.patch [new file with mode: 0644]
queue-4.14/i2c-altera-fix-race-between-xfer_msg-and-isr-thread.patch [new file with mode: 0644]
queue-4.14/net-bmac-fix-read-of-mac-address-from-rom.patch [new file with mode: 0644]
queue-4.14/net-ethernet-freescale-rework-quiesce-activate-for-u.patch [new file with mode: 0644]
queue-4.14/net-ethernet-stmmac-enable-interface-clocks-on-probe.patch [new file with mode: 0644]
queue-4.14/net-smsc911x-fix-runtime-pm-imbalance-on-error.patch [new file with mode: 0644]
queue-4.14/pppoe-only-process-padt-targeted-at-local-interfaces.patch [new file with mode: 0644]
queue-4.14/series
queue-4.14/x86-mmiotrace-use-cpumask_available-for-cpumask_var_.patch [new file with mode: 0644]

diff --git a/queue-4.14/arc-fix-iccm-dccm-runtime-size-checks.patch b/queue-4.14/arc-fix-iccm-dccm-runtime-size-checks.patch
new file mode 100644 (file)
index 0000000..11f4583
--- /dev/null
@@ -0,0 +1,54 @@
+From 2598484745a02670ecd3b1d7721621c822b87e24 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 2 Apr 2020 20:54:28 +0300
+Subject: ARC: Fix ICCM & DCCM runtime size checks
+
+From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+
+[ Upstream commit 43900edf67d7ef3ac8909854d75b8a1fba2d570c ]
+
+As of today the ICCM and DCCM size checks are incorrectly using
+mismatched units (KiB checked against bytes). The CONFIG_ARC_DCCM_SZ
+and CONFIG_ARC_ICCM_SZ are in KiB, but the size calculated in
+runtime and stored in cpu->dccm.sz and cpu->iccm.sz is in bytes.
+
+Fix that.
+
+Reported-by: Paul Greco <pmgreco@us.ibm.com>
+Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arc/kernel/setup.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
+index 6b8d106e0d53..11c2c4a3fe69 100644
+--- a/arch/arc/kernel/setup.c
++++ b/arch/arc/kernel/setup.c
+@@ -15,6 +15,7 @@
+ #include <linux/clocksource.h>
+ #include <linux/console.h>
+ #include <linux/module.h>
++#include <linux/sizes.h>
+ #include <linux/cpu.h>
+ #include <linux/of_fdt.h>
+ #include <linux/of.h>
+@@ -355,12 +356,12 @@ static void arc_chk_core_config(void)
+       if ((unsigned int)__arc_dccm_base != cpu->dccm.base_addr)
+               panic("Linux built with incorrect DCCM Base address\n");
+-      if (CONFIG_ARC_DCCM_SZ != cpu->dccm.sz)
++      if (CONFIG_ARC_DCCM_SZ * SZ_1K != cpu->dccm.sz)
+               panic("Linux built with incorrect DCCM Size\n");
+ #endif
+ #ifdef CONFIG_ARC_HAS_ICCM
+-      if (CONFIG_ARC_ICCM_SZ != cpu->iccm.sz)
++      if (CONFIG_ARC_ICCM_SZ * SZ_1K != cpu->iccm.sz)
+               panic("Linux built with incorrect ICCM Size\n");
+ #endif
+-- 
+2.25.1
+
diff --git a/queue-4.14/arc-plat-eznps-restrict-to-config_isa_arcompact.patch b/queue-4.14/arc-plat-eznps-restrict-to-config_isa_arcompact.patch
new file mode 100644 (file)
index 0000000..0d71b54
--- /dev/null
@@ -0,0 +1,38 @@
+From 4ef44190642438a31762a7ebdb321c611eac8044 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 14 Apr 2020 11:41:51 -0700
+Subject: ARC: [plat-eznps]: Restrict to CONFIG_ISA_ARCOMPACT
+
+From: Vineet Gupta <vgupta@synopsys.com>
+
+[ Upstream commit 799587d5731db9dcdafaac4002463aa7d9cd6cf7 ]
+
+Elide invalid configuration EZNPS + ARCv2, triggered by a
+make allyesconfig build.
+
+Granted the root cause is in source code (asm/barrier.h) where we check
+for ARCv2 before PLAT_EZNPS, but it is better to avoid such combinations
+at onset rather then baking subtle nuances into code.
+
+Reported-by: kbuild test robot <lkp@intel.com>
+Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arc/plat-eznps/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/arc/plat-eznps/Kconfig b/arch/arc/plat-eznps/Kconfig
+index ce908e2c5282..71378bfec8d0 100644
+--- a/arch/arc/plat-eznps/Kconfig
++++ b/arch/arc/plat-eznps/Kconfig
+@@ -6,6 +6,7 @@
+ menuconfig ARC_PLAT_EZNPS
+       bool "\"EZchip\" ARC dev platform"
++      depends on ISA_ARCOMPACT
+       select CPU_BIG_ENDIAN
+       select CLKSRC_NPS if !PHYS_ADDR_T_64BIT
+       select EZNPS_GIC
+-- 
+2.25.1
+
diff --git a/queue-4.14/i2c-altera-fix-race-between-xfer_msg-and-isr-thread.patch b/queue-4.14/i2c-altera-fix-race-between-xfer_msg-and-isr-thread.patch
new file mode 100644 (file)
index 0000000..4e1e86d
--- /dev/null
@@ -0,0 +1,93 @@
+From f4aea4944412ff88764d80ed3e68249eaee707e1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 8 May 2020 22:12:48 +0900
+Subject: i2c: altera: Fix race between xfer_msg and isr thread
+
+From: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
+
+[ Upstream commit 5d4c7977499a736f3f80826bdc9744344ad55589 ]
+
+Use a mutex to protect access to idev->msg_len, idev->buf, etc. which
+are modified by both altr_i2c_xfer_msg() and altr_i2c_isr().
+
+This is the minimal fix for easy backporting. A cleanup to remove the
+spinlock will be added later.
+
+Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
+Acked-by: Thor Thayer <thor.thayer@linux.intel.com>
+[wsa: updated commit message]
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/i2c/busses/i2c-altera.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/i2c/busses/i2c-altera.c b/drivers/i2c/busses/i2c-altera.c
+index 8915ee30a5b4..1d59eede537b 100644
+--- a/drivers/i2c/busses/i2c-altera.c
++++ b/drivers/i2c/busses/i2c-altera.c
+@@ -81,6 +81,7 @@
+  * @isr_mask: cached copy of local ISR enables.
+  * @isr_status: cached copy of local ISR status.
+  * @lock: spinlock for IRQ synchronization.
++ * @isr_mutex: mutex for IRQ thread.
+  */
+ struct altr_i2c_dev {
+       void __iomem *base;
+@@ -97,6 +98,7 @@ struct altr_i2c_dev {
+       u32 isr_mask;
+       u32 isr_status;
+       spinlock_t lock;        /* IRQ synchronization */
++      struct mutex isr_mutex;
+ };
+ static void
+@@ -256,10 +258,11 @@ static irqreturn_t altr_i2c_isr(int irq, void *_dev)
+       struct altr_i2c_dev *idev = _dev;
+       u32 status = idev->isr_status;
++      mutex_lock(&idev->isr_mutex);
+       if (!idev->msg) {
+               dev_warn(idev->dev, "unexpected interrupt\n");
+               altr_i2c_int_clear(idev, ALTR_I2C_ALL_IRQ);
+-              return IRQ_HANDLED;
++              goto out;
+       }
+       read = (idev->msg->flags & I2C_M_RD) != 0;
+@@ -312,6 +315,8 @@ static irqreturn_t altr_i2c_isr(int irq, void *_dev)
+               complete(&idev->msg_complete);
+               dev_dbg(idev->dev, "Message Complete\n");
+       }
++out:
++      mutex_unlock(&idev->isr_mutex);
+       return IRQ_HANDLED;
+ }
+@@ -323,6 +328,7 @@ static int altr_i2c_xfer_msg(struct altr_i2c_dev *idev, struct i2c_msg *msg)
+       u32 value;
+       u8 addr = i2c_8bit_addr_from_msg(msg);
++      mutex_lock(&idev->isr_mutex);
+       idev->msg = msg;
+       idev->msg_len = msg->len;
+       idev->buf = msg->buf;
+@@ -347,6 +353,7 @@ static int altr_i2c_xfer_msg(struct altr_i2c_dev *idev, struct i2c_msg *msg)
+               altr_i2c_int_enable(idev, imask, true);
+               altr_i2c_fill_tx_fifo(idev);
+       }
++      mutex_unlock(&idev->isr_mutex);
+       time_left = wait_for_completion_timeout(&idev->msg_complete,
+                                               ALTR_I2C_XFER_TIMEOUT);
+@@ -420,6 +427,7 @@ static int altr_i2c_probe(struct platform_device *pdev)
+       idev->dev = &pdev->dev;
+       init_completion(&idev->msg_complete);
+       spin_lock_init(&idev->lock);
++      mutex_init(&idev->isr_mutex);
+       ret = device_property_read_u32(idev->dev, "fifo-size",
+                                      &idev->fifo_size);
+-- 
+2.25.1
+
diff --git a/queue-4.14/net-bmac-fix-read-of-mac-address-from-rom.patch b/queue-4.14/net-bmac-fix-read-of-mac-address-from-rom.patch
new file mode 100644 (file)
index 0000000..590ab40
--- /dev/null
@@ -0,0 +1,43 @@
+From 4aa9a1827bf250527a82f583311aac54b23466bd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 19 May 2020 09:05:58 +0800
+Subject: net: bmac: Fix read of MAC address from ROM
+
+From: Jeremy Kerr <jk@ozlabs.org>
+
+[ Upstream commit ef01cee2ee1b369c57a936166483d40942bcc3e3 ]
+
+In bmac_get_station_address, We're reading two bytes at a time from ROM,
+but we do that six times, resulting in 12 bytes of read & writes. This
+means we will write off the end of the six-byte destination buffer.
+
+This change fixes the for-loop to only read/write six bytes.
+
+Based on a proposed fix from Finn Thain <fthain@telegraphics.com.au>.
+
+Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
+Reported-by: Stan Johnson <userm57@yahoo.com>
+Tested-by: Stan Johnson <userm57@yahoo.com>
+Reported-by: Finn Thain <fthain@telegraphics.com.au>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/apple/bmac.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c
+index eac740c476ce..a8b462e1beba 100644
+--- a/drivers/net/ethernet/apple/bmac.c
++++ b/drivers/net/ethernet/apple/bmac.c
+@@ -1187,7 +1187,7 @@ bmac_get_station_address(struct net_device *dev, unsigned char *ea)
+       int i;
+       unsigned short data;
+-      for (i = 0; i < 6; i++)
++      for (i = 0; i < 3; i++)
+               {
+                       reset_and_select_srom(dev);
+                       data = read_srom(dev, i + EnetAddressOffset/2, SROMAddressBits);
+-- 
+2.25.1
+
diff --git a/queue-4.14/net-ethernet-freescale-rework-quiesce-activate-for-u.patch b/queue-4.14/net-ethernet-freescale-rework-quiesce-activate-for-u.patch
new file mode 100644 (file)
index 0000000..2565206
--- /dev/null
@@ -0,0 +1,78 @@
+From 6b4ef3ea26cd3496b3a74ac332f862f7383cdfee Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 20 May 2020 17:53:50 +0200
+Subject: net/ethernet/freescale: rework quiesce/activate for ucc_geth
+
+From: Valentin Longchamp <valentin@longchamp.me>
+
+[ Upstream commit 79dde73cf9bcf1dd317a2667f78b758e9fe139ed ]
+
+ugeth_quiesce/activate are used to halt the controller when there is a
+link change that requires to reconfigure the mac.
+
+The previous implementation called netif_device_detach(). This however
+causes the initial activation of the netdevice to fail precisely because
+it's detached. For details, see [1].
+
+A possible workaround was the revert of commit
+net: linkwatch: add check for netdevice being present to linkwatch_do_dev
+However, the check introduced in the above commit is correct and shall be
+kept.
+
+The netif_device_detach() is thus replaced with
+netif_tx_stop_all_queues() that prevents any tranmission. This allows to
+perform mac config change required by the link change, without detaching
+the corresponding netdevice and thus not preventing its initial
+activation.
+
+[1] https://lists.openwall.net/netdev/2020/01/08/201
+
+Signed-off-by: Valentin Longchamp <valentin@longchamp.me>
+Acked-by: Matteo Ghidoni <matteo.ghidoni@ch.abb.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/freescale/ucc_geth.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
+index bddf4c25ee6e..7c2a9fd4dc1a 100644
+--- a/drivers/net/ethernet/freescale/ucc_geth.c
++++ b/drivers/net/ethernet/freescale/ucc_geth.c
+@@ -45,6 +45,7 @@
+ #include <soc/fsl/qe/ucc.h>
+ #include <soc/fsl/qe/ucc_fast.h>
+ #include <asm/machdep.h>
++#include <net/sch_generic.h>
+ #include "ucc_geth.h"
+@@ -1551,11 +1552,8 @@ static int ugeth_disable(struct ucc_geth_private *ugeth, enum comm_dir mode)
+ static void ugeth_quiesce(struct ucc_geth_private *ugeth)
+ {
+-      /* Prevent any further xmits, plus detach the device. */
+-      netif_device_detach(ugeth->ndev);
+-
+-      /* Wait for any current xmits to finish. */
+-      netif_tx_disable(ugeth->ndev);
++      /* Prevent any further xmits */
++      netif_tx_stop_all_queues(ugeth->ndev);
+       /* Disable the interrupt to avoid NAPI rescheduling. */
+       disable_irq(ugeth->ug_info->uf_info.irq);
+@@ -1568,7 +1566,10 @@ static void ugeth_activate(struct ucc_geth_private *ugeth)
+ {
+       napi_enable(&ugeth->napi);
+       enable_irq(ugeth->ug_info->uf_info.irq);
+-      netif_device_attach(ugeth->ndev);
++
++      /* allow to xmit again  */
++      netif_tx_wake_all_queues(ugeth->ndev);
++      __netdev_watchdog_up(ugeth->ndev);
+ }
+ /* Called every time the controller might need to be made
+-- 
+2.25.1
+
diff --git a/queue-4.14/net-ethernet-stmmac-enable-interface-clocks-on-probe.patch b/queue-4.14/net-ethernet-stmmac-enable-interface-clocks-on-probe.patch
new file mode 100644 (file)
index 0000000..8c0d84b
--- /dev/null
@@ -0,0 +1,62 @@
+From a59db470449cba0a926922fa3e9dffc8fb991224 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 21 May 2020 12:49:34 +0100
+Subject: net: ethernet: stmmac: Enable interface clocks on probe for IPQ806x
+
+From: Jonathan McDowell <noodles@earth.li>
+
+[ Upstream commit a96ac8a0045e3cbe3e5af6d1b3c78c6c2065dec5 ]
+
+The ipq806x_gmac_probe() function enables the PTP clock but not the
+appropriate interface clocks. This means that if the bootloader hasn't
+done so attempting to bring up the interface will fail with an error
+like:
+
+[   59.028131] ipq806x-gmac-dwmac 37600000.ethernet: Failed to reset the dma
+[   59.028196] ipq806x-gmac-dwmac 37600000.ethernet eth1: stmmac_hw_setup: DMA engine initialization failed
+[   59.034056] ipq806x-gmac-dwmac 37600000.ethernet eth1: stmmac_open: Hw setup failed
+
+This patch, a slightly cleaned up version of one posted by Sergey
+Sergeev in:
+
+https://forum.openwrt.org/t/support-for-mikrotik-rb3011uias-rm/4064/257
+
+correctly enables the clock; we have already configured the source just
+before this.
+
+Tested on a MikroTik RB3011.
+
+Signed-off-by: Jonathan McDowell <noodles@earth.li>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+index 11a4a81b0397..bcc5d1e16ce2 100644
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+@@ -330,6 +330,19 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
+       /* Enable PTP clock */
+       regmap_read(gmac->nss_common, NSS_COMMON_CLK_GATE, &val);
+       val |= NSS_COMMON_CLK_GATE_PTP_EN(gmac->id);
++      switch (gmac->phy_mode) {
++      case PHY_INTERFACE_MODE_RGMII:
++              val |= NSS_COMMON_CLK_GATE_RGMII_RX_EN(gmac->id) |
++                      NSS_COMMON_CLK_GATE_RGMII_TX_EN(gmac->id);
++              break;
++      case PHY_INTERFACE_MODE_SGMII:
++              val |= NSS_COMMON_CLK_GATE_GMII_RX_EN(gmac->id) |
++                              NSS_COMMON_CLK_GATE_GMII_TX_EN(gmac->id);
++              break;
++      default:
++              /* We don't get here; the switch above will have errored out */
++              unreachable();
++      }
+       regmap_write(gmac->nss_common, NSS_COMMON_CLK_GATE, val);
+       if (gmac->phy_mode == PHY_INTERFACE_MODE_SGMII) {
+-- 
+2.25.1
+
diff --git a/queue-4.14/net-smsc911x-fix-runtime-pm-imbalance-on-error.patch b/queue-4.14/net-smsc911x-fix-runtime-pm-imbalance-on-error.patch
new file mode 100644 (file)
index 0000000..c91d983
--- /dev/null
@@ -0,0 +1,63 @@
+From ac113b5f62b10d63704bc9fe99ed1053b6321b03 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 23 May 2020 16:08:20 +0800
+Subject: net: smsc911x: Fix runtime PM imbalance on error
+
+From: Dinghao Liu <dinghao.liu@zju.edu.cn>
+
+[ Upstream commit 539d39ad0c61b35f69565a037d7586deaf6d6166 ]
+
+Remove runtime PM usage counter decrement when the
+increment function has not been called to keep the
+counter balanced.
+
+Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/smsc/smsc911x.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
+index ce4bfecc26c7..ae80a223975d 100644
+--- a/drivers/net/ethernet/smsc/smsc911x.c
++++ b/drivers/net/ethernet/smsc/smsc911x.c
+@@ -2515,20 +2515,20 @@ static int smsc911x_drv_probe(struct platform_device *pdev)
+       retval = smsc911x_init(dev);
+       if (retval < 0)
+-              goto out_disable_resources;
++              goto out_init_fail;
+       netif_carrier_off(dev);
+       retval = smsc911x_mii_init(pdev, dev);
+       if (retval) {
+               SMSC_WARN(pdata, probe, "Error %i initialising mii", retval);
+-              goto out_disable_resources;
++              goto out_init_fail;
+       }
+       retval = register_netdev(dev);
+       if (retval) {
+               SMSC_WARN(pdata, probe, "Error %i registering device", retval);
+-              goto out_disable_resources;
++              goto out_init_fail;
+       } else {
+               SMSC_TRACE(pdata, probe,
+                          "Network interface: \"%s\"", dev->name);
+@@ -2569,9 +2569,10 @@ static int smsc911x_drv_probe(struct platform_device *pdev)
+       return 0;
+-out_disable_resources:
++out_init_fail:
+       pm_runtime_put(&pdev->dev);
+       pm_runtime_disable(&pdev->dev);
++out_disable_resources:
+       (void)smsc911x_disable_resources(pdev);
+ out_enable_resources_fail:
+       smsc911x_free_resources(pdev);
+-- 
+2.25.1
+
diff --git a/queue-4.14/pppoe-only-process-padt-targeted-at-local-interfaces.patch b/queue-4.14/pppoe-only-process-padt-targeted-at-local-interfaces.patch
new file mode 100644 (file)
index 0000000..f8c7d59
--- /dev/null
@@ -0,0 +1,40 @@
+From 90afad7167bafe136bfe10aa12501d63036f169a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 14 May 2020 12:15:39 +0200
+Subject: pppoe: only process PADT targeted at local interfaces
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Guillaume Nault <gnault@redhat.com>
+
+We don't want to disconnect a session because of a stray PADT arriving
+while the interface is in promiscuous mode.
+Furthermore, multicast and broadcast packets make no sense here, so
+only PACKET_HOST is accepted.
+
+Reported-by: David Balažic <xerces9@gmail.com>
+Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
+Signed-off-by: Guillaume Nault <gnault@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ppp/pppoe.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
+index fa7121dcab67..202a0f415e1e 100644
+--- a/drivers/net/ppp/pppoe.c
++++ b/drivers/net/ppp/pppoe.c
+@@ -497,6 +497,9 @@ static int pppoe_disc_rcv(struct sk_buff *skb, struct net_device *dev,
+       if (!skb)
+               goto out;
++      if (skb->pkt_type != PACKET_HOST)
++              goto abort;
++
+       if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
+               goto abort;
+-- 
+2.25.1
+
index 150f8a7ef9bda740769fd1794a0a2fd610a0c908..351bd8a2909f6d079a623453d9e73cb4a4578979 100644 (file)
@@ -3,3 +3,12 @@ libnvdimm-fix-endian-conversion-issues.patch
 scsi-hisi_sas-check-sas_port-before-using-it.patch
 spi-dw-use-smp_mb-to-avoid-sending-spi-data-error.patch
 s390-ftrace-save-traced-function-caller.patch
+pppoe-only-process-padt-targeted-at-local-interfaces.patch
+arc-fix-iccm-dccm-runtime-size-checks.patch
+arc-plat-eznps-restrict-to-config_isa_arcompact.patch
+i2c-altera-fix-race-between-xfer_msg-and-isr-thread.patch
+x86-mmiotrace-use-cpumask_available-for-cpumask_var_.patch
+net-bmac-fix-read-of-mac-address-from-rom.patch
+net-ethernet-freescale-rework-quiesce-activate-for-u.patch
+net-ethernet-stmmac-enable-interface-clocks-on-probe.patch
+net-smsc911x-fix-runtime-pm-imbalance-on-error.patch
diff --git a/queue-4.14/x86-mmiotrace-use-cpumask_available-for-cpumask_var_.patch b/queue-4.14/x86-mmiotrace-use-cpumask_available-for-cpumask_var_.patch
new file mode 100644 (file)
index 0000000..dc869c8
--- /dev/null
@@ -0,0 +1,67 @@
+From d09b3292f9e6a48301560a0beae1da0398712f72 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 8 Apr 2020 13:53:23 -0700
+Subject: x86/mmiotrace: Use cpumask_available() for cpumask_var_t variables
+
+From: Nathan Chancellor <natechancellor@gmail.com>
+
+[ Upstream commit d7110a26e5905ec2fe3fc88bc6a538901accb72b ]
+
+When building with Clang + -Wtautological-compare and
+CONFIG_CPUMASK_OFFSTACK unset:
+
+  arch/x86/mm/mmio-mod.c:375:6: warning: comparison of array 'downed_cpus'
+  equal to a null pointer is always false [-Wtautological-pointer-compare]
+          if (downed_cpus == NULL &&
+              ^~~~~~~~~~~    ~~~~
+  arch/x86/mm/mmio-mod.c:405:6: warning: comparison of array 'downed_cpus'
+  equal to a null pointer is always false [-Wtautological-pointer-compare]
+          if (downed_cpus == NULL || cpumask_weight(downed_cpus) == 0)
+              ^~~~~~~~~~~    ~~~~
+  2 warnings generated.
+
+Commit
+
+  f7e30f01a9e2 ("cpumask: Add helper cpumask_available()")
+
+added cpumask_available() to fix warnings of this nature. Use that here
+so that clang does not warn regardless of CONFIG_CPUMASK_OFFSTACK's
+value.
+
+Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+Link: https://github.com/ClangBuiltLinux/linux/issues/982
+Link: https://lkml.kernel.org/r/20200408205323.44490-1-natechancellor@gmail.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/x86/mm/mmio-mod.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
+index 4d434ddb75db..f140b2d39319 100644
+--- a/arch/x86/mm/mmio-mod.c
++++ b/arch/x86/mm/mmio-mod.c
+@@ -385,7 +385,7 @@ static void enter_uniprocessor(void)
+       int cpu;
+       int err;
+-      if (downed_cpus == NULL &&
++      if (!cpumask_available(downed_cpus) &&
+           !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) {
+               pr_notice("Failed to allocate mask\n");
+               goto out;
+@@ -415,7 +415,7 @@ static void leave_uniprocessor(void)
+       int cpu;
+       int err;
+-      if (downed_cpus == NULL || cpumask_weight(downed_cpus) == 0)
++      if (!cpumask_available(downed_cpus) || cpumask_weight(downed_cpus) == 0)
+               return;
+       pr_notice("Re-enabling CPUs...\n");
+       for_each_cpu(cpu, downed_cpus) {
+-- 
+2.25.1
+