mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org, andrew@lunn.ch, gregory.clement@bootlin.com,
	sebastian.hesselbarth@gmail.com, lee@kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v4 1/3] auxdisplay: Add 7-segment LED display driver
Date: Tue, 5 Mar 2024 16:57:25 +0200	[thread overview]
Message-ID: <Zecy1RsSfpmH-cvG@smile.fi.intel.com> (raw)
In-Reply-To: <CAMuHMdXF+12PHa5A7WeyPMfvsGcJN13WaPuCbTmJU52Huq=osA@mail.gmail.com>

On Tue, Mar 05, 2024 at 09:23:07AM +0100, Geert Uytterhoeven wrote:
> On Tue, Mar 5, 2024 at 4:59 AM Chris Packham
> <chris.packham@alliedtelesis.co.nz> wrote:

...

> > +       priv->segment_gpios = devm_gpiod_get_array(dev, "segment", GPIOD_OUT_LOW);
> > +       if (IS_ERR(priv->segment_gpios))
> > +               return PTR_ERR(priv->segment_gpios);
> 
> This needs some validation of priv->segment_gpios->ndescs, else the
> call to gpiod_set_array_value_cansleep() in seg_led_update() may
> trigger an out-of-bounds access of the values bitmap.

Alternatively we can call gpiod_count() beforehand and check its result.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-03-05 14:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  3:58 [PATCH v4 0/3] auxdisplay: 7-segment LED display Chris Packham
2024-03-05  3:58 ` [PATCH v4 1/3] auxdisplay: Add 7-segment LED display driver Chris Packham
2024-03-05  8:14   ` Geert Uytterhoeven
2024-03-05  8:23   ` Geert Uytterhoeven
2024-03-05 14:57     ` Andy Shevchenko [this message]
2024-03-05 22:34       ` Chris Packham
2024-03-06 10:58         ` Andy Shevchenko
2024-03-05  3:58 ` [PATCH v4 2/3] dt-bindings: auxdisplay: Add bindings for generic 7-segment LED Chris Packham
2024-03-05  8:19   ` Geert Uytterhoeven
2024-03-05  3:58 ` [PATCH v4 3/3] ARM: dts: marvell: Add 7-segment LED display on x530 Chris Packham

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=Zecy1RsSfpmH-cvG@smile.fi.intel.com \
    --to=andy@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /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

Powered by JetHome