aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorNikos Tsironis <[email protected]>2020-03-27 14:01:09 +0000
committerMike Snitzer <[email protected]>2020-03-27 18:41:46 +0000
commitcd481c12269b4d276f1a52eda0ebd419079bfe3a (patch)
treece0a92f40d99c7c2905bd1b6000e23632b5a8219 /tools/perf/scripts/python/netdev-times.py
parentdm clone: Fix handling of partial region discards (diff)
downloadkernel-cd481c12269b4d276f1a52eda0ebd419079bfe3a.tar.gz
kernel-cd481c12269b4d276f1a52eda0ebd419079bfe3a.zip
dm clone: Add overflow check for number of regions
Add overflow check for clone->nr_regions variable, which holds the number of regions of the target. The overflow can occur with sufficiently large devices, if BITS_PER_LONG == 32. E.g., if the region size is 8 sectors (4K), the overflow would occur for device sizes > 34359738360 sectors (~16TB). This could result in multiple device sectors wrongly mapping to the same region number, due to the truncation from 64 bits to 32 bits, which would lead to data corruption. Fixes: 7431b7835f55 ("dm: add clone target") Cc: [email protected] # v5.4+ Signed-off-by: Nikos Tsironis <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions