`best_clock` is an object that may be sent out. Object `clock`
contains uninitialized bytes that are copied to `best_clock`,
which leads to memory disclosure and information leak.
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/gma500/cdv_intel_display.c | 2 ++
1 file changed, 2 insertions
"clock" may be copied to "best_clock". Initializing best_clock
is not sufficient. The fix initializes clock as well to avoid
memory disclosures and informaiton leaks.
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/gma500/oaktrail_crtc.c | 2 ++
1 file changed, 2 inserti
In case alloc_workqueue fails, the fix frees memory and
returns -ENOMEM to avoid potential NULL pointer dereference.
Signed-off-by: Kangjie Lu
---
v2: use radeon_crtc_destroy to properly clean up resources as
suggested by Michel Dänzer
---
drivers/gpu/drm/radeon/radeon_display.c | 15
pm_runtime_get_sync could fail and thus deserves a check.
The patch adds such a check and return its error code upstream
if it indeed failed.
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/v3d/v3d_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b
alloc_ordered_workqueue may fail and return NULL.
The fix cleans up drm plans and returns ENOMEM when it fails to
avoid potential NULL pointer dereference.
Signed-off-by: Kangjie Lu
---
V2: clean up resources
---
drivers/gpu/drm/vkms/vkms_crtc.c | 11 +++
1 file changed, 11 insertions
In case alloc_workqueue fails, the fix frees memory and
returns to avoid potential NULL pointer dereference.
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/radeon/radeon_display.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/radeon/radeon_display.c
b/drivers/gpu/drm
> On Mar 8, 2019, at 10:36 PM, Kangjie Lu wrote:
>
> alloc_ordered_workqueue may fail and return NULL.
> The fix returns ENOMEM when it fails to avoid potential NULL
> pointer dereference.
>
> Signed-off-by: Kangjie Lu
> ---
> drivers/gpu/drm/vkms/vkms_crtc.c
> On Mar 8, 2019, at 10:19 PM, Kangjie Lu wrote:
>
> kmemdup could fail and return NULL. To avoid null pointer
> dereference, the fix checkes its return value and returns
> ENOMEM upon failures.
This is a NULL-pointer dereference issue.
Can someone review this patch? Thanks.
In case ioremap fails, the fix releases resources and returns
-ENOMEM to avoid NULL pointer dereferences.
Signed-off-by: Kangjie Lu
---
drivers/video/fbdev/imsttfb.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c
index
When ioremap fails, hga_vram should not be dereferenced. The fix
check the failure to avoid NULL pointer dereference.
Signed-off-by: Kangjie Lu
---
drivers/video/fbdev/hgafb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c
index
alloc_workqueue may fail. The fix checks its status. We probably
need to add a return value for radeon_crtc_init, so that we can
pass an error code upstream.
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/radeon/radeon_display.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu
If the allocation fails, return false to avoid potential
NULL pointer dereference
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/i915/i915_gpu_error.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c
b/drivers/gpu/drm/i915
kmemdup could fail and return NULL. To avoid null pointer
dereference, the fix checkes its return value and returns
ENOMEM upon failures.
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdkfd
alloc_ordered_workqueue may fail and return NULL.
The fix returns ENOMEM when it fails to avoid potential NULL
pointer dereference.
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/vkms/vkms_crtc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu
adp8870_write() may fail. This fix checks if adp8870_write fails, and if
so, returns its error code.
Signed-off-by: Kangjie Lu
---
drivers/video/backlight/adp8870_bl.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/video/backlight/adp8870_bl.c
b/drivers
adev->firmware.fw_buf being not NULL may not indicate kernel buffer is
created successful. A better way is to check the status (return value)
of it. The fix does so.
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 18 --
1 file changed, 12 inserti
Please ignore this email. I've sent another one.
On Mon, Dec 24, 2018 at 11:02 PM Kangjie Lu wrote:
> Both anx78xx_set_bits() and anx78xx_clear_bits() in the poweron process
> may fail. The fix inserts checks for their return values.
>
> Signed-off-by: Kangjie Lu
> --
Both anx78xx_set_bits() and anx78xx_clear_bits() in the poweron process
may fail. The fix inserts checks for their return values.
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/bridge/analogix-anx78xx.c
Both anx78xx_set_bits() and anx78xx_clear_bits() in the poweron process
may fail. The fix inserts checks for their return values.
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/bridge/analogix-anx78xx.c | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a
Thanks for the tip! Will submit patch V2 soon.
On Thu, Dec 20, 2018 at 11:07 PM Laurent Pinchart <
laurent.pinch...@ideasonboard.com> wrote:
> Hi Kangjie,
>
> Thank you for the patch.
>
> On Thursday, 20 December 2018 09:41:16 EET Kangjie Lu wrote:
> >
Both anx78xx_set_bits() and anx78xx_clear_bits() in the poweron process
may fail. The fix inserts checks for their return values. If the poweron
process fails, it calls anx78xx_poweroff().
Signed-off-by: Kangjie Lu
---
drivers/gpu/drm/bridge/analogix-anx78xx.c | 26 ---
1
21 matches
Mail list logo