diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-09-11 09:13:38 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-09-12 14:05:55 -0400 |
commit | 41283a02ac6837f01e1e67fca859ffd552c3ede0 (patch) | |
tree | 2a8ed0e27c082299a5c4eb3d828d8428905ced7a /drivers/gpu/nvgpu/gp10b/gp10b.c | |
parent | e68391690cfcc23b77c68aec3f9605badea226ed (diff) |
gpu: nvgpu: fix UBSAN warning of signed integer overflow
Fix below warning reported by UBSAN by explicitly type casting both the
operators in multiplication as unsigned long
[ 69.470802] UBSAN: Undefined behaviour in
drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu/gk20a/gk20a_scale.c:60:49
[ 69.485519] signed integer overflow:
[ 69.489104] 2147483647 * 1000 cannot be represented in type 'int'
[ 69.504424] Hardware name: quill (DT)
[ 69.508088] Call trace:
[ 69.510579] [<ffffff900809a600>] dump_backtrace+0x0/0x4f0
[ 69.515987] [<ffffff900809ab18>] show_stack+0x28/0x38
[ 69.521050] [<ffffff9008f0d8d8>] dump_stack+0x154/0x1c4
[ 69.526291] [<ffffff9008fd1ee0>] ubsan_epilogue+0x18/0xb0
[ 69.531720] [<ffffff9008fd321c>] handle_overflow+0x1c0/0x21c
[ 69.537416] [<ffffff9008fd3334>] __ubsan_handle_mul_overflow+0x34/0x50
[ 69.544410] [<ffffff9003c73368>] gk20a_scale_qos_notify+0x210/0x2f0 [nvgpu]
[ 69.551415] [<ffffff9008170884>] __blocking_notifier_call_chain+0xec/0x240
[ 69.558299] [<ffffff9008170a18>] blocking_notifier_call_chain+0x40/0x50
[ 69.564928] [<ffffff900825dd18>] pm_qos_update_bounded_target+0x738/0x1038
[ 69.571812] [<ffffff900825f4a0>] pm_qos_update_bounded_req+0x148/0x280
[ 69.578348] [<ffffff9008263224>] pm_qos_bounded_write+0x484/0x990
Bug 200342586
Change-Id: I35ee59a95b2e3625fb42f256d2877558be9e51cf
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1557156
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gp10b.c')
0 files changed, 0 insertions, 0 deletions