On Fri, 04 Sep 2026 05:20:33 +0000, Chaithanya Lagisetty wrote:
> uffd_setup_demand_paging() passes the element size as the first argument
> to calloc() and the element count as the second:
> 
>       uffd_desc->pipefds = calloc(sizeof(int), num_readers);
> 
> calloc() expects the number of elements first and the size of each element
> second. The product, and therefore the allocation size, is the same either
> way, so this is not a functional change, but the arguments are misleading
> and GCC 14 diagnoses them with -Wcalloc-transposed-args, which is enabled
> by -Wextra.
> 
> [...]

Applied to kvm-x86 selftests, thanks!

[1/1] selftests: kvm: Fix transposed calloc() arguments in the uffd helper
      https://github.com/kvm-x86/linux/commit/202378243192

--
https://github.com/kvm-x86/linux/tree/next

Reply via email to