linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: Re: [PATCH] iwlagn: fix offchannel TX bug
Date: Mon, 7 Mar 2011 13:54:30 -0500	[thread overview]
Message-ID: <20110307185429.GD2664@tuxdriver.com> (raw)
In-Reply-To: <1299350139.29845.4.camel@jlt3.sipsolutions.net>

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.

  reply	other threads:[~2011-03-07 19:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-05 18:35 [PATCH] iwlagn: fix offchannel TX bug Johannes Berg
2011-03-07 18:54 ` John W. Linville [this message]
2011-03-07 19:02   ` Johannes Berg
2011-03-07 19:44     ` Guy, Wey-Yi

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=20110307185429.GD2664@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).