On 08/21/2016 11:06 PM, Joe Perches wrote:
> On Sun, 2016-08-21 at 22:52 +0200, Heinrich Schuchardt wrote:
>> It does not make sense to check if table is NULL
>> and afterwards to dereference it without
>> considering the result.
>
> This makes no sense.
>
>>
The comment describing function vmw_cmd_res_reloc_add
explicitely mentions p_val may be NULL.
We should not assign a value (NULL) to *p_val in this case.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions
If output is NULL it is not permissable to dereference it.
So we should leave the respective function in this case.
The inconsistency was indicated by cppcheck.
No actual NULL pointer dereference was observed.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 6
It does not make sense to check if table is NULL
and afterwards to dereference it without
considering the result.
The inconsistency was indicated by cppcheck.
An actual NULL pointer dereference was not observed.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/radeon/si_dpm.c | 2 +-
1
In an if block for (running == 0) running cannot be non-zero.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/radeon/si.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 2523ca9..41da47d 100644
--- a/drivers/gpu
All components of variable clock should be initialized
to avoid bytes from the kernel stack to be exposed.
Reported-by: Joe Perches
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/gma500
In an if block for (running == 0) running cannot be non-zero.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/radeon/cik.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index 0c1b9ff..c8e1515 100644
--- a/drivers
On 08/21/2016 08:46 PM, Joe Perches wrote:
> On Sun, 2016-08-21 at 20:39 +0200, Heinrich Schuchardt wrote:
>> Components m1, m2, p2, dot, vco of variable clock should be
>> initialized to avoid bytes from the kernel stack to be
>> exposed.
>
> How was this found? visual
On 08/21/2016 08:29 PM, Joe Perches wrote:
> On Sun, 2016-08-21 at 20:06 +0200, Heinrich Schuchardt wrote:
>> In an if block for (running == 0) running cannot be non-zero.
>
> This code could also be better unindented by one level
> (all of the block would fit 80 co
Components m1, m2, p2, dot, vco of variable clock should be
initialized to avoid bytes from the kernel stack to be
exposed.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c
b
if (a == NULL || a->b == NULL)
leads to a NULL pointer dereference if a == NULL.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
b/driv
if (a == NULL || a->b == NULL)
leads to a NULL pointer dereference if a == NULL.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
b/driv
In an if block for (running == 0) running cannot be non-zero.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index 2aee2c6
In an if block for (running == 0) running cannot be non-zero.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index 0b0f086
The C standard does not specify the size of the integer used
to store an enum. Hence in structure drm_stats32_t alignment
bytes may exist.
To avoid exposing bytes from the kernel stack it is
necessary to initialize variable s32 completely.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm
Do not dereference pll_rate before checking if it is NULL.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_pll.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_pll.c
b/drivers/gpu/drm/msm/mdp/mdp4
After having verified that dpi is NULL we should not
dereference it.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c
b/drivers/gpu/drm/mediatek/mtk_dpi.c
index
Only dereference sender after checking if sender is NULL.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c
b/drivers/gpu/drm/gma500
Do not dereference node before the check if node is NULL.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/drm_mm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 04de6fd..cb39f45 100644
--- a/drivers/gpu
If ttm_dma_tt_init fails memory is leaked.
Signed-off-by: Heinrich Schuchardt
---
drivers/gpu/drm/nouveau/nouveau_sgdma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c
b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
index a4d22e5
20 matches
Mail list logo