Ilia Mirkin
2013-Nov-14 08:38 UTC
[Nouveau] null deref in nouveau_clock_init on pre-nv40 cards
Hi Ben, Pre-nv40 cards don't have domains defined, which the nouveau_clock_init code assumes exists. The following (white-space-damaged, sorry) patch fixes boot for me, haven't really tested the pre-nv40 cards in my system much further. I assume there's some proper fix here. -ilia diff --git a/drivers/gpu/drm/nouveau/core/subdev/clock/base.c b/drivers/gpu/drm/nouveau/core/subdev/clock/base.c index ce82dc4..acc4ac8 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/clock/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/clock/base.c @@ -411,6 +411,7 @@ _nouveau_clock_init(struct nouveau_object *object) memset(&clk->bstate, 0x00, sizeof(clk->bstate)); INIT_LIST_HEAD(&clk->bstate.list); clk->bstate.pstate = 0xff; + if (!clock) return 0; while (clock->name != nv_clk_src_max) { ret = clk->read(clk, clock->name);
Possibly Parallel Threads
- [PATCH] Fix null dereference oopses for nv40 cards
- [Fwd: [PATCH] Fix null dereference oopses for nv40 cards] kernel 3.13.0-rc8
- [Fwd: [PATCH] Fix null dereference oopses for nv40 cards] kernel 3.13.0-rc8
- [Fwd: [PATCH] Fix null dereference oopses for nv40 cards] kernel 3.13.0-rc8
- [PATCH] drm/nv40: allocate ctxprog with kmalloc