From: Dan Carpenter <error27@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: Marc Dionne <marc.dionne@auristor.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-afs@lists.infradead.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH net-next] rxrpc: uninitialized variable in rxrpc_send_ack_packet()
Date: Thu, 17 Nov 2022 13:34:57 +0300 [thread overview]
Message-ID: <Y3YOUQM/ldDe/sgC@kadam> (raw)
In-Reply-To: <3475095.1668678264@warthog.procyon.org.uk>
On Thu, Nov 17, 2022 at 09:44:24AM +0000, David Howells wrote:
> Dan Carpenter <error27@gmail.com> wrote:
>
> > The "pkt" was supposed to have been deleted in a previous patch. It
> > leads to an uninitialized variable bug.
>
> Weird. I don't get a compiler warning and the kernel doesn't crash, despite
> transmitting millions of acks.
>
> If I disassemble the built code, I see:
>
> 0xffffffff81b09e89 <+723>: xor %edi,%edi
> 0xffffffff81b09e8b <+725>: call 0xffffffff811c0bc1 <kfree>
>
> I'm not sure why it's sticking 0 in EDI, though.
We disabled GCC's check for uninitialized variables. It could be that
you have the .config to automatically zero out stack variables.
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
regards,
dan carpenter
next prev parent reply other threads:[~2022-11-17 10:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 7:44 [PATCH net-next] rxrpc: uninitialized variable in rxrpc_send_ack_packet() Dan Carpenter
2022-11-17 9:44 ` David Howells
2022-11-17 10:34 ` Dan Carpenter [this message]
2022-11-17 11:59 ` David Howells
2022-11-17 13:35 ` Dan Carpenter
2022-11-17 12:04 ` David Howells
2022-11-18 12:10 ` patchwork-bot+netdevbpf
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=Y3YOUQM/ldDe/sgC@kadam \
--to=error27@gmail.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=edumazet@google.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=marc.dionne@auristor.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.