Skip to content

Commit 0e6176c

Browse files
author
Ben Skeggs
committed
drm/nouveau/disp/nv50-: prevent oops when no channel method map provided
The implementations for most channel types contains a map of methods to priv registers in order to provide debugging info when a disp exception has been raised. This info is missing from the implementation of PIO channels as they're rather simplistic already, however, if an exception is raised by one of them, we'd end up triggering a NULL-pointer deref. Not ideal... Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206299 Signed-off-by: Ben Skeggs <[email protected]>
1 parent 0352029 commit 0e6176c

File tree

1 file changed

+2
-0
lines changed
  • drivers/gpu/drm/nouveau/nvkm/engine/disp

1 file changed

+2
-0
lines changed

drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ nv50_disp_chan_mthd(struct nv50_disp_chan *chan, int debug)
7474

7575
if (debug > subdev->debug)
7676
return;
77+
if (!mthd)
78+
return;
7779

7880
for (i = 0; (list = mthd->data[i].mthd) != NULL; i++) {
7981
u32 base = chan->head * mthd->addr;

0 commit comments

Comments
 (0)