mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tobias Johansson <Tobias.Johansson@axis.com>
To: "lee@kernel.org" <lee@kernel.org>
Cc: "pavel@kernel.org" <pavel@kernel.org>,
	"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Kernel <Kernel@axis.com>
Subject: Re: [PATCH] leds: lp50xx: Read default intensity from devicetree
Date: Wed, 2 Dec 2026 13:43:03 +0000	[thread overview]
Message-ID: <ef814a67479732992e638981913b814b0a349fb7.camel@axis.com> (raw)
In-Reply-To: <20261202120925.GA43081@kernel.org>

On Wed, 2026-12-02 at 12:09 +0000, Lee Jones wrote:
> On Mon, 23 Nov 2026, Tobias Johansson wrote:
> 
> > On Thu, 2026-11-19 at 09:52 +0000, Lee Jones wrote:
> > > On Mon, 09 Nov 2026, Tobias Johansson wrote:
> > > > +			fwnode_property_read_u32(led_node,
> > > > "default-intensity",
> > > > +						
> > > > &mc_led_info[multi_index].intensity);
> > > 
> > > (multi_index >= LP50XX_LEDS_PER_MODULE) only tests for values too
> > > large.
> > > 
> > > What happens if `multi_index` is < 0?  OOB?
> > > 
> > 
> > Yes, good catch. multi_index is read with
> > fwnode_property_read_u32()
> > into a signed int, so values with the high bit set become negative
> > and
> > bypass the upper-bound check, causing an OOB write. I can change
> > multi_index to u32 so the existing check covers it.
> > 
> > Since both issues are pre-existing and caused by malformed
> > devicetrees,
> > I can send up a new patch series to fix these two issues hopefully
> > sometime this week.
> 
> It would be ideal if you could include this patch as part of the set.

Fair enough, I'll merge all three patches into one series.


// Tobias

      reply	other threads:[~2026-12-02 13:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 12:58 Tobias Johansson
2026-11-19  9:52 ` Lee Jones
2026-11-23 12:36   ` Tobias Johansson
2026-12-02 12:09     ` Lee Jones
2026-12-02 13:43       ` Tobias Johansson [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=ef814a67479732992e638981913b814b0a349fb7.camel@axis.com \
    --to=tobias.johansson@axis.com \
    --cc=Kernel@axis.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@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

all inboxes | Powered by JetHome®