All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDMA/uverbs: Check for null return of kmalloc_array
Date: Mon, 3 Jan 2022 13:56:06 +0200	[thread overview]
Message-ID: <YdLkViIfDnDbaA+V@unreal> (raw)
In-Reply-To: <20211231093315.1917667-1-jiasheng@iscas.ac.cn>

On Fri, Dec 31, 2021 at 05:33:15PM +0800, Jiasheng Jiang wrote:
> Because of the possible failure of the allocation, data might be NULL
> pointer and will cause the dereference of the NULL pointer later.
> Therefore, it might be better to check it and return -ENOMEM.
> 
> Fixes: 6884c6c4bd09 ("RDMA/verbs: Store the write/write_ex uapi entry points in the uverbs_api")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
>  drivers/infiniband/core/uverbs_uapi.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

  reply	other threads:[~2022-01-03 11:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-31  9:33 [PATCH] RDMA/uverbs: Check for null return of kmalloc_array Jiasheng Jiang
2022-01-03 11:56 ` Leon Romanovsky [this message]
2022-01-05 18:24 ` Jason Gunthorpe

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=YdLkViIfDnDbaA+V@unreal \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=jiasheng@iscas.ac.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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.