Re: [PATCH net-next] rxrpc: uninitialized variable in rxrpc_send_ack_packet()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 17, 2022 at 09:44:24AM +0000, David Howells wrote:
> Dan Carpenter <error27@xxxxxxxxx> 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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux