From: Sasha Levin Date: Mon, 26 Oct 2020 14:39:23 +0000 (-0400) Subject: Fixes for 5.8 X-Git-Tag: v4.4.241~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=45bac2d3e6e15c5d3c8d046232e1b6db89c7f01f;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.8 Signed-off-by: Sasha Levin --- diff --git a/queue-5.8/net-korina-cast-kseg0-address-to-pointer-in-kfree.patch b/queue-5.8/net-korina-cast-kseg0-address-to-pointer-in-kfree.patch new file mode 100644 index 00000000000..2d031c4388e --- /dev/null +++ b/queue-5.8/net-korina-cast-kseg0-address-to-pointer-in-kfree.patch @@ -0,0 +1,48 @@ +From 6bdadf3406004be527922cbc7040a43702ffd5ad Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 18 Oct 2020 20:42:55 +0200 +Subject: net: korina: cast KSEG0 address to pointer in kfree + +From: Valentin Vidic + +[ Upstream commit 3bd57b90554b4bb82dce638e0668ef9dc95d3e96 ] + +Fixes gcc warning: + +passing argument 1 of 'kfree' makes pointer from integer without a cast + +Fixes: 3af5f0f5c74e ("net: korina: fix kfree of rx/tx descriptor array") +Reported-by: kernel test robot +Signed-off-by: Valentin Vidic +Link: https://lore.kernel.org/r/20201018184255.28989-1-vvidic@valentin-vidic.from.hr +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/korina.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c +index af441d699a57a..bf48f0ded9c7d 100644 +--- a/drivers/net/ethernet/korina.c ++++ b/drivers/net/ethernet/korina.c +@@ -1113,7 +1113,7 @@ static int korina_probe(struct platform_device *pdev) + return rc; + + probe_err_register: +- kfree(KSEG0ADDR(lp->td_ring)); ++ kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring)); + probe_err_td_ring: + iounmap(lp->tx_dma_regs); + probe_err_dma_tx: +@@ -1133,7 +1133,7 @@ static int korina_remove(struct platform_device *pdev) + iounmap(lp->eth_regs); + iounmap(lp->rx_dma_regs); + iounmap(lp->tx_dma_regs); +- kfree(KSEG0ADDR(lp->td_ring)); ++ kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring)); + + unregister_netdev(bif->dev); + free_netdev(bif->dev); +-- +2.25.1 + diff --git a/queue-5.8/s390-qeth-don-t-let-hw-override-the-configured-port-.patch b/queue-5.8/s390-qeth-don-t-let-hw-override-the-configured-port-.patch new file mode 100644 index 00000000000..43a5171eb8a --- /dev/null +++ b/queue-5.8/s390-qeth-don-t-let-hw-override-the-configured-port-.patch @@ -0,0 +1,50 @@ +From 0be363ccc58686154bc743984bfc32ff2370602f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 27 Aug 2020 10:17:02 +0200 +Subject: s390/qeth: don't let HW override the configured port role + +From: Julian Wiedmann + +[ Upstream commit a04f0ecacdb0639d416614619225a39de3927e22 ] + +The only time that our Bridgeport role should change is when we change +the configuration ourselves. In which case we also adjust our internal +state tracking, no need to do it again when we receive the corresponding +event. + +Removing the locked section helps a subsequent patch that needs to flush +the workqueue while under sbp_lock. + +It would be nice to raise a warning here in case HW does weird things +after all, but this could end up generating false-positives when we +change the configuration ourselves. + +Suggested-by: Alexandra Winter +Signed-off-by: Julian Wiedmann +Reviewed-by: Alexandra Winter +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/s390/net/qeth_l2_main.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c +index 0384b45a72658..7c6f6a09b99e4 100644 +--- a/drivers/s390/net/qeth_l2_main.c ++++ b/drivers/s390/net/qeth_l2_main.c +@@ -1122,12 +1122,6 @@ static void qeth_bridge_state_change_worker(struct work_struct *work) + NULL + }; + +- /* Role should not change by itself, but if it did, */ +- /* information from the hardware is authoritative. */ +- mutex_lock(&data->card->sbp_lock); +- data->card->options.sbp.role = entry->role; +- mutex_unlock(&data->card->sbp_lock); +- + snprintf(env_locrem, sizeof(env_locrem), "BRIDGEPORT=statechange"); + snprintf(env_role, sizeof(env_role), "ROLE=%s", + (entry->role == QETH_SBP_ROLE_NONE) ? "none" : +-- +2.25.1 + diff --git a/queue-5.8/series b/queue-5.8/series index f5c725a2381..4657058c72f 100644 --- a/queue-5.8/series +++ b/queue-5.8/series @@ -622,3 +622,5 @@ drm-amd-display-screen-corruption-on-dual-displays-d.patch dmaengine-dw-add-dma-channels-mask-cell-support.patch dmaengine-dw-activate-fifo-mode-for-memory-periphera.patch ath10k-check-idx-validity-in-__ath10k_htt_rx_ring_fi.patch +net-korina-cast-kseg0-address-to-pointer-in-kfree.patch +s390-qeth-don-t-let-hw-override-the-configured-port-.patch