]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/mxm: fix null deref on load
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 19 Jan 2014 15:30:32 +0000 (10:30 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Jan 2014 02:28:30 +0000 (18:28 -0800)
commitb5f70e910b83d94cdc88241fa208c3b8462173a8
tree98be8fc5088c612948a57c2f307ae7f81b603a88
parent432b3967056b16c5f4c46571d02c3126068ef394
drm/nouveau/mxm: fix null deref on load

Since commit 143938601060 ("drm/nouveau: populate master subdev pointer
only when fully constructed"), the nouveau_mxm(bios) call will return
NULL, since it's still being called from the constructor.  Instead, pass
the mxm pointer via the unused data field.

See https://bugs.freedesktop.org/show_bug.cgi?id=73791

Reported-by: Andreas Reis <andreas.reis@gmail.com>
Tested-by: Andreas Reis <andreas.reis@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/gpu/drm/nouveau/core/subdev/mxm/nv50.c