Closed MingcongBai closed 3 months ago
关键摘要:
nvkm_firmware_ctor
函数中,fw->img
的内存分配应该使用kmalloc
而不是dma_alloc_coherent
,以避免潜在的DMA错误。dma_map_single
函数的使用应该检查返回值,以确保内存映射成功。kfree
函数在内存映射失败时被调用,但是没有相应的注释说明为什么需要kfree
。sg_init_one
函数的使用应该确保fw->img
的内存地址是正确的。是否建议立即修改: 是
This commit fixes a kernel BUG (which ends up resulting in a hang) on a Lenovo ThinkBook 14 G4+ ARA with AMD + NVIDIA graphics.
This reverts commit 2a5599c7ff477bf5f4fa3a776cdb1cec7a4170dd.