[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141029141408.GA9436@wfg-t540p.sh.intel.com>
Date: Wed, 29 Oct 2014 22:14:08 +0800
From: Fengguang Wu <fengguang.wu@...el.com>
To: Junjie Mao <eternal.n08@...il.com>
Cc: Martin Pitt <martin.pitt@...ntu.com>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH] mac80211_hwsim: release driver when
ieee80211_register_hw fails
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@...ntu.com> writes:
>
> > Acked-By: Martin Pitt <martin.pitt@...ntu.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists