diff mbox series

pmcraid: don't use GFP_DMA in pmcraid_alloc_sglist

Message ID 20211222092247.928711-1-hch@lst.de
State New
Headers show
Series pmcraid: don't use GFP_DMA in pmcraid_alloc_sglist | expand

Commit Message

Christoph Hellwig Dec. 22, 2021, 9:22 a.m. UTC
The driver doesn't express DMA addressing limitation under 32-bits
anywhere else, so remove the spurious GFP_DMA allocation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/scsi/pmcraid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Martin K. Petersen Dec. 23, 2021, 4:46 a.m. UTC | #1
Christoph,

> The driver doesn't express DMA addressing limitation under 32-bits
> anywhere else, so remove the spurious GFP_DMA allocation.

Applied to 5.17/scsi-staging, thanks!
Christoph Hellwig Jan. 10, 2022, 8:50 a.m. UTC | #2
On Wed, Jan 05, 2022 at 09:35:12PM +0100, Christophe JAILLET wrote:
> some time ago I sent a patch because the address returned by
> sgl_alloc_order() isn't saved anywhere and really look like a bogus allocation and certainly a memory leak.
>
> See https://lore.kernel.org/linux-kernel/20200920075722.376644-1-christophe.jaillet@wanadoo.fr/

Can you resubmit that patch?
diff mbox series

Patch

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 2fe7a0019fff2..928532180d323 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -3221,8 +3221,8 @@  static struct pmcraid_sglist *pmcraid_alloc_sglist(int buflen)
 		return NULL;
 
 	sglist->order = order;
-	sgl_alloc_order(buflen, order, false,
-			GFP_KERNEL | GFP_DMA | __GFP_ZERO, &sglist->num_sg);
+	sgl_alloc_order(buflen, order, false, GFP_KERNEL | __GFP_ZERO,
+			&sglist->num_sg);
 
 	return sglist;
 }