summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2019-01-07 12:34:31 -0600
committerGuenter Roeck <linux@roeck-us.net>2019-01-07 21:03:59 -0800
commitb0407d820b65272fcaa77e0dd1347dc7678d23b8 (patch)
tree6c9f6ce525882217fb0ee72a1f5cd02d0a9d34a1 /drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
parent07bd14ccc3049f9c0147a91a4227a571f981601a (diff)
downloadlinux-b0407d820b65272fcaa77e0dd1347dc7678d23b8.tar.bz2
hwmon: (occ) Fix potential integer overflow
Cast get_unaligned_be32(...) to u64 in order to give the compiler complete information about the proper arithmetic to use and avoid a potential integer overflow. Notice that such function call is used in contexts that expect expressions of type u64 (64 bits, unsigned); and the following expressions are currently being evaluated using 32-bit arithmetic: val = get_unaligned_be32(&power->update_tag) * occ->powr_sample_time_us; val = get_unaligned_be32(&power->vdn.update_tag) * occ->powr_sample_time_us; Addresses-Coverity-ID: 1442357 ("Unintentional integer overflow") Addresses-Coverity-ID: 1442476 ("Unintentional integer overflow") Addresses-Coverity-ID: 1442508 ("Unintentional integer overflow") Fixes: ff692d80b2e2 ("hwmon (occ): Add sensor types and versions") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: Eddie James <eajames@linux.ibm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_display.c')
0 files changed, 0 insertions, 0 deletions