* 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
[not found] <20251104233644.350147-1-sashal@kernel.org>
@ 2025-11-05 10:53 ` Jonathan Cameron
2025-11-05 17:42 ` Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Cameron @ 2025-11-05 10:53 UTC (permalink / raw)
To: Sasha Levin
Cc: stable, stable-commits, Jonathan Cameron, David Lechner,
Nuno Sá, Andy Shevchenko
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:
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* 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
2025-11-05 10:53 ` 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 Jonathan Cameron
@ 2025-11-05 17:42 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2025-11-05 17:42 UTC (permalink / raw)
To: Jonathan Cameron
Cc: stable, stable-commits, Jonathan Cameron, David Lechner,
Nuno Sá, Andy Shevchenko
On Wed, Nov 05, 2025 at 10:53:11AM +0000, Jonathan Cameron wrote:
>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.
Now dropped, thanks!
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-05 17:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20251104233644.350147-1-sashal@kernel.org>
2025-11-05 10:53 ` 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 Jonathan Cameron
2025-11-05 17:42 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox