Bug 13396 - 2.6.30-rc6 video oops on rmmod
Summary: 2.6.30-rc6 video oops on rmmod
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Video (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: ykzhao
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-28 05:06 UTC by Niel Lambrechts
Modified: 2009-06-25 16:05 UTC (History)
6 users (show)

See Also:
Kernel Version: 2.6.30-rc6
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
2.6.30-rc6 kernel OOPS (6.09 KB, text/plain)
2009-05-28 05:06 UTC, Niel Lambrechts
Details
the kernel oops log on the 2.6.30-rc7 (127.12 KB, text/plain)
2009-06-01 03:15 UTC, ykzhao
Details
Add the reference count to avoid unloading acpi video bus twice (3.85 KB, patch)
2009-06-01 05:24 UTC, ykzhao
Details | Diff
add the reference count to avoid unloading acpi video bus twice (4.17 KB, patch)
2009-06-04 09:25 UTC, ykzhao
Details | Diff

Description Niel Lambrechts 2009-05-28 05:06:57 UTC
Created attachment 21597 [details]
2.6.30-rc6 kernel OOPS

I use s2disk on a daily basis, and I recently tried to switch to UXA in org.conf in anticipation of KMS, for my Lenovo W500 with the integrated Intel card set to active:

00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)

Tonight my X server crashed on resume and I was placed back at the KDM prompt. So I switched to runlevel 3, changed AccelMethod back to "exa" and decided to unload all i915 modules - i915, drm, and video.

The latter unexpectedly returned "Killed", although none of these modules showed any 'used by' count.

I then did 'init 5' upon which I had a black screen, and decided to reboot. I then noticed that the following OOPS occurred prior to the reboot, likely the result of my "rmmod drm" or "rmmod output".
Comment 1 Len Brown 2009-05-28 05:36:35 UTC
Lets focus here on the kernel oops upon acpi video driver unload.
(the X crash you'll have to take to the X people)

Is there a simple way to provoke the oops w/o messing around with X?
Comment 2 ykzhao 2009-06-01 03:13:14 UTC
I can reproduce this bug on my box. 
And I can confirm that it can work well on the kernel of 2.6.29.

In my test the video and i915 are compiled as modules and the KMS mode is disabled.
   a. If only video driver is loaded, no ACPI backlight I/F is registered and it is not bound with the ACPI video device. In such case there is no oops when the video driver is unloaded.
   b. If the video/i915 driver is loaded, the ACPI backlight I/F is registered. The I915 driver is unloaded and then the oops appears when the video driver is unloaded.
   
    After checking the source code it seems that the function of acpi_video_exit is called when unloading the i915 driver. Then the acpi_video_exit is called again when unloading the video driver.
   
   Thanks.
Comment 3 ykzhao 2009-06-01 03:15:14 UTC
Created attachment 21675 [details]
the kernel oops log on the 2.6.30-rc7
Comment 4 ykzhao 2009-06-01 05:24:01 UTC
Created attachment 21676 [details]
Add the reference count to avoid unloading acpi video bus twice

Will you please try the debug patch and see whether the issue still exists?
   In the debug patch the reference count is added to avoid unloading acpi video bus twice.
   Thanks
Comment 5 ykzhao 2009-06-04 09:25:23 UTC
Created attachment 21745 [details]
add the reference count to avoid unloading acpi video bus twice
Comment 6 ykzhao 2009-06-04 09:26:26 UTC
I test the debug patch on my box and the issue can be fixed.

So the bug will be marked as resolved.
thanks.
Comment 7 Len Brown 2009-06-24 03:16:57 UTC
patch in comment #5 applied to acpi-test
Comment 8 Len Brown 2009-06-25 16:05:29 UTC
shipped in 2.6.31-rc1
closed

Note You need to log in before you can comment on or make changes to this bug.