dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 84431] New: Kernel crash when unloading radeon module for switcheroo card
Date: Fri, 12 Sep 2014 20:39:24 +0000	[thread overview]
Message-ID: <bug-84431-2300@https.bugzilla.kernel.org/> (raw)

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@kernel-bugs.osdl.org
          Reporter: pali.rohar@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.

             reply	other threads:[~2014-09-12 20:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12 20:39 bugzilla-daemon [this message]
2014-09-12 20:41 ` [Bug 84431] Kernel crash when unloading radeon module for switcheroo card bugzilla-daemon
2014-09-12 21:38 ` bugzilla-daemon
2014-09-12 21:44 ` bugzilla-daemon
2014-09-12 22:08 ` bugzilla-daemon
2014-09-12 22:09 ` bugzilla-daemon
2014-09-12 22:09 ` bugzilla-daemon
2014-09-12 23:01 ` bugzilla-daemon
2014-09-21 10:15 ` bugzilla-daemon
2014-11-26 22:56 ` bugzilla-daemon
2016-07-15 13:27 ` bugzilla-daemon
2016-08-05 19:18 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-84431-2300@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).