mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: assert that priv is non-NULL in gk20a_alloc_comptags
priv data is available when gk20a_alloc_comptags is called hence add assert for it. CID 274852 Bug 3512546 Change-Id: I9d907153c359900071f0f89b84d2ee15141dd874 Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2707492 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
75c9a2eb94
commit
c1202d7283
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2017-2022, 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,
|
||||||
@@ -72,9 +72,10 @@ int gk20a_alloc_comptags(struct gk20a *g, struct nvgpu_os_buffer *buf,
|
|||||||
lines = 0;
|
lines = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note that privdata is not validated here as it is available here. */
|
|
||||||
priv = gk20a_dma_buf_get_drvdata(buf->dmabuf, buf->dev);
|
priv = gk20a_dma_buf_get_drvdata(buf->dmabuf, buf->dev);
|
||||||
|
|
||||||
|
nvgpu_assert(priv != NULL);
|
||||||
|
|
||||||
/* store the allocator so we can use it when we free the ctags */
|
/* store the allocator so we can use it when we free the ctags */
|
||||||
priv->comptag_allocator = allocator;
|
priv->comptag_allocator = allocator;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user