LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Colin King" <colin.king@canonical.com>
Cc: <alsa-devel@alsa-project.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	<kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][next] ASoC: cx2072x: fix integer overflow on unsigned int multiply
Date: Sat, 25 May 2019 08:25:10 +0200	[thread overview]
Message-ID: <s5hlfyvaw55.wl-tiwai@suse.de> (raw)
In-Reply-To: <20190524222551.26573-1-colin.king@canonical.com>

On Sat, 25 May 2019 00:25:51 +0200,
Colin King wrote:
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> In the case where frac_div larger than 96 the result of an unsigned
> multiplication overflows an unsigned int.  For example, this can
> happen when the sample_rate is 192000 and pll_input is 122.  Fix
> this by casing the first term of the mutiply to a u64. Also remove
> the extraneous parentheses around the expression.
> 
> Addresses-Coverity: ("Unintentional integer overflow")
> Fixes: a497a4363706 ("ASoC: Add support for Conexant CX2072X CODEC")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi

  reply	other threads:[~2019-05-25  6:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24 22:25 Colin King
2019-05-25  6:25 ` Takashi Iwai [this message]
2019-05-28 15:06 ` Applied "ASoC: cx2072x: fix integer overflow on unsigned int multiply" to the asoc tree Mark Brown

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=s5hlfyvaw55.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --subject='Re: [PATCH][next] ASoC: cx2072x: fix integer overflow on unsigned int multiply' \
    /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

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).