mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:35:20 +03:00
gpu: nvgpu: fix CERT-C issues
- CID 10165014 Dereference before null check - CID 10166579 Unused value Bug 3952896 Change-Id: I6a7f2b97b4a6519272607e560d09c138048bd665 Signed-off-by: srajum <srajum@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2872276 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
f791adf880
commit
02834f8739
@@ -810,6 +810,10 @@ static int nvgpu_nvs_ctrl_fifo_scheduler_process_receiver(struct gk20a *g,
|
|||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
|
if ((receiver_queue_sender == NULL) || (send_queue_receiver == NULL)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
(void)memset(receiver_queue_sender->internal_buffer, 0,
|
(void)memset(receiver_queue_sender->internal_buffer, 0,
|
||||||
NVS_DOMAIN_MESSAGE_MAX_PAYLOAD_SIZE);
|
NVS_DOMAIN_MESSAGE_MAX_PAYLOAD_SIZE);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Tegra GK20A GPU Debugger/Profiler Driver
|
* Tegra GK20A GPU Debugger/Profiler Driver
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2017-2023, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
@@ -2721,7 +2721,6 @@ static int nvgpu_dbg_gpu_access_gpu_va(struct dbg_session_gk20a *dbg_s,
|
|||||||
if (size > allocated_size) {
|
if (size > allocated_size) {
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
nvgpu_big_free(g, buffer);
|
nvgpu_big_free(g, buffer);
|
||||||
buffer = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer = nvgpu_big_zalloc(g, size);
|
buffer = nvgpu_big_zalloc(g, size);
|
||||||
|
|||||||
Reference in New Issue
Block a user