From: Leon Romanovsky <leon@kernel.org>
To: Bernard Metzler <bernard.metzler@linux.dev>
Cc: rosenp@gmail.com, jgg@ziepe.ca, kees@kernel.org,
gustavoars@kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [RFC PATCH v3] RDMA/siw: use kzalloc_flex
Date: Sun, 17 May 2026 17:52:45 +0300 [thread overview]
Message-ID: <20260517145245.GI33515@unreal> (raw)
In-Reply-To: <7463ed4b-543c-49d4-9337-f41915354a3f@linux.dev>
On Thu, May 14, 2026 at 03:14:24PM +0200, Bernard Metzler wrote:
> On 13.05.2026 19:45, Leon Romanovsky wrote:
> >
> > On Mon, 11 May 2026 16:11:49 +0200, bernard.metzler@linux.dev wrote:
> > > Simplify umem allocation by using flexible array member.
> > > Add __counted_by to get extra runtime analysis.
> >
> > Applied, thanks!
> >
> > [1/1] RDMA/siw: use kzalloc_flex
> > https://git.kernel.org/rdma/rdma/c/79678bea399052
> >
> > Best regards,
> Hi Leon,
>
> per Jason's suggestion, please amend the patch by
> adding below line. We should NOT assume kzalloc_flex
> to initialize anything but 0. So we shall set
> umem->num_chunks explicitly.
done, thanks
>
> Many thanks,
> Bernard.
> ----
>
> diff --git a/drivers/infiniband/sw/siw/siw_mem.c b/drivers/infiniband/sw/siw/siw_mem.c
> index 88ec3cacfa00..40455616d9ec 100644
> --- a/drivers/infiniband/sw/siw/siw_mem.c
> +++ b/drivers/infiniband/sw/siw/siw_mem.c
> @@ -359,6 +359,7 @@ struct siw_umem *siw_umem_get(struct ib_device *base_dev, u64 start,
> umem->fp_addr = first_page_va;
> umem->base_mem = base_mem;
> umem->num_pages = num_pages;
> + umem->num_chunks = num_chunks;
>
> sgt = &base_mem->sgt_append.sgt;
> __sg_page_iter_start(&sg_iter, sgt->sgl, sgt->orig_nents, 0);
>
>
prev parent reply other threads:[~2026-05-17 14:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 14:11 [RFC PATCH v3] RDMA/siw: use kzalloc_flex bernard.metzler
2026-05-13 14:17 ` Bernard Metzler
2026-05-13 14:28 ` Jason Gunthorpe
2026-05-14 16:12 ` Kees Cook
2026-05-13 17:45 ` Leon Romanovsky
2026-05-14 13:14 ` Bernard Metzler
2026-05-17 14:52 ` Leon Romanovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260517145245.GI33515@unreal \
--to=leon@kernel.org \
--cc=bernard.metzler@linux.dev \
--cc=gustavoars@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kees@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=rosenp@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.