drm/nouveau/core: swap the order of imem/fb
authorBen Skeggs <bskeggs@redhat.com>
Thu, 2 Jun 2016 02:42:32 +0000 (12:42 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 2 Jun 2016 03:54:07 +0000 (13:54 +1000)
Fixes a use-after-free reported by valgrind and KASAN.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/core/device.h

index c612dc1f1eb4ef651faa4ec398904a894b0ac814..126a85cc81bc22a763c06bc3dcb204b10793b59c 100644 (file)
@@ -16,9 +16,9 @@ enum nvkm_devidx {
        NVKM_SUBDEV_MC,
        NVKM_SUBDEV_BUS,
        NVKM_SUBDEV_TIMER,
+       NVKM_SUBDEV_INSTMEM,
        NVKM_SUBDEV_FB,
        NVKM_SUBDEV_LTC,
-       NVKM_SUBDEV_INSTMEM,
        NVKM_SUBDEV_MMU,
        NVKM_SUBDEV_BAR,
        NVKM_SUBDEV_PMU,