[Bug 84431] New: Kernel crash when unloading radeon module for switcheroo card

bugzilla-daemon at bugzilla.kernel.org bugzilla-daemon at bugzilla.kernel.org
Fri Sep 12 13:39:24 PDT 2014


https://bugzilla.kernel.org/show_bug.cgi?id=84431

            Bug ID: 84431
           Summary: Kernel crash when unloading radeon module for
                    switcheroo card
           Product: Drivers
           Version: 2.5
    Kernel Version: all
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: Video(DRI - non Intel)
          Assignee: drivers_video-dri at kernel-bugs.osdl.org
          Reporter: pali.rohar at gmail.com
        Regression: No

Created attachment 149991
  --> https://bugzilla.kernel.org/attachment.cgi?id=149991&action=edit
Fix crash after rmmod radeon on PX systems.

Calling rmmod radeon on PX system cause kernel crash. Reason is function
vga_switcheroo_init_domain_pm_ops() which setting dev->pm_domain function of
PCI device. When radeon module is unloaded pointer dev->pm_domain is set to
vga_switcheroo function which try to call radeon function (which does not
exists in memory after rmmod radeon). I bet that nouveau has same problem.

I'm attaching simple patch which set dev->pm_domain of PCI device back to NULL
when removing radeon device so vga_switcheroo will not be called.

But I think that proper way for fixing this bug - which is in vga_switcheroo -
should be to add function like "vga_switcheroo_exit_domain_pm_ops()" which will
set pm_domain back to origin value (which is in my case NULL).

With my patch on PX system I can call rmmod radeon, modprobe radeon, rmmod
radeon, ... many times without no crash.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the dri-devel mailing list