lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <IA1PR11MB7727D411D88140BF45740D65CB97A@IA1PR11MB7727.namprd11.prod.outlook.com>
Date: Thu, 22 Jan 2026 20:53:15 +0000
From: "Nikolova, Tatyana E" <tatyana.e.nikolova@...el.com>
To: Carlos Bilbao <carlos.bilbao@...bdal.com>, "mustafa.ismail@...el.com"
	<mustafa.ismail@...el.com>, "shiraz.saleem@...el.com"
	<shiraz.saleem@...el.com>, "jgg@...pe.ca" <jgg@...pe.ca>, "leon@...nel.org"
	<leon@...nel.org>
CC: "bilbao@...edu" <bilbao@...edu>, "linux-rdma@...r.kernel.org"
	<linux-rdma@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "carlos.bilbao@...nel.org"
	<carlos.bilbao@...nel.org>
Subject: RE: [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address
 array



> -----Original Message-----
> From: Carlos Bilbao <carlos.bilbao@...bdal.com>
> Sent: Wednesday, January 21, 2026 12:55 PM
> To: mustafa.ismail@...el.com; shiraz.saleem@...el.com; jgg@...pe.ca;
> leon@...nel.org
> Cc: bilbao@...edu; linux-rdma@...r.kernel.org; linux-kernel@...r.kernel.org;
> carlos.bilbao@...nel.org
> Subject: [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address
> array
> 
> Allocate array chunk->dmainfo.dmaaddrs using kvzalloc() to allow the
> allocation to fall back to vmalloc when contiguous memory is unavailable
> (instead of failing and logging page allocation warnings).
> 
> Signed-off-by: Carlos Bilbao (Lambda) <carlos.bilbao@...nel.org>

Acked-by: Tatyana Nikolova <tatyana.e.nikolova@...el.com>

> ---
>  drivers/infiniband/hw/irdma/utils.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/irdma/utils.c
> b/drivers/infiniband/hw/irdma/utils.c
> index 0422787592d8..59ef9856fd25 100644
> --- a/drivers/infiniband/hw/irdma/utils.c
> +++ b/drivers/infiniband/hw/irdma/utils.c
> @@ -2257,7 +2257,7 @@ void irdma_pble_free_paged_mem(struct
> irdma_chunk
> *chunk)
>                                  chunk->pg_cnt);
> 
>  done:
> -       kfree(chunk->dmainfo.dmaaddrs);
> +       kvfree(chunk->dmainfo.dmaaddrs);
>         chunk->dmainfo.dmaaddrs = NULL;
>         vfree(chunk->vaddr);
>         chunk->vaddr = NULL;
> @@ -2274,7 +2274,7 @@ int irdma_pble_get_paged_mem(struct
> irdma_chunk
> *chunk, u32 pg_cnt)
>         u32 size;
>         void *va;
> 
> -       chunk->dmainfo.dmaaddrs = kzalloc(pg_cnt << 3, GFP_KERNEL);
> +       chunk->dmainfo.dmaaddrs = kvzalloc(pg_cnt << 3, GFP_KERNEL);
>         if (!chunk->dmainfo.dmaaddrs)
>                 return -ENOMEM;
> 
> @@ -2295,7 +2295,7 @@ int irdma_pble_get_paged_mem(struct
> irdma_chunk
> *chunk, u32 pg_cnt)
> 
>         return 0;
>  err:
> -       kfree(chunk->dmainfo.dmaaddrs);
> +       kvfree(chunk->dmainfo.dmaaddrs);
>         chunk->dmainfo.dmaaddrs = NULL;
> 
>         return -ENOMEM;
> -- 2.50.1 (Apple Git-155)
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ