Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1647279 > unrolled thread

[PATCH] gpu: drm: nouveau: add null check before pointer dereference

Started by"Gustavo A. R. Silva" <garsilva@embeddedor.com>
First post2017-05-22 21:20 +0200
Last post2017-05-23 00:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] gpu: drm: nouveau: add null check before pointer dereference "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-05-22 21:20 +0200
    Re: [PATCH] gpu: drm: nouveau: add null check before pointer  dereference Ben Skeggs <bskeggs@redhat.com> - 2017-05-23 00:30 +0200

#1647279 — [PATCH] gpu: drm: nouveau: add null check before pointer dereference

From"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date2017-05-22 21:20 +0200
Subject[PATCH] gpu: drm: nouveau: add null check before pointer dereference
Message-ID<tK121-1cI-7@gated-at.bofh.it>
Add null check before dereferencing pointer asyc

Addresses-Coverity-ID: 1397932
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/gpu/drm/nouveau/nv50_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index a766324..052a60a 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -2107,7 +2107,8 @@ nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state)
 					asyc->set.dither = true;
 			}
 		} else {
-			asyc->set.mask = ~0;
+			if (asyc)
+				asyc->set.mask = ~0;
 			asyh->set.mask = ~0;
 		}
 
-- 
2.5.0

[toc] | [next] | [standalone]


#1647443 — Re: [PATCH] gpu: drm: nouveau: add null check before pointer dereference

FromBen Skeggs <bskeggs@redhat.com>
Date2017-05-23 00:30 +0200
SubjectRe: [PATCH] gpu: drm: nouveau: add null check before pointer dereference
Message-ID<tK3ZT-34F-5@gated-at.bofh.it>
In reply to#1647279
On 05/23/2017 05:12 AM, Gustavo A. R. Silva wrote:
> Add null check before dereferencing pointer asyc
I've taken the patch into my tree, thanks!

Ben.

> 
> Addresses-Coverity-ID: 1397932
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>   drivers/gpu/drm/nouveau/nv50_display.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
> index a766324..052a60a 100644
> --- a/drivers/gpu/drm/nouveau/nv50_display.c
> +++ b/drivers/gpu/drm/nouveau/nv50_display.c
> @@ -2107,7 +2107,8 @@ nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state)
>   					asyc->set.dither = true;
>   			}
>   		} else {
> -			asyc->set.mask = ~0;
> +			if (asyc)
> +				asyc->set.mask = ~0;
>   			asyh->set.mask = ~0;
>   		}
>   
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web