Bug 29828 - Kernel OOPs when rmmod i915
Summary: Kernel OOPs when rmmod i915
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-26 19:39 UTC by wang,jinjin
Modified: 2017-10-06 14:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
kernel oops message (2.09 KB, text/plain)
2010-08-26 19:39 UTC, wang,jinjin
no flags Details
kernel oops dmesg (59.78 KB, text/plain)
2010-08-26 19:41 UTC, wang,jinjin
no flags Details
Fix handlecount (2.24 KB, patch)
2010-09-05 15:49 UTC, Chris Wilson
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description wang,jinjin 2010-08-26 19:39:41 UTC
Created attachment 38212 [details]
kernel oops message

System Environment:
--------------------------
Arch:       x86_64
Platform:   Calpella/Piketon

 Libdrm:		(master)2.4.21-17-g8a76244a0fd09d0e3298fe68af812d7eaa4dbcb5
 Mesa:		(master)90437330e2886fcd351dd11ee0e5aa3e8b523fdc
 Xserver:		(master)xorg-server-1.9.0
 Xf86_video_intel:		(master)2.12.0-76-gb7a8087fbc5cbd944f8345b8a098270c1f63ebab
 Cairo:		(master)174fb5f16f93887e2f319edd5b46efae3e7e93ad
 Kernel:		(for-linus)76be97c1fc945db08aae1f1b746012662d643e97

Bug detailed description:
-------------------------
When operation system begin to run, the i915 module has a dependence with not sure process(if someone make sure it, please tell me the methods).So, it was unable to rmmod.To think that process may be vtconsole, I kill it by echo "0".Then, there is nothing dependence with i915.Unfortunately, kernel will finally be panic when rmmod i915.

Reproduce steps:
----------------
1.pkill X
2.(make sure i915 module has just one dependence) lsmod | grep i915
3.echo 0 >/sys/class/vtconsole/vtcon1/bind 
4.rmmod i915
Comment 1 wang,jinjin 2010-08-26 19:41:41 UTC
Created attachment 38213 [details]
kernel oops dmesg
Comment 2 Chris Wilson 2010-08-27 09:54:53 UTC
More than likely coupled to the memory leak, though Daniel Vetter's unload patches are obviously required here as well.
Comment 3 Jesse Barnes 2010-09-01 09:49:20 UTC
Yeah this looks like an issue that was fixed in Daniel's patchset.  I think I have those patches included in my edp-testing branch at git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel.git, can you give it a try?
Comment 4 wang,jinjin 2010-09-01 09:52:31 UTC
OK.I will try it

-----Original Message-----
From: bugzilla-daemon@freedesktop.org [mailto:bugzilla-daemon@freedesktop.org] 
Sent: Thursday, September 02, 2010 12:49 AM
To: Wang, Jinjin
Subject: [Bug 29828] Kernel OOPs when rmmod i915

https://bugs.freedesktop.org/show_bug.cgi?id=29828

--- Comment #3 from Jesse Barnes <jbarnes@virtuousgeek.org> 2010-09-01 09:49:20 PDT ---
Yeah this looks like an issue that was fixed in Daniel's patchset.  I think I
have those patches included in my edp-testing branch at
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel.git, can you
give it a try?
Comment 5 Chris Wilson 2010-09-05 15:49:54 UTC
Created attachment 38461 [details] [review]
Fix handlecount
Comment 6 wang,jinjin 2010-09-05 22:28:14 UTC
I builded the kernel source which from  git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel.git and tested it. But the Oop still has as before. 

Thanks !!
Comment 7 wang,jinjin 2010-09-05 23:17:13 UTC
I builded the kernel source which from  git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel.git and tested it. But the Oop still has as before. 

Thanks !!
Comment 8 Chris Wilson 2010-09-06 09:40:57 UTC
Jinjin can you verify the bug against

http://cgit.freedesktop.org/~ickle/drm-intel/log/?h=drm-intel-staging

that has both the module unload fixes from Daniel Vetter and the handle leak fix, which I think is the likely suspect here.
Comment 9 wang,jinjin 2010-09-07 10:30:35 UTC
I tested with  (drm-intel-staging)86fd065f75d5ed9e404d4fd124c5e67f9ac4b9fd and found that it was not OOPS after rmmod i915.
Comment 10 Chris Wilson 2010-09-07 10:41:36 UTC
Thanks! Just to spoil the fun, we won't been pushing Daniel's module unload fixes upstream just yet.

The current proposed set of patches for upstream are in drm-intel-fixes and include the fix for the handle leak (which I think is the real culprit here). It will be vital to repeat the test once we have negotiated which patches Linus will pull to see if we have successfully fixed this issue in the upstream kernel.
Comment 11 Chris Wilson 2010-09-08 07:20:29 UTC
Ok, drm-intel-fixes now represents what is upstream. Please can you verify that we have successfully fixed the leak on that branch.
Comment 12 wang,jinjin 2010-09-08 20:29:21 UTC
I tested with  Kernel: (drm-intel-fixes)205c6c88f8a8d274cacfaf84f46f5bbb06f4ac66 and
found that it was not OOPS after rmmod i915.

dmesg:Console: switching to colour VGA+ 80x25
drm: unregistered panic notifier
[drm] Module unloaded
Comment 13 Chris Wilson 2010-09-09 00:34:33 UTC
That is a relief, thanks.
Comment 14 wang,jinjin 2010-09-12 03:27:07 UTC
Thanks, Chris.Now. I do verify it!!
Comment 15 Elizabeth 2017-10-06 14:53:53 UTC
Closing old verified.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.