]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.14
authorSasha Levin <sashal@kernel.org>
Mon, 26 Oct 2020 14:39:24 +0000 (10:39 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 26 Oct 2020 14:39:24 +0000 (10:39 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.14/net-korina-cast-kseg0-address-to-pointer-in-kfree.patch [new file with mode: 0644]
queue-4.14/series

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 (file)
index 0000000..96d3c24
--- /dev/null
@@ -0,0 +1,48 @@
+From 660c245c7a1c58ba35d6115ef06c46b64417b6cc Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 18 Oct 2020 20:42:55 +0200
+Subject: net: korina: cast KSEG0 address to pointer in kfree
+
+From: Valentin Vidic <vvidic@valentin-vidic.from.hr>
+
+[ 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 <lkp@intel.com>
+Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
+Link: https://lore.kernel.org/r/20201018184255.28989-1-vvidic@valentin-vidic.from.hr
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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
+
index 3dcad15daa6b7da7ad25fc516c14fb2e2ff55311..5b76bad0092251b1ac7272a95cdc46dbc2d7ea95 100644 (file)
@@ -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