From: Martin Pitt <martin.pitt@ubuntu.com>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Johannes Berg <johannes.berg@intel.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [mac80211_hwsim] BUG: unable to handle kernel paging request at ce1db404
Date: Wed, 12 Mar 2014 18:34:46 +0100 [thread overview]
Message-ID: <20140312173446.GD2983@piware.de> (raw)
In-Reply-To: <20140308121138.GA8359@localhost>
[-- Attachment #1: Type: text/plain, Size: 2241 bytes --]
Fengguang Wu [2014-03-08 20:11 +0800]:
> [ 4.429993] mac80211_hwsim: ieee80211_register_hw failed (-2)
> [...]
> [ 4.431924] [<c12377de>] get_device+0xf/0x17
> [ 4.431924] [<c123a165>] driver_detach+0x38/0x8f
> [ 4.431924] [<c1239433>] bus_remove_driver+0x53/0x66
> [ 4.431924] [<c123a535>] driver_unregister+0x38/0x3d
> [ 4.431924] [<c123b3aa>] platform_driver_unregister+0xb/0xd
> [ 4.431924] [<c1c4ac9f>] init_mac80211_hwsim+0x3a5/0x3b6
So that first message is from
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/mac80211_hwsim.c?id=9ea927748#n2428
At this point we registered the platform driver and the class, and it
should have created two devices (at least for the default radios=2).
What's odd is that I don't see this printk in your kernel log:
mac80211_hwsim: Initializing radio %d
If for some reasons "radio" is 0, it would not show this and not
initialize data->dev, but then you shouldn't get to
ieee80211_register_hw() either as it's in the same loop. So that's a
bit of a mystery to me.
On failure, above ieee80211_register_hw() jumps to the cleanup:
| failed_hw:
| device_unregister(data->dev);
| failed_drvdata:
| ieee80211_free_hw(hw);
| failed:
| mac80211_hwsim_free();
| failed_unregister_driver:
| driver_unregister(&mac80211_hwsim_driver);
| return err;
| }
The mac80211_hwsim_free() function again calls
device_unregister(data->dev) for a list (not sure which, I'm not
certain how to interpret
list_for_each_entry_safe(data, tmpdata, &tmplist, list)
) Could that be the double free causing the memory corruption?
If you are in a position to do quick builds and tests, does the crash
go away with this?
printk(KERN_DEBUG "mac80211_hwsim: device_bind_driver failed (%d)\n",
err);
- goto failed_hw;
+ goto failed_drvdata;
}
(I'm not claiming that this is correct, just taking a stab at
understanding what happens) If not, does it go away with changing the
goto to failed_unregister_driver()?
Thanks,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-03-12 17:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-05 12:57 [mac80211_hwsim] WARNING: CPU: 0 PID: 1 at include/linux/kref.h:47 kobject_get() Fengguang Wu
2014-03-05 13:23 ` [mac80211_hwsim] BUG: unable to handle kernel paging request at ce1db404 Fengguang Wu
2014-03-08 12:11 ` Fengguang Wu
2014-03-08 12:11 ` Fengguang Wu
2014-03-12 17:34 ` Martin Pitt [this message]
2014-03-12 20:45 ` Krishna Chaitanya
2014-03-15 15:20 ` Johannes Berg
2014-03-15 15:33 ` Krishna Chaitanya
2014-03-15 15:41 ` Johannes Berg
2014-03-15 16:09 ` Krishna Chaitanya
2014-03-12 17:08 ` Martin Pitt
2014-03-14 9:30 ` Fengguang Wu
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=20140312173446.GD2983@piware.de \
--to=martin.pitt@ubuntu.com \
--cc=fengguang.wu@intel.com \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.