From: Fengguang Wu <fengguang.wu@intel.com>
To: Junjie Mao <eternal.n08@gmail.com>
Cc: Martin Pitt <martin.pitt@ubuntu.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] mac80211_hwsim: release driver when ieee80211_register_hw fails
Date: Wed, 29 Oct 2014 22:14:08 +0800 [thread overview]
Message-ID: <20141029141408.GA9436@wfg-t540p.sh.intel.com> (raw)
In-Reply-To: <8638a718ft.fsf@MJJ-LAPTOP.i-did-not-set--mail-host-address--so-tickle-me>
On Wed, Oct 29, 2014 at 06:23:02PM +0800, Junjie Mao wrote:
> I was not familiar with the acquiring/releasing API either, until I met
> with this bug...
>
> Perhaps we can use static checkers to avoid these issues as early as
> possible. Any suggestions?
CC Dan. His smatch checker might be able (or could be enabled) to
handle the verification of missing device_release_driver() call.
Thanks,
Fengguang
> Martin Pitt <martin.pitt@ubuntu.com> writes:
>
> > Acked-By: Martin Pitt <martin.pitt@ubuntu.com>
> >
> > Hello Junjie,
> >
> > Junjie Mao [2014-10-28 9:31 +0800]:
> >> The driver is not released when ieee80211_register_hw fails in
> >> mac80211_hwsim_create_radio, leading to the access to the unregistered (and
> >> possibly freed) device in platform_driver_unregister:
> >
> > Many thanks for fixing this! Sorry about that, I don't know these bits
> > very well.
> >
> > Martin
next prev parent reply other threads:[~2014-10-29 14:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 1:31 Junjie Mao
2014-10-29 6:45 ` Martin Pitt
2014-10-29 10:23 ` Junjie Mao
2014-10-29 14:14 ` Fengguang Wu [this message]
2014-10-29 15:31 ` Johannes Berg
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=20141029141408.GA9436@wfg-t540p.sh.intel.com \
--to=fengguang.wu@intel.com \
--cc=dan.carpenter@oracle.com \
--cc=eternal.n08@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=martin.pitt@ubuntu.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®