Re: [PATCH v2 2/3] accel/rocket: Use an unsigned index to copy the job's tasks

From: Jeff Hugo

Date: Fri Oct 09 2026 - 12:52:06 EST


On 10/4/2026 10:47 AM, Sidong Yang wrote:
task_count is a u32 from userspace, but rocket_copy_tasks() walks it
with an int index, which would overflow for counts above INT_MAX. That
is not reachable today, since kvmalloc_objs() rejects any count above
INT_MAX / 16, but use an unsigned index to match the type.

Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
Closes: https://lore.kernel.org/all/20260711063638.61B411F000E9@xxxxxxxxxxxxxxx/
Signed-off-by: Sidong Yang <sidong.yang@xxxxxxxxxx>

Reviewed-by: Jeff Hugo <jeff.hugo@xxxxxxxxxxxxxxxx>