On 12/2/24 20:19, Jocelyn Falempe wrote: >>> >>> I've now noticed that drm_gem_shmem_vmap() expects BO reservation lock >>> to be held and we can't take lock it at a panic time. >>> >>> https://elixir.bootlin.com/linux/v6.12.1/source/drivers/gpu/drm/ >>> drm_gem_shmem_helper.c#L330 >>> >>> This resv warning isn't triggered because bo->base.vaddr is set for VT >>> framebufffer BO when panic happens. > > I usually test using gnome desktop in the VM, and in this case vaddr is > not set, and calling vmap() is needed. (and I don't get the warning, I > will check why). All those get_pages() and vmap() that drm_gem_shmem_vmap() uses may sleep. You'll need to add atomic variants for the vmap funcs if it's really needed. Like I said in the comment to v6, let's start with rejecting BOs that aren't vmapped. If atomic vmap will become needed, it will be a separate problem to solve. -- Best regards, Dmitry