From: Sasha Levin Date: Mon, 26 Oct 2020 14:39:24 +0000 (-0400) Subject: Fixes for 4.14 X-Git-Tag: v4.4.241~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a8e6b095b6a085c5f33290417fb6b3f5378c558;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.14 Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/net-korina-cast-kseg0-address-to-pointer-in-kfree.patch b/queue-4.14/net-korina-cast-kseg0-address-to-pointer-in-kfree.patch new file mode 100644 index 00000000000..96d3c2475cd --- /dev/null +++ b/queue-4.14/net-korina-cast-kseg0-address-to-pointer-in-kfree.patch @@ -0,0 +1,48 @@ +From 660c245c7a1c58ba35d6115ef06c46b64417b6cc 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 1357d464e8c43..1eccdbaa9a515 100644 +--- a/drivers/net/ethernet/korina.c ++++ b/drivers/net/ethernet/korina.c +@@ -1188,7 +1188,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: +@@ -1208,7 +1208,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-4.14/series b/queue-4.14/series index 3dcad15daa6..5b76bad0092 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -183,3 +183,4 @@ brcm80211-fix-possible-memleak-in-brcmf_proto_msgbuf.patch usb-core-solve-race-condition-in-anchor-cleanup-func.patch scsi-ufs-ufs-qcom-fix-race-conditions-caused-by-ufs_.patch ath10k-check-idx-validity-in-__ath10k_htt_rx_ring_fi.patch +net-korina-cast-kseg0-address-to-pointer-in-kfree.patch