[ Sasha's backport helper bot ] Hi, The upstream commit SHA1 provided is correct: 38724591364e1e3b278b4053f102b49ea06ee17c WARNING: Author mismatch between patch and upstream commit: Backport author: lanbincn@xxxxxx Commit author: Javier Carrasco<javier.carrasco.cruz@xxxxxxxxx> Status in newer kernel trees: 6.12.y | Present (different SHA1: 4291becc8b99) 6.6.y | Present (different SHA1: 0b5e30f0aceb) 6.1.y | Not found Note: The patch differs from the upstream commit: --- 1: 38724591364e ! 1: a5b3d23cd86f iio: adc: rockchip_saradc: fix information leak in triggered buffer @@ Metadata ## Commit message ## iio: adc: rockchip_saradc: fix information leak in triggered buffer + commit 38724591364e1e3b278b4053f102b49ea06ee17c upstream. + The 'data' local struct is used to push data to user space from a triggered buffer, but it does not set values for inactive channels, as it only uses iio_for_each_active_channel() to assign new values. @@ Commit message Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx> Link: https://patch.msgid.link/20241125-iio_memset_scan_holes-v1-4-0cb6e98d895c@xxxxxxxxx Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> + (cherry picked from commit 38724591364e1e3b278b4053f102b49ea06ee17c) + Signed-off-by: Bin Lan <lanbincn@xxxxxx> ## drivers/iio/adc/rockchip_saradc.c ## @@ drivers/iio/adc/rockchip_saradc.c: static irqreturn_t rockchip_saradc_trigger_handler(int irq, void *p) @@ drivers/iio/adc/rockchip_saradc.c: static irqreturn_t rockchip_saradc_trigger_ha + memset(&data, 0, sizeof(data)); + - mutex_lock(&info->lock); + mutex_lock(&i_dev->mlock); - iio_for_each_active_channel(i_dev, i) { + for_each_set_bit(i, i_dev->active_scan_mask, i_dev->masklength) { --- Results of testing on various branches: | Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.1.y | Success | Success |