* [PATCH] drm/nouveau: fix oops in display destructor with headless cards
@ 2014-06-17 13:01 Maarten Lankhorst
[not found] ` <53A03C3C.5070606-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Maarten Lankhorst @ 2014-06-17 13:01 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
If init doesn't run then disp->outp might not be initialized, resulting in an oops.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
---
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/base.c b/drivers/gpu/drm/nouveau/core/engine/disp/base.c
index c41f656abe64..9c38c5e40500 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/base.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/base.c
@@ -99,8 +99,10 @@ _nouveau_disp_dtor(struct nouveau_object *object)
nouveau_event_destroy(&disp->vblank);
- list_for_each_entry_safe(outp, outt, &disp->outp, head) {
- nouveau_object_ref(NULL, (struct nouveau_object **)&outp);
+ if (disp->outp.next) {
+ list_for_each_entry_safe(outp, outt, &disp->outp, head) {
+ nouveau_object_ref(NULL, (struct nouveau_object **)&outp);
+ }
}
nouveau_engine_destroy(&disp->base);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/nouveau: fix oops in display destructor with headless cards
[not found] ` <53A03C3C.5070606-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
@ 2014-06-17 13:10 ` Ben Skeggs
0 siblings, 0 replies; 2+ messages in thread
From: Ben Skeggs @ 2014-06-17 13:10 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
On Tue, Jun 17, 2014 at 11:01 PM, Maarten Lankhorst
<maarten.lankhorst-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> wrote:
> If init doesn't run then disp->outp might not be initialized, resulting in an oops.
This can't actually happen (in the very least, it's not supposed
to)... What makes you think it can?
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> ---
> diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/base.c b/drivers/gpu/drm/nouveau/core/engine/disp/base.c
> index c41f656abe64..9c38c5e40500 100644
> --- a/drivers/gpu/drm/nouveau/core/engine/disp/base.c
> +++ b/drivers/gpu/drm/nouveau/core/engine/disp/base.c
> @@ -99,8 +99,10 @@ _nouveau_disp_dtor(struct nouveau_object *object)
>
> nouveau_event_destroy(&disp->vblank);
>
> - list_for_each_entry_safe(outp, outt, &disp->outp, head) {
> - nouveau_object_ref(NULL, (struct nouveau_object **)&outp);
> + if (disp->outp.next) {
> + list_for_each_entry_safe(outp, outt, &disp->outp, head) {
> + nouveau_object_ref(NULL, (struct nouveau_object **)&outp);
> + }
> }
>
> nouveau_engine_destroy(&disp->base);
>
> _______________________________________________
> dri-devel mailing list
> dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-17 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 13:01 [PATCH] drm/nouveau: fix oops in display destructor with headless cards Maarten Lankhorst
[not found] ` <53A03C3C.5070606-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2014-06-17 13:10 ` Ben Skeggs
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.