From: Greg Kroah-Hartman Date: Mon, 3 Jul 2017 09:52:20 +0000 (+0200) Subject: 3.18-stable patches X-Git-Tag: v3.18.60~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f4efeceab20cbdde7e2860c6b6fed4451bb9dc9;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: mtd-bcm47xxpart-limit-scanned-flash-area-on-bcm47xx-mips-only.patch net-korina-fix-napi-versus-resources-freeing.patch --- diff --git a/queue-3.18/mtd-bcm47xxpart-limit-scanned-flash-area-on-bcm47xx-mips-only.patch b/queue-3.18/mtd-bcm47xxpart-limit-scanned-flash-area-on-bcm47xx-mips-only.patch new file mode 100644 index 00000000000..8b5219e850d --- /dev/null +++ b/queue-3.18/mtd-bcm47xxpart-limit-scanned-flash-area-on-bcm47xx-mips-only.patch @@ -0,0 +1,41 @@ +From 2a36a5c30eab9cd1c9d2d08bd27cd763325d70c5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sat, 5 Dec 2015 02:09:43 +0100 +Subject: mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS) only +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Rafał Miłecki + +commit 2a36a5c30eab9cd1c9d2d08bd27cd763325d70c5 upstream. + +We allowed using bcm47xxpart on BCM5301X arch with commit: +9e3afa5f5c7 ("mtd: bcm47xxpart: allow enabling on ARCH_BCM_5301X") + +BCM5301X devices may contain some partitions in higher memory, e.g. +Netgear R8000 has board_data at 0x2600000. To detect them we should +use size limit on MIPS only. + +Signed-off-by: Rafał Miłecki +Signed-off-by: Brian Norris +Signed-off-by: Amit Pundir +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mtd/bcm47xxpart.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/mtd/bcm47xxpart.c ++++ b/drivers/mtd/bcm47xxpart.c +@@ -87,8 +87,8 @@ static int bcm47xxpart_parse(struct mtd_ + /* Parse block by block looking for magics */ + for (offset = 0; offset <= master->size - blocksize; + offset += blocksize) { +- /* Nothing more in higher memory */ +- if (offset >= 0x2000000) ++ /* Nothing more in higher memory on BCM47XX (MIPS) */ ++ if (config_enabled(CONFIG_BCM47XX) && offset >= 0x2000000) + break; + + if (curr_part >= BCM47XXPART_MAX_PARTS) { diff --git a/queue-3.18/net-korina-fix-napi-versus-resources-freeing.patch b/queue-3.18/net-korina-fix-napi-versus-resources-freeing.patch new file mode 100644 index 00000000000..21e4d7e6df6 --- /dev/null +++ b/queue-3.18/net-korina-fix-napi-versus-resources-freeing.patch @@ -0,0 +1,59 @@ +From e6afb1ad88feddf2347ea779cfaf4d03d3cd40b6 Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Fri, 23 Dec 2016 19:56:56 -0800 +Subject: net: korina: Fix NAPI versus resources freeing + +From: Florian Fainelli + +commit e6afb1ad88feddf2347ea779cfaf4d03d3cd40b6 upstream. + +Commit beb0babfb77e ("korina: disable napi on close and restart") +introduced calls to napi_disable() that were missing before, +unfortunately this leaves a small window during which NAPI has a chance +to run, yet we just freed resources since korina_free_ring() has been +called: + +Fix this by disabling NAPI first then freeing resource, and make sure +that we also cancel the restart task before doing the resource freeing. + +Fixes: beb0babfb77e ("korina: disable napi on close and restart") +Reported-by: Alexandros C. Couloumbis +Signed-off-by: Florian Fainelli +Signed-off-by: David S. Miller +Signed-off-by: Amit Pundir +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/korina.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/net/ethernet/korina.c ++++ b/drivers/net/ethernet/korina.c +@@ -900,10 +900,10 @@ static void korina_restart_task(struct w + DMA_STAT_DONE | DMA_STAT_HALT | DMA_STAT_ERR, + &lp->rx_dma_regs->dmasm); + +- korina_free_ring(dev); +- + napi_disable(&lp->napi); + ++ korina_free_ring(dev); ++ + if (korina_init(dev) < 0) { + printk(KERN_ERR "%s: cannot restart device\n", dev->name); + return; +@@ -1064,12 +1064,12 @@ static int korina_close(struct net_devic + tmp = tmp | DMA_STAT_DONE | DMA_STAT_HALT | DMA_STAT_ERR; + writel(tmp, &lp->rx_dma_regs->dmasm); + +- korina_free_ring(dev); +- + napi_disable(&lp->napi); + + cancel_work_sync(&lp->restart_task); + ++ korina_free_ring(dev); ++ + free_irq(lp->rx_irq, dev); + free_irq(lp->tx_irq, dev); + free_irq(lp->ovr_irq, dev); diff --git a/queue-3.18/series b/queue-3.18/series index 3a8c652a1e3..2509f49196a 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -22,3 +22,5 @@ usb-gadget-f_fs-fix-possibe-deadlock.patch sysctl-enable-strict-writes.patch mm-numa-avoid-waiting-on-freed-migrated-pages.patch arm-dts-bcm5301x-correct-gic_ppi-interrupt-flags.patch +net-korina-fix-napi-versus-resources-freeing.patch +mtd-bcm47xxpart-limit-scanned-flash-area-on-bcm47xx-mips-only.patch