Bug 706574 - module wmi when unloaded causes Oops and system locks up
Summary: module wmi when unloaded causes Oops and system locks up
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: John Feeney
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-21 07:58 UTC by cam
Modified: 2013-01-10 07:39 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-02-06 16:53:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
log messages from boot to eventual Oops (89.91 KB, text/plain)
2011-05-21 08:10 UTC, cam
no flags Details
screenshot.jpg (174.76 KB, image/jpeg)
2011-10-17 14:49 UTC, Stefan Assmann
no flags Details
Part of kernel log after Oops (4.19 KB, text/plain)
2011-11-02 10:53 UTC, Peter Wu
no flags Details

Description cam 2011-05-21 07:58:48 UTC
Description of problem:
Whilst investigating problems related to https://bugzilla.redhat.com/show_bug.cgi?id=697157
I unloaded the hp_wmi module, then the wmi module. The system locked up, the screen changed to a plain console and an oops message was printed. I recovered this from the log after power cycling (the machine wasn't responding)

Version-Release number of selected component (if applicable):
kernel-2.6.38.6-27.fc15.i686


How reproducible:
100%

Steps to Reproduce:
1. boot to normal system
2. rmmod hp_wmi
3. rmmod wmi
  
Actual results:
black screen / console, oops message and system is locked up

Expected results:
module should be removable or give error message.

Additional info:
May be related to BZ 697157 where the ath9k module can't unload (and locks up spontaneously too)

Comment 1 cam 2011-05-21 08:10:51 UTC
Created attachment 500172 [details]
log messages from boot to eventual Oops

Comment 2 Josh Boyer 2011-10-06 15:40:42 UTC
Do you still get this error with the 2.6.40.x updates in F15?

Comment 3 Stefan Assmann 2011-10-07 10:38:50 UTC
modprobe -r wmi on 2.6.40.6 still oopses.

Comment 4 Stefan Assmann 2011-10-17 07:40:16 UTC
also still happens with f16 beta

Comment 5 Chuck Ebbert 2011-10-17 14:04:51 UTC
(In reply to comment #4)
> also still happens with f16 beta

Please post traces from f15 and/or f16

Comment 6 Stefan Assmann 2011-10-17 14:49:26 UTC
Created attachment 528559 [details]
screenshot.jpg

The system is inoperable after module unload so I could only take a screenshot.
f16 kernel-3.1.0.0.rc9

Comment 7 Peter Wu 2011-11-02 10:53:17 UTC
Created attachment 531313 [details]
Part of kernel log after Oops

It happens on Kubuntu 11.10 Oneiric too

$ uname -a
Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

For some reason, device->kobj is NULL
sysfs_find_dirent: http://lxr.linux.no/#linux+v3.1/fs/sysfs/dir.c#L539
sysfs_get_dirent: http://lxr.linux.no/#linux+v3.1/fs/sysfs/dir.c#L575
sysfs_unmerge_group: http://lxr.linux.no/#linux+v3.1/fs/sysfs/group.c#L195
(rpm_sysfs_remove: http://lxr.linux.no/#linux+v3.1/drivers/base/power/sysfs.c#L534)
dpm_sysfs_remove: http://lxr.linux.no/#linux+v3.1/drivers/base/power/sysfs.c#L539
device_del: http://lxr.linux.no/#linux+v3.1/drivers/base/core.c#L1098
device_unregister: http://lxr.linux.no/#linux+v3.1/drivers/base/core.c#L1152

Could the patch at have fixed this?
http://git.kernel.org/?p=linux/kernel/git/next/linux-next-history.git;a=commitdiff;h=023b9565972a4a5e0f01b9aa32680af6e9b5c388

Comment 8 Josh Boyer 2011-11-02 13:04:40 UTC
(In reply to comment #7)
> Could the patch at have fixed this?
> http://git.kernel.org/?p=linux/kernel/git/next/linux-next-history.git;a=commitdiff;h=023b9565972a4a5e0f01b9aa32680af6e9b5c388

Possibly.  That commit should be in the most recent rawhide kernel.  If someone is willing to test that, it would be appreciated.

Comment 9 Peter Wu 2011-11-02 13:44:20 UTC
I've built the module using a custom Makefile and tested it. I can confirm that the NULL BUG() has disappeared.

Tests:

ubuntu@ubuntu:~$ sudo modprobe -v wmi 
insmod /lib/modules/3.0.0-12-generic/kernel/drivers/platform/x86/wmi.ko 
ubuntu@ubuntu:~$ sudo modprobe -v -r wmi 
rmmod /lib/modules/3.0.0-12-generic/kernel/drivers/platform/x86/wmi.ko
ubuntu@ubuntu:~$ sudo modprobe -v mxm-wmi 
insmod /lib/modules/3.0.0-12-generic/kernel/drivers/platform/x86/wmi.ko 
insmod /lib/modules/3.0.0-12-generic/kernel/drivers/platform/x86/mxm-wmi.ko 
ubuntu@ubuntu:~$ sudo modprobe -v -r mxm-wmi 
rmmod /lib/modules/3.0.0-12-generic/kernel/drivers/platform/x86/mxm-wmi.ko
rmmod /lib/modules/3.0.0-12-generic/kernel/drivers/platform/x86/wmi.ko
ubuntu@ubuntu:~$ sudo modprobe -v nouveau 
insmod /lib/modules/3.0.0-12-generic/kernel/drivers/platform/x86/wmi.ko 
insmod /lib/modules/3.0.0-12-generic/kernel/drivers/platform/x86/mxm-wmi.ko 
insmod /lib/modules/3.0.0-12-generic/kernel/drivers/gpu/drm/ttm/ttm.ko 
insmod /lib/modules/3.0.0-12-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko 
ubuntu@ubuntu:~$ sudo modprobe -v -r nouveau 
rmmod /lib/modules/3.0.0-12-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko
rmmod /lib/modules/3.0.0-12-generic/kernel/drivers/gpu/drm/ttm/ttm.ko
rmmod /lib/modules/3.0.0-12-generic/kernel/drivers/platform/x86/mxm-wmi.ko
rmmod /lib/modules/3.0.0-12-generic/kernel/drivers/platform/x86/wmi.ko

No Oopses anymore.

Comment 10 Josh Boyer 2011-11-02 13:47:25 UTC
(In reply to comment #9)
> I've built the module using a custom Makefile and tested it. I can confirm that
> the NULL BUG() has disappeared.

OK.  I'll backport the patch to F16 and get it included.  Will ship as an update, as it's a bit too late to get this into the release at this point.

Comment 11 Josh Boyer 2011-11-02 14:00:28 UTC
Added to both F15 and F16.  Will be in the next kernel builds.

Also, this was supposed to head for stable so I pinged GregKH about it as well.


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