summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorNikos Tsironis <ntsironis@arrikto.com>2020-03-27 16:01:10 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-17 10:50:24 +0200
commit33344a7661a1e4780f3513505e0b354c59cfa76b (patch)
treefa6ccb00f8a8a69da636b59d6f3ad340b4d333dd /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent2d7eb7ee36a3600118edc328b9aef9444a89f401 (diff)
dm clone: Add missing casts to prevent overflows and data corruption
[ Upstream commit 9fc06ff56845cc5ccafec52f545fc2e08d22f849 ] Add missing casts when converting from regions to sectors. In case BITS_PER_LONG == 32, the lack of the appropriate casts can lead to overflows and miscalculation of the device sector. As a result, we could end up discarding and/or copying the wrong parts of the device, thus corrupting the device's data. Fixes: 7431b7835f55 ("dm: add clone target") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions