Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
To: Thorsten Blum <thorsten.blum@linux.dev>,
	Carl Vanderlip <carl.vanderlip@oss.qualcomm.com>,
	Oded Gabbay <ogabbay@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] accel/qaic: Replace kcalloc + copy_from_user with memdup_array_user
Date: Mon, 6 Oct 2025 14:12:12 -0600	[thread overview]
Message-ID: <ee526600-05cd-4ead-88cd-ceca776ade80@oss.qualcomm.com> (raw)
In-Reply-To: <20250917124805.90395-4-thorsten.blum@linux.dev>

On 9/17/2025 6:48 AM, Thorsten Blum wrote:
> Replace kcalloc() followed by copy_from_user() with memdup_array_user()
> to improve and simplify both __qaic_execute_bo_ioctl() and
> qaic_perf_stats_bo_ioctl().
> 
> In __qaic_execute_bo_ioctl(), return early if an error occurs and remove
> the obsolete 'free_exec' label.
> 
> Since memdup_array_user() already checks for multiplication overflow,
> remove the manual check in __qaic_execute_bo_ioctl(). Remove any unused
> local variables accordingly.
> 
> Since 'ret = copy_from_user()' has been removed, initialize 'ret = 0' to
> preserve the same return value on success.
> 
> No functional changes intended.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>

  reply	other threads:[~2025-10-06 20:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 12:48 [PATCH 1/2] accel/qaic: Replace kzalloc + copy_from_user with memdup_user Thorsten Blum
2025-09-17 12:48 ` [PATCH 2/2] accel/qaic: Replace kcalloc + copy_from_user with memdup_array_user Thorsten Blum
2025-10-06 20:12   ` Jeff Hugo [this message]
2025-10-06 20:14   ` Jeff Hugo
2025-09-17 12:54 ` [PATCH 1/2] accel/qaic: Replace kzalloc + copy_from_user with memdup_user Karol Wachowski
2025-10-06 20:05 ` Jeff Hugo
2025-10-06 20:14 ` Jeff Hugo

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=ee526600-05cd-4ead-88cd-ceca776ade80@oss.qualcomm.com \
    --to=jeff.hugo@oss.qualcomm.com \
    --cc=carl.vanderlip@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ogabbay@kernel.org \
    --cc=thorsten.blum@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox