summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-lp3943.c
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2020-08-04 12:25:01 +0300
committerMike Snitzer <snitzer@redhat.com>2020-08-04 23:31:12 +0300
commita9cb9f4148ef6bb8fabbdaa85c42b2171fbd5a0d (patch)
treeb654fb3bc10227350f6dd79b519b2deda5a0b83c /drivers/gpio/gpio-lp3943.c
parent4cb6f22612511ff2aba4c33fb0f281cae7c23772 (diff)
downloadlinux-a9cb9f4148ef6bb8fabbdaa85c42b2171fbd5a0d.tar.xz
dm: don't call report zones for more than the user requested
Don't call report zones for more zones than the user actually requested, otherwise this can lead to out-of-bounds accesses in the callback functions. Such a situation can happen if the target's ->report_zones() callback function returns 0 because we've reached the end of the target and then restart the report zones on the second target. We're again calling into ->report_zones() and ultimately into the user supplied callback function but when we're not subtracting the number of zones already processed this may lead to out-of-bounds accesses in the user callbacks. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Fixes: d41003513e61 ("block: rework zone reporting") Cc: stable@vger.kernel.org # v5.5+ Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/gpio/gpio-lp3943.c')
0 files changed, 0 insertions, 0 deletions