https://bugzilla.kernel.org/show_bug.cgi?id=116101
Bug ID: 116101 Summary: "Userspace still has active objects" and "trying to unbind memory from uninitialized GART !" when unbinding from radeon Product: Drivers Version: 2.5 Kernel Version: 4.5.0 Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: Video(DRI - non Intel) Assignee: drivers_video-dri@kernel-bugs.osdl.org Reporter: MonopolyMan720@aol.com Regression: No
Created attachment 212291 --> https://bugzilla.kernel.org/attachment.cgi?id=212291&action=edit Journalctl output
I am attempting to unbind my R9 290 from radeon and rebind it to vfio. However, the entire system hangs when "echo "0000:01:00.0" > /sys/bus/pci/devices/0000:01:00.0/driver/unbind" is ran as root.
Steps to Reproduce: Run the following script as root
#!/bin/bash set -x echo "1002 67b1" > /sys/bus/pci/drivers/vfio-pci/new_id echo "0000:01:00.0" > /sys/bus/pci/devices/0000:01:00.0/driver/unbind echo "0000:01:00.0" > /sys/bus/pci/drivers/vfio-pci/bind echo "1002 67b1" > /sys/bus/pci/drivers/vfio-pci/remove_id
echo "1002 aac8" > /sys/bus/pci/drivers/vfio-pci/new_id echo "0000:01:00.1" > /sys/bus/pci/devices/0000:01:00.1/driver/unbind echo "0000:01:00.1" > /sys/bus/pci/drivers/vfio-pci/bind echo "1002 aac8" > /sys/bus/pci/drivers/vfio-pci/remove_id
set +x
Actual Results: System hangs on "echo "0000:01:00.0" > /sys/bus/pci/devices/0000:01:00.0/driver/unbind"
Journalctl shows "Apr 09 16:10:26 joey-arch-pc kernel: radeon 0000:01:00.0: Userspace still has active objects !" followed by numerous "Apr 09 16:10:26 joey-arch-pc kernel: trying to unbind memory from uninitialized GART !"
Expected Results:
The GPU should be unbinding from radeon and rebinding to vfio-pci without hanging.
Additional information: I experienced the same issue on 4.1.20-1.
I know of instances where the same script results in the expected outcome with a Cayman PRO graphics card.
Attached is the output of journalctl for the entire boot. Go to 16:10:26 to see relevant call traces.