From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Geoff Levand <geoff@infradead.org>,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Paul Mackerras <paulus@samba.org>,
kernel-janitors@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: powerpc: signedness bug in update_flash_db()
Date: Mon, 15 Oct 2018 15:01:01 +1100 (AEDT) [thread overview]
Message-ID: <42YPqx5Pf3z9sCw@ozlabs.org> (raw)
In-Reply-To: <20181001164458.GB29197@mwanda>
On Mon, 2018-10-01 at 16:44:58 UTC, Dan Carpenter wrote:
> The "count < sizeof(struct os_area_db)" comparison is type promoted to
> size_t so negative values of "count" are treated as very high values and
> we accidentally return success instead of a negative error code.
>
> This doesn't really change runtime much but it fixes a static checker
> warning.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Acked-by: Geoff Levand <geoff@infradead.org>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/014704e6f54189a203cc14c7c0bb41
cheers
prev parent reply other threads:[~2018-10-15 4:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 16:44 [PATCH] powerpc: signedness bug in update_flash_db() Dan Carpenter
2018-10-01 18:22 ` christophe leroy
2018-10-01 19:02 ` Dan Carpenter
2018-10-01 19:06 ` Dan Carpenter
2018-10-09 11:54 ` Michael Ellerman
2018-10-01 22:45 ` Geoff Levand
2018-10-15 4:01 ` Michael Ellerman [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=42YPqx5Pf3z9sCw@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=dan.carpenter@oracle.com \
--cc=geoff@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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).