* [PATCH] iwlagn: fix offchannel TX bug
@ 2011-03-05 18:35 Johannes Berg
2011-03-07 18:54 ` John W. Linville
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2011-03-05 18:35 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, Reinette Chatre
From: Johannes Berg <johannes.berg@intel.com>
In the case where remain-on-channel rather than
offchannel TX should be used, my offchannel TX
patch introduced a bug because mac80211 will
use the now-freed SKB.
iwlagn shouldn't free the SKB when it returns 1
here since then the SKB will still be used.
Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c 2011-03-05 19:32:58.000000000 +0100
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c 2011-03-05 19:33:08.000000000 +0100
@@ -3171,7 +3171,7 @@ static int iwl_mac_offchannel_tx(struct
out:
mutex_unlock(&priv->mutex);
free:
- if (ret)
+ if (ret < 0)
kfree_skb(skb);
return ret;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iwlagn: fix offchannel TX bug
2011-03-05 18:35 [PATCH] iwlagn: fix offchannel TX bug Johannes Berg
@ 2011-03-07 18:54 ` John W. Linville
2011-03-07 19:02 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: John W. Linville @ 2011-03-07 18:54 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Reinette Chatre
On Sat, Mar 05, 2011 at 07:35:39PM +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> In the case where remain-on-channel rather than
> offchannel TX should be used, my offchannel TX
> patch introduced a bug because mac80211 will
> use the now-freed SKB.
>
> iwlagn shouldn't free the SKB when it returns 1
> here since then the SKB will still be used.
>
> Reported-by: Reinette Chatre <reinette.chatre@intel.com>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> drivers/net/wireless/iwlwifi/iwl-agn.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/net/wireless/iwlwifi/iwl-agn.c 2011-03-05 19:32:58.000000000 +0100
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c 2011-03-05 19:33:08.000000000 +0100
> @@ -3171,7 +3171,7 @@ static int iwl_mac_offchannel_tx(struct
> out:
> mutex_unlock(&priv->mutex);
> free:
> - if (ret)
> + if (ret < 0)
> kfree_skb(skb);
>
> return ret;
OK, I give-up...what tree is this against? :-)
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iwlagn: fix offchannel TX bug
2011-03-07 18:54 ` John W. Linville
@ 2011-03-07 19:02 ` Johannes Berg
2011-03-07 19:44 ` Guy, Wey-Yi
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2011-03-07 19:02 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Reinette Chatre, Wey-Yi W Guy
On Mon, 2011-03-07 at 13:54 -0500, John W. Linville wrote:
> > --- a/drivers/net/wireless/iwlwifi/iwl-agn.c 2011-03-05 19:32:58.000000000 +0100
> > +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c 2011-03-05 19:33:08.000000000 +0100
> > @@ -3171,7 +3171,7 @@ static int iwl_mac_offchannel_tx(struct
> > out:
> > mutex_unlock(&priv->mutex);
> > free:
> > - if (ret)
> > + if (ret < 0)
> > kfree_skb(skb);
> >
> > return ret;
>
> OK, I give-up...what tree is this against? :-)
Oh dang, it's against our own tree and I thought we'd already sent out
the patch "iwlagn: support off-channel TX". Clearly, that isn't the
case. Wey-yi, can you please merge this fix with the patch?
Sorry about that!
johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iwlagn: fix offchannel TX bug
2011-03-07 19:02 ` Johannes Berg
@ 2011-03-07 19:44 ` Guy, Wey-Yi
0 siblings, 0 replies; 4+ messages in thread
From: Guy, Wey-Yi @ 2011-03-07 19:44 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless, Chatre, Reinette
On Mon, 2011-03-07 at 11:02 -0800, Johannes Berg wrote:
> On Mon, 2011-03-07 at 13:54 -0500, John W. Linville wrote:
>
> > > --- a/drivers/net/wireless/iwlwifi/iwl-agn.c 2011-03-05 19:32:58.000000000 +0100
> > > +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c 2011-03-05 19:33:08.000000000 +0100
> > > @@ -3171,7 +3171,7 @@ static int iwl_mac_offchannel_tx(struct
> > > out:
> > > mutex_unlock(&priv->mutex);
> > > free:
> > > - if (ret)
> > > + if (ret < 0)
> > > kfree_skb(skb);
> > >
> > > return ret;
> >
> > OK, I give-up...what tree is this against? :-)
>
> Oh dang, it's against our own tree and I thought we'd already sent out
> the patch "iwlagn: support off-channel TX". Clearly, that isn't the
> case. Wey-yi, can you please merge this fix with the patch?
>
> Sorry about that!
oh, sorry, I did not merge because waiting for the patch to fix the
iwlagn compiling problem. sorry!
Wey
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-07 20:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-05 18:35 [PATCH] iwlagn: fix offchannel TX bug Johannes Berg
2011-03-07 18:54 ` John W. Linville
2011-03-07 19:02 ` Johannes Berg
2011-03-07 19:44 ` Guy, Wey-Yi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).