netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail.net>
To: Ankit Khushwaha <ankitkhushwaha.linux@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: tls: fix read/write of garbage value
Date: Sat, 29 Nov 2025 11:22:06 +0100	[thread overview]
Message-ID: <aSrJTmtJqOX0rNDh@krikkit> (raw)
In-Reply-To: <20251129063726.31210-1-ankitkhushwaha.linux@gmail.com>

2025-11-29, 12:07:26 +0530, Ankit Khushwaha wrote:
> In 'poll_partial_rec_async' a uninitialized char variable 'token' with
> *garbage* value is used for write/read instruction to synchronize
> between threads via a pipe.
> 
> tls.c:2833:26: warning: variable 'token' is uninitialized
>       when passed as a const pointer argument here
>       [-Wuninitialized-const-pointer]
>  2833 |            EXPECT_EQ(write(p[1], &token, 1), 1); /* Barrier #1 */
> 
> Initialize 'token' to '\0' to prevent write/read of garbage value.

I'm not opposed to making the compiler happy, but in this case
"garbage" is completely fine, we don't care about the value.

So I think the subject and the commit message should talk about
"silencing a compiler warning" rather than "fixing use of garbage
value".

And your patch should indicate the target tree in the subject (here,
with [PATCH net-next]), see
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html

-- 
Sabrina

  reply	other threads:[~2025-11-29 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-29  6:37 [PATCH] selftests: tls: fix read/write of garbage value Ankit Khushwaha
2025-11-29 10:22 ` Sabrina Dubroca [this message]
2025-11-29 15:40   ` Ankit Khushwaha

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=aSrJTmtJqOX0rNDh@krikkit \
    --to=sd@queasysnail.net \
    --cc=ankitkhushwaha.linux@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@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;
as well as URLs for NNTP newsgroup(s).