All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Cc: linux-clk@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] clk: visconti: prevent array overflow in visconti_clk_register_gates()
Date: Thu, 17 Mar 2022 12:21:54 -0700	[thread overview]
Message-ID: <20220317192156.04190C340E9@smtp.kernel.org> (raw)
In-Reply-To: <20220316083533.GA30941@kili>

Quoting Dan Carpenter (2022-03-16 01:35:33)
> This code was using -1 to represent that there was no reset function.
> Unfortunately, the -1 was stored in u8 so the if (clks[i].rs_id >= 0)
> condition was always true.  This lead to an out of bounds access in
> visconti_clk_register_gates().
> 
> Fixes: b4cbe606dc36 ("clk: visconti: Add support common clock driver and reset driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---

Applied to clk-next

      parent reply	other threads:[~2022-03-17 19:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16  8:35 [PATCH] clk: visconti: prevent array overflow in visconti_clk_register_gates() Dan Carpenter
2022-03-17  5:19 ` nobuhiro1.iwamatsu
2022-03-17 19:21 ` Stephen Boyd [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=20220317192156.04190C340E9@smtp.kernel.org \
    --to=sboyd@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    /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.