All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: Doug Ledford <dledford@redhat.com>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IB/uverbs: Add a check for uverbs_attr_get
Date: Tue, 22 Oct 2019 16:12:16 -0300	[thread overview]
Message-ID: <20191022191216.GE23952@ziepe.ca> (raw)
In-Reply-To: <20191018081533.8544-1-hslester96@gmail.com>

On Fri, Oct 18, 2019 at 04:15:34PM +0800, Chuhong Yuan wrote:
> Only uverbs_copy_to_struct_or_zero in uverbs_ioctl.c does not have a
> check for uverbs_attr_get.
> Although its usage in uverbs_response has a check for attr's validity,
> UVERBS_HANDLER does not.
> Therefore, it is better to add a check like other functions in
> uverbs_ioctl.c.
> 
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
>  drivers/infiniband/core/uverbs_ioctl.c | 3 +++
>  1 file changed, 3 insertions(+)

The call in uverbs_ioctl.c is safe as well, that code path checks that
the attribute exists.

Still, it make sense that this check should be present, so applied to
for-next with a clearer commit message

Thanks,
Jason

      reply	other threads:[~2019-10-22 19:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18  8:15 [PATCH] IB/uverbs: Add a check for uverbs_attr_get Chuhong Yuan
2019-10-22 19:12 ` Jason Gunthorpe [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=20191022191216.GE23952@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dledford@redhat.com \
    --cc=hslester96@gmail.com \
    --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.