All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] drm/atomic: avoid null pointer dereference on pointer crtc
@ 2020-11-16 11:03 ` Colin King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin King @ 2020-11-16 11:03 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Simon Ser, Sam Ravnborg, dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Since moving to the new debug helper functions we now have a debug message
that dereferences crtc to print a kernel debug message when crtc is null
and so this debug message will now cause a null pointer dereference. Since
this is a debug message it probably is just simplest to fix this by just
removing the debug message altogether.

Addresses-Coverity: ("Dereference after null check")
Fixes: e3aae683e861 ("drm: convert drm_atomic_uapi.c to new debug helpers")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/drm_atomic_uapi.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 9df7f2a170e3..3fd84590560a 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -338,11 +338,6 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
 			       "Link [CONNECTOR:%d:%s] state %p to [CRTC:%d:%s]\n",
 			       connector->base.id, connector->name,
 			       conn_state, crtc->base.id, crtc->name);
-	} else {
-		drm_dbg_atomic(crtc->dev,
-			       "Link [CONNECTOR:%d:%s] state %p to [NOCRTC]\n",
-			       connector->base.id, connector->name,
-			       conn_state);
 	}
 
 	return 0;
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH][next] drm/atomic: avoid null pointer dereference on pointer crtc
@ 2020-11-16 11:03 ` Colin King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin King @ 2020-11-16 11:03 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Simon Ser, Sam Ravnborg, dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Since moving to the new debug helper functions we now have a debug message
that dereferences crtc to print a kernel debug message when crtc is null
and so this debug message will now cause a null pointer dereference. Since
this is a debug message it probably is just simplest to fix this by just
removing the debug message altogether.

Addresses-Coverity: ("Dereference after null check")
Fixes: e3aae683e861 ("drm: convert drm_atomic_uapi.c to new debug helpers")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/drm_atomic_uapi.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 9df7f2a170e3..3fd84590560a 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -338,11 +338,6 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
 			       "Link [CONNECTOR:%d:%s] state %p to [CRTC:%d:%s]\n",
 			       connector->base.id, connector->name,
 			       conn_state, crtc->base.id, crtc->name);
-	} else {
-		drm_dbg_atomic(crtc->dev,
-			       "Link [CONNECTOR:%d:%s] state %p to [NOCRTC]\n",
-			       connector->base.id, connector->name,
-			       conn_state);
 	}
 
 	return 0;
-- 
2.28.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH][next] drm/atomic: avoid null pointer dereference on pointer crtc
  2020-11-16 11:03 ` Colin King
  (?)
@ 2020-11-16 11:08   ` Simon Ser
  -1 siblings, 0 replies; 8+ messages in thread
From: Simon Ser @ 2020-11-16 11:08 UTC (permalink / raw)
  To: Colin King
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Sam Ravnborg, dri-devel,
	kernel-janitors, linux-kernel

On Monday, November 16, 2020 12:03 PM, Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King colin.king@canonical.com
>
> Since moving to the new debug helper functions we now have a debug message
> that dereferences crtc to print a kernel debug message when crtc is null
> and so this debug message will now cause a null pointer dereference. Since
> this is a debug message it probably is just simplest to fix this by just
> removing the debug message altogether.

NACK. This removes the log altogether instead of fixing it.

A fix has already been pushed to drm-misc-next: 0003b687ee6d ("drm: fix
oops in drm_atomic_set_crtc_for_connector").

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][next] drm/atomic: avoid null pointer dereference on pointer crtc
@ 2020-11-16 11:08   ` Simon Ser
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Ser @ 2020-11-16 11:08 UTC (permalink / raw)
  To: Colin King
  Cc: Thomas Zimmermann, David Airlie, kernel-janitors, linux-kernel,
	dri-devel, Sam Ravnborg

On Monday, November 16, 2020 12:03 PM, Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King colin.king@canonical.com
>
> Since moving to the new debug helper functions we now have a debug message
> that dereferences crtc to print a kernel debug message when crtc is null
> and so this debug message will now cause a null pointer dereference. Since
> this is a debug message it probably is just simplest to fix this by just
> removing the debug message altogether.

NACK. This removes the log altogether instead of fixing it.

A fix has already been pushed to drm-misc-next: 0003b687ee6d ("drm: fix
oops in drm_atomic_set_crtc_for_connector").

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][next] drm/atomic: avoid null pointer dereference on pointer crtc
@ 2020-11-16 11:08   ` Simon Ser
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Ser @ 2020-11-16 11:08 UTC (permalink / raw)
  To: Colin King
  Cc: Thomas Zimmermann, David Airlie, kernel-janitors, linux-kernel,
	dri-devel, Sam Ravnborg

On Monday, November 16, 2020 12:03 PM, Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King colin.king@canonical.com
>
> Since moving to the new debug helper functions we now have a debug message
> that dereferences crtc to print a kernel debug message when crtc is null
> and so this debug message will now cause a null pointer dereference. Since
> this is a debug message it probably is just simplest to fix this by just
> removing the debug message altogether.

NACK. This removes the log altogether instead of fixing it.

A fix has already been pushed to drm-misc-next: 0003b687ee6d ("drm: fix
oops in drm_atomic_set_crtc_for_connector").
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][next] drm/atomic: avoid null pointer dereference on pointer crtc
  2020-11-16 11:08   ` Simon Ser
  (?)
@ 2020-11-16 11:28     ` Colin Ian King
  -1 siblings, 0 replies; 8+ messages in thread
From: Colin Ian King @ 2020-11-16 11:28 UTC (permalink / raw)
  To: Simon Ser
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Sam Ravnborg, dri-devel,
	kernel-janitors, linux-kernel

On 16/11/2020 11:08, Simon Ser wrote:
> On Monday, November 16, 2020 12:03 PM, Colin King <colin.king@canonical.com> wrote:
> 
>> From: Colin Ian King colin.king@canonical.com
>>
>> Since moving to the new debug helper functions we now have a debug message
>> that dereferences crtc to print a kernel debug message when crtc is null
>> and so this debug message will now cause a null pointer dereference. Since
>> this is a debug message it probably is just simplest to fix this by just
>> removing the debug message altogether.
> 
> NACK. This removes the log altogether instead of fixing it.
> 
> A fix has already been pushed to drm-misc-next: 0003b687ee6d ("drm: fix
> oops in drm_atomic_set_crtc_for_connector").
> 
Good to see this has already been fixed. Thanks.

Colin


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][next] drm/atomic: avoid null pointer dereference on pointer crtc
@ 2020-11-16 11:28     ` Colin Ian King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin Ian King @ 2020-11-16 11:28 UTC (permalink / raw)
  To: Simon Ser
  Cc: Thomas Zimmermann, David Airlie, kernel-janitors, linux-kernel,
	dri-devel, Sam Ravnborg

On 16/11/2020 11:08, Simon Ser wrote:
> On Monday, November 16, 2020 12:03 PM, Colin King <colin.king@canonical.com> wrote:
> 
>> From: Colin Ian King colin.king@canonical.com
>>
>> Since moving to the new debug helper functions we now have a debug message
>> that dereferences crtc to print a kernel debug message when crtc is null
>> and so this debug message will now cause a null pointer dereference. Since
>> this is a debug message it probably is just simplest to fix this by just
>> removing the debug message altogether.
> 
> NACK. This removes the log altogether instead of fixing it.
> 
> A fix has already been pushed to drm-misc-next: 0003b687ee6d ("drm: fix
> oops in drm_atomic_set_crtc_for_connector").
> 
Good to see this has already been fixed. Thanks.

Colin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][next] drm/atomic: avoid null pointer dereference on pointer crtc
@ 2020-11-16 11:28     ` Colin Ian King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin Ian King @ 2020-11-16 11:28 UTC (permalink / raw)
  To: Simon Ser
  Cc: Thomas Zimmermann, David Airlie, kernel-janitors, linux-kernel,
	dri-devel, Sam Ravnborg

On 16/11/2020 11:08, Simon Ser wrote:
> On Monday, November 16, 2020 12:03 PM, Colin King <colin.king@canonical.com> wrote:
> 
>> From: Colin Ian King colin.king@canonical.com
>>
>> Since moving to the new debug helper functions we now have a debug message
>> that dereferences crtc to print a kernel debug message when crtc is null
>> and so this debug message will now cause a null pointer dereference. Since
>> this is a debug message it probably is just simplest to fix this by just
>> removing the debug message altogether.
> 
> NACK. This removes the log altogether instead of fixing it.
> 
> A fix has already been pushed to drm-misc-next: 0003b687ee6d ("drm: fix
> oops in drm_atomic_set_crtc_for_connector").
> 
Good to see this has already been fixed. Thanks.

Colin

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-11-16 12:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 11:03 [PATCH][next] drm/atomic: avoid null pointer dereference on pointer crtc Colin King
2020-11-16 11:03 ` Colin King
2020-11-16 11:08 ` Simon Ser
2020-11-16 11:08   ` Simon Ser
2020-11-16 11:08   ` Simon Ser
2020-11-16 11:28   ` Colin Ian King
2020-11-16 11:28     ` Colin Ian King
2020-11-16 11:28     ` Colin Ian King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.