浏览代码

drm/nouveau/core: swap the order of imem/fb

Fixes a use-after-free reported by valgrind and KASAN.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs 9 年之前
父节点
当前提交
77154fd969
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gpu/drm/nouveau/include/nvkm/core/device.h

+ 1 - 1
drivers/gpu/drm/nouveau/include/nvkm/core/device.h

@@ -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,