summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorAntoniu Miclaus <antoniu.miclaus@analog.com>2025-05-09 13:16:57 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-05-11 16:12:49 +0300
commit499a8cee812588905cc940837e69918c1649a19e (patch)
treefb60f3506d0261810e297b0f96e77e0f108ec52e /tools/perf/scripts/python/task-analyzer.py
parente2f820014239df9360064079ae93f838ff3b7f8c (diff)
downloadlinux-499a8cee812588905cc940837e69918c1649a19e.tar.xz
iio: adc: ad4851: fix ad4858 chan pointer handling
The pointer returned from ad4851_parse_channels_common() is incremented internally as each channel is populated. In ad4858_parse_channels(), the same pointer was further incremented while setting ext_scan_type fields for each channel. This resulted in indio_dev->channels being set to a pointer past the end of the allocated array, potentially causing memory corruption or undefined behavior. Fix this by iterating over the channels using an explicit index instead of incrementing the pointer. This preserves the original base pointer and ensures all channel metadata is set correctly. Fixes: 6250803fe2ec ("iio: adc: ad4851: add ad485x driver") Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://patch.msgid.link/20250509101657.6742-1-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions