* [PATCH] hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path
@ 2020-07-14 11:00 Christophe JAILLET
2020-07-14 21:11 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2020-07-14 11:00 UTC (permalink / raw)
To: jes, davem, kuba
Cc: linux-hippi, netdev, linux-kernel, kernel-janitors, Christophe JAILLET
The size used when calling 'pci_alloc_consistent()' and
'pci_free_consistent()' should match.
Fix it and have it consistent with the corresponding call in 'rr_close()'.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/hippi/rrunner.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index 2a6ec5394966..d0d5100eeb0c 100644
--- a/drivers/net/hippi/rrunner.c
+++ b/drivers/net/hippi/rrunner.c
@@ -1242,7 +1242,7 @@ static int rr_open(struct net_device *dev)
rrpriv->info = NULL;
}
if (rrpriv->rx_ctrl) {
- pci_free_consistent(pdev, sizeof(struct ring_ctrl),
+ pci_free_consistent(pdev, 256 * sizeof(struct ring_ctrl),
rrpriv->rx_ctrl, rrpriv->rx_ctrl_dma);
rrpriv->rx_ctrl = NULL;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path
2020-07-14 11:00 [PATCH] hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path Christophe JAILLET
@ 2020-07-14 21:11 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-14 21:11 UTC (permalink / raw)
To: christophe.jaillet
Cc: jes, kuba, linux-hippi, netdev, linux-kernel, kernel-janitors
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Tue, 14 Jul 2020 13:00:27 +0200
> The size used when calling 'pci_alloc_consistent()' and
> 'pci_free_consistent()' should match.
>
> Fix it and have it consistent with the corresponding call in 'rr_close()'.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-14 21:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 11:00 [PATCH] hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path Christophe JAILLET
2020-07-14 21:11 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).