From: Johannes Berg <johannes.berg@xxxxxxxxx> 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@xxxxxxxxx> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@xxxxxxxxx> --- drivers/net/wireless/iwlwifi/iwl-agn.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 5f4e481..b57fbbf 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -2996,7 +2996,7 @@ static int iwl_mac_offchannel_tx(struct ieee80211_hw *hw, struct sk_buff *skb, out: mutex_unlock(&priv->mutex); free: - if (ret) + if (ret < 0) kfree_skb(skb); return ret; -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html