Skip to contentSkip to conversation

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

DISCUSSION Jonathan Cameron 2 participants 2 messages Nov 5, 2025 1 message not in the archive Stable branch

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 7 lines · On Tue, 4 Nov 2025 18:36:44 -0500 Sasha Levin <[email protected]> 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

Quoted 7 lines

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 <[email protected]> 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

Quoted 61 lines

commit 72afc12515b357d26a5ce4f0149379ef797e3e37

Author: Jonathan Cameron <[email protected]>
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.

drivers/iio/light/isl29125.c +7 -7
index 6bc23b164cc55..3acb8a4f1d120 100644
@@ -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:
maintainer
#2 lore raw
Quoted 18 lines · Jonathan Cameron
Quoted 7 lines · On Tue, 4 Nov 2025 18:36:44 -0500 Sasha Levin <[email protected]> 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

Quoted 7 lines

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 <[email protected]> know about it.

Quoted 5 lines

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!

Signature · 2 lines
Thanks,
Sasha