All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pmcraid: don't use GFP_DMA in pmcraid_alloc_sglist
@ 2021-12-22  9:22 Christoph Hellwig
  2021-12-23  4:46 ` Martin K. Petersen
  2022-01-05 20:35 ` Christophe JAILLET
  0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2021-12-22  9:22 UTC (permalink / raw)
  To: martin.petersen; +Cc: linux-scsi

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(-)

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;
 }
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] pmcraid: don't use GFP_DMA in pmcraid_alloc_sglist
  2021-12-22  9:22 [PATCH] pmcraid: don't use GFP_DMA in pmcraid_alloc_sglist Christoph Hellwig
@ 2021-12-23  4:46 ` Martin K. Petersen
  2022-01-05 20:35 ` Christophe JAILLET
  1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-12-23  4:46 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: martin.petersen, linux-scsi


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!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pmcraid: don't use GFP_DMA in pmcraid_alloc_sglist
  2021-12-22  9:22 [PATCH] pmcraid: don't use GFP_DMA in pmcraid_alloc_sglist Christoph Hellwig
  2021-12-23  4:46 ` Martin K. Petersen
@ 2022-01-05 20:35 ` Christophe JAILLET
  2022-01-10  8:50   ` Christoph Hellwig
  1 sibling, 1 reply; 4+ messages in thread
From: Christophe JAILLET @ 2022-01-05 20:35 UTC (permalink / raw)
  To: hch; +Cc: linux-scsi, martin.petersen, Kernel Janitors

> 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  <https://lore.kernel.org/all/20211222092247.928711-1-hch@lst.de/#Z31drivers:scsi:pmcraid.c>  | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff 
<https://lore.kernel.org/all/20211222092247.928711-1-hch@lst.de/#iZ31drivers:scsi:pmcraid.c> 
--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;
>  }

Hi,

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/


CJ


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pmcraid: don't use GFP_DMA in pmcraid_alloc_sglist
  2022-01-05 20:35 ` Christophe JAILLET
@ 2022-01-10  8:50   ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-01-10  8:50 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: hch, linux-scsi, martin.petersen, Kernel Janitors

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-10  8:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22  9:22 [PATCH] pmcraid: don't use GFP_DMA in pmcraid_alloc_sglist Christoph Hellwig
2021-12-23  4:46 ` Martin K. Petersen
2022-01-05 20:35 ` Christophe JAILLET
2022-01-10  8:50   ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.