All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Sasha Levin <sashal@kernel.org>
Cc: stable@vger.kernel.org, stable-commits@vger.kernel.org,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>
Subject: Re: Patch "iio: light: isl29125: Use iio_push_to_buffers_with_ts() to allow source size runtime check" has been added to the 6.17-stable tree
Date: Wed, 5 Nov 2025 10:53:11 +0000	[thread overview]
Message-ID: <20251105105311.000045bb@huawei.com> (raw)
In-Reply-To: <20251104233644.350147-1-sashal@kernel.org>

On Tue,  4 Nov 2025 18:36:44 -0500
Sasha Levin <sashal@kernel.org> wrote:

> This is a note to let you know that I've just added the patch titled
> 
>     iio: light: isl29125: Use iio_push_to_buffers_with_ts() to allow source size runtime check
> 
> to the 6.17-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> The filename of the patch is:
>      iio-light-isl29125-use-iio_push_to_buffers_with_ts-t.patch
> and it can be found in the queue-6.17 subdirectory.
> 
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.
> 

This isn't a fix.  Harmless if another fix needs it for context but
in of itself not otherwise appropriate for stable.

The hardening is against code bugs and there isn't one here - longer
term we want to deprecate and remove the old interface.

J
> 
> 
> commit 72afc12515b357d26a5ce4f0149379ef797e3e37
> Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Date:   Sat Aug 2 17:44:29 2025 +0100
> 
>     iio: light: isl29125: Use iio_push_to_buffers_with_ts() to allow source size runtime check
>     
>     [ Upstream commit f0ffec3b4fa7e430f92302ee233c79aeb021fe14 ]
>     
>     Also move the structure used as the source to the stack as it is only 16
>     bytes and not the target of an DMA or similar.
>     
>     Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
>     Reviewed-by: Andy Shevchenko <andy@kernel.org>
>     Link: https://patch.msgid.link/20250802164436.515988-10-jic23@kernel.org
>     Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>     Signed-off-by: Sasha Levin <sashal@kernel.org>
> 
> diff --git a/drivers/iio/light/isl29125.c b/drivers/iio/light/isl29125.c
> index 6bc23b164cc55..3acb8a4f1d120 100644
> --- a/drivers/iio/light/isl29125.c
> +++ b/drivers/iio/light/isl29125.c
> @@ -51,11 +51,6 @@
>  struct isl29125_data {
>  	struct i2c_client *client;
>  	u8 conf1;
> -	/* Ensure timestamp is naturally aligned */
> -	struct {
> -		u16 chans[3];
> -		aligned_s64 timestamp;
> -	} scan;
>  };
>  
>  #define ISL29125_CHANNEL(_color, _si) { \
> @@ -179,6 +174,11 @@ static irqreturn_t isl29125_trigger_handler(int irq, void *p)
>  	struct iio_dev *indio_dev = pf->indio_dev;
>  	struct isl29125_data *data = iio_priv(indio_dev);
>  	int i, j = 0;
> +	/* Ensure timestamp is naturally aligned */
> +	struct {
> +		u16 chans[3];
> +		aligned_s64 timestamp;
> +	} scan = { };
>  
>  	iio_for_each_active_channel(indio_dev, i) {
>  		int ret = i2c_smbus_read_word_data(data->client,
> @@ -186,10 +186,10 @@ static irqreturn_t isl29125_trigger_handler(int irq, void *p)
>  		if (ret < 0)
>  			goto done;
>  
> -		data->scan.chans[j++] = ret;
> +		scan.chans[j++] = ret;
>  	}
>  
> -	iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
> +	iio_push_to_buffers_with_ts(indio_dev, &scan, sizeof(scan),
>  		iio_get_time_ns(indio_dev));
>  
>  done:
> 


       reply	other threads:[~2025-11-05 10:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251104233644.350147-1-sashal@kernel.org>
2025-11-05 10:53 ` Jonathan Cameron [this message]
2025-11-05 17:42   ` Patch "iio: light: isl29125: Use iio_push_to_buffers_with_ts() to allow source size runtime check" has been added to the 6.17-stable tree Sasha Levin

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=20251105105311.000045bb@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=sashal@kernel.org \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.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 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.