2012-05-10 23:55:59

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] ath9k : stability issue in a noisy environment

On Wed, May 09, 2012 at 08:12:38PM +0800, Hewitt Lee wrote:
> Hi All,
> This patch unlink a skb comes from ath_tx_form_aggr() which is freed at
> ath_tx_get_buffer() when tx buffers are full.
> Please kindly review it.

Please see:

http://wireless.kernel.org/en/developers/Documentation/SubmittingPatches

Also please provide a clear description of what you are trying to fix,
what happens without the patch, what happens with the patch. My review
below.

> Thanks.
> diff --git a/v3.3.x/drivers/net/wireless/ath/ath9k/xmit.c
> b/v3.3.x/drivers/net/wireless/ath/ath9k/xmit.c
> old mode 100644
> new mode 100755
> index 3182408..f4e1e62
> --- a/v3.3.x/drivers/net/wireless/ath/ath9k/xmit.c
> +++ b/v3.3.x/drivers/net/wireless/ath/ath9k/xmit.c
> @@ -1858,6 +1858,12 @@ static struct ath_buf *ath_tx_setup_buffer(struct
> ath_softc *sc,
> return bf;
>
> error:
> + if (tid) {
> + if (skb == skb_peek(&tid->buf_q)) {
> + __skb_unlink(skb, &tid->buf_q);
> + }
> + }
> +
> dev_kfree_skb_any(skb);
> return NULL;
> }

Yeah I have no idea why you are doing this here, based on your description
the skb will be free'd at ath_tx_get_buffer() but ath_tx_get_buffer()
does not free anything. Can you please be sure to check first against
the latest development tree for 802.11 first?

Luis