From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
pbonzini@redhat.com,
Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
Cc: shuah@kernel.org, kvm@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: kvm: Fix transposed calloc() arguments in the uffd helper
Date: Mon, 21 Sep 2026 07:05:40 -0700 [thread overview]
Message-ID: <178999930104.756417.9813560375893651858.b4-ty@google.com> (raw)
In-Reply-To: <20260904052033.3648259-1-nagachaithanya9911@gmail.com>
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
prev parent reply other threads:[~2026-09-21 14:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 5:20 Chaithanya Lagisetty
2026-09-09 13:49 ` Gautam Menghani
2026-09-11 16:02 ` Sean Christopherson
2026-09-21 14:05 ` Sean Christopherson [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=178999930104.756417.9813560375893651858.b4-ty@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nagachaithanya9911@gmail.com \
--cc=pbonzini@redhat.com \
--cc=shuah@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®