From 6208e86ca857a7d8bebf62f0636aba6f9f1d64de Mon Sep 17 00:00:00 2001 From: Nitin Kumbhar Date: Wed, 25 Sep 2019 15:49:13 +0530 Subject: [PATCH] gpu: nvgpu: fix value leaking in log The timeout message of nvgpu_timeout_expired_msg() leaks a stack value (%llx) in error log on timeout. As the format expects 1 argument and none is given, fix this by specifying the required argument. Bug 2626449 Change-Id: I6eddbeaa8b6d91a51d755dfb3df9e7c800f0d161 Signed-off-by: Nitin Kumbhar Reviewed-on: https://git-master.nvidia.com/r/2205423 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Thomas Fleury Reviewed-by: Deepak Nibade Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: Alex Waterman Reviewed-by: Debarshi Dutta GVS: Gerrit_Virtual_Submit Reviewed-by: Ankur Kishore Reviewed-by: Seshendra Gadagottu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/hal/fb/fb_mmu_fault_gv11b_fusa.c | 3 ++- drivers/gpu/nvgpu/hal/fb/fb_mmu_fault_tu104.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/hal/fb/fb_mmu_fault_gv11b_fusa.c b/drivers/gpu/nvgpu/hal/fb/fb_mmu_fault_gv11b_fusa.c index 21e624944..153c36b52 100644 --- a/drivers/gpu/nvgpu/hal/fb/fb_mmu_fault_gv11b_fusa.c +++ b/drivers/gpu/nvgpu/hal/fb/fb_mmu_fault_gv11b_fusa.c @@ -692,7 +692,8 @@ int gv11b_fb_mmu_invalidate_replay(struct gk20a *g, } nvgpu_udelay(5); } while (nvgpu_timeout_expired_msg(&timeout, - "invalidate replay failed on 0x%llx") == 0); + "invalidate replay failed 0x%lx", + invalidate_replay_val) == 0); if (err != 0) { nvgpu_err(g, "invalidate replay timedout"); } diff --git a/drivers/gpu/nvgpu/hal/fb/fb_mmu_fault_tu104.c b/drivers/gpu/nvgpu/hal/fb/fb_mmu_fault_tu104.c index e67839f49..31b720dcc 100644 --- a/drivers/gpu/nvgpu/hal/fb/fb_mmu_fault_tu104.c +++ b/drivers/gpu/nvgpu/hal/fb/fb_mmu_fault_tu104.c @@ -231,7 +231,8 @@ int tu104_fb_mmu_invalidate_replay(struct gk20a *g, } nvgpu_udelay(5); } while (nvgpu_timeout_expired_msg(&timeout, - "invalidate replay failed on 0x%llx") == 0); + "invalidate replay failed on 0x%lx", + invalidate_replay_val) == 0); if (err != 0) { nvgpu_err(g, "invalidate replay timedout"); }