public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: David Binderman <dcb314@hotmail.com>
Cc: "ardb@kernel.org" <ardb@kernel.org>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"will@kernel.org" <will@kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-6.14/arch/arm64/lib/crc-t10dif-glue.c bug report
Date: Wed, 26 Mar 2025 13:11:59 -0700	[thread overview]
Message-ID: <20250326201159.GA6625@sol.localdomain> (raw)
In-Reply-To: <AS8PR02MB102170568EAE7FFDF93C8D1ED9CA62@AS8PR02MB10217.eurprd02.prod.outlook.com>

On Wed, Mar 26, 2025 at 07:12:00PM +0000, David Binderman wrote:
> Hello there,
> 
> Static analyser cppcheck says:
> 
>  linux-6.14/arch/arm64/lib/crc-t10dif-glue.c:53:33: error: Using pointer to local variable 'buf' that is out of scope. [invalidLifetime]
> 
> Source code is
> 
>     return crc_t10dif_generic(crc, data, length);
> 
> but this line
> 
>             data = buf;
> 
> looks very suspicious. Suggest move local variable buf out
> to file scope.
> 
> Regards
> 
> David Binderman

Thanks for finding this!  Kind of a silly bug, but that's what we get for
programming in C...
https://lore.kernel.org/r/20250326200812.125574-1-ebiggers@kernel.org and
https://lore.kernel.org/r/20250326200918.125743-1-ebiggers@kernel.org fix this
for arm and arm64.

- Eric


      reply	other threads:[~2025-03-26 20:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26 19:12 linux-6.14/arch/arm64/lib/crc-t10dif-glue.c bug report David Binderman
2025-03-26 20:11 ` Eric Biggers [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=20250326201159.GA6625@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=dcb314@hotmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will@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