Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: "Colin King (gmail)" <colin.i.king@gmail.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Shuah Khan <shuah@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kselftest@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] kselftest: vDSO: Fix accumulation of uninitialized ret when CLOCK_REALTIME is undefined
Date: Mon, 8 May 2023 11:37:46 -0600	[thread overview]
Message-ID: <f06b953c-5bc2-f46a-581f-c2ff87d2bbd5@linuxfoundation.org> (raw)
In-Reply-To: <530b12f1-b0d2-1183-c9a9-0f5f9d6e178d@gmail.com>

On 4/18/23 04:14, Colin King (gmail) wrote:
> On 18/04/2023 11:10, Vincenzo Frascino wrote:
>> Hi Colin,
>>
>> On 4/17/23 11:47, Colin Ian King wrote:
>>> In the unlikely case that CLOCK_REALTIME is not defined, variable ret is
>>> not initialized and further accumulation of return values to ret can leave
>>> ret in an undefined state. Fix this by initialized ret to zero and changing
>>> the assignment of ret to an accumulation for the CLOCK_REALTIME case.
>>>
>>
>> I was wondering how did you find this.
> 
> I used cppcheck --force --enable=all, this examines the #if defined() paths.
> 
>>
>> Apart that:
>>
>> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>>

Applied to linux-kselftest next

thanks,
-- Shuah


      reply	other threads:[~2023-05-08 17:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 10:47 [PATCH] kselftest: vDSO: Fix accumulation of uninitialized ret when CLOCK_REALTIME is undefined Colin Ian King
2023-04-18 10:10 ` Vincenzo Frascino
2023-04-18 10:14   ` Colin King (gmail)
2023-05-08 17:37     ` Shuah Khan [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=f06b953c-5bc2-f46a-581f-c2ff87d2bbd5@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=colin.i.king@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vincenzo.frascino@arm.com \
    /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