summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorSanman Pradhan <psanman@juniper.net>2026-03-23 00:24:37 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-04-02 13:07:25 +0200
commitebdd28353b95852ac8bec86d1128f7e63bb22fb5 (patch)
tree8611d3fb20fd98102bab8363cbdae186d88203dc /drivers/media
parent7c0666a26b29042fadb37b1875e3c90f2bf75e7a (diff)
downloadlinux-ebdd28353b95852ac8bec86d1128f7e63bb22fb5.tar.gz
linux-ebdd28353b95852ac8bec86d1128f7e63bb22fb5.tar.bz2
linux-ebdd28353b95852ac8bec86d1128f7e63bb22fb5.zip
hwmon: (peci/cputemp) Fix off-by-one in cputemp_is_visible()
commit b0c9d8ae71509f25690d57f2efddebf7f4b12194 upstream. cputemp_is_visible() validates the channel index against CPUTEMP_CHANNEL_NUMS, but currently uses '>' instead of '>='. As a result, channel == CPUTEMP_CHANNEL_NUMS is not rejected even though valid indices are 0 .. CPUTEMP_CHANNEL_NUMS - 1. Fix the bounds check by using '>=' so invalid channel indices are rejected before indexing the core bitmap. Fixes: bf3608f338e9 ("hwmon: peci: Add cputemp driver") Cc: stable@vger.kernel.org Signed-off-by: Sanman Pradhan <psanman@juniper.net> Link: https://lore.kernel.org/r/20260323002352.93417-3-sanman.pradhan@hpe.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/media')
0 files changed, 0 insertions, 0 deletions