Re: [ath9k-devel] [PATCH] ath9k_htc: fix skb_under_panic error
On Wed, Jun 5, 2013 at 7:03 PM, Oleksij Rempel li...@rempel-privat.de wrote: I was running two stream netperf test for 2 hours without visible regressions. With or without your pskb_expand_head patch applied? Thanks, Helmut ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k_htc: fix skb_under_panic error
Am 06.06.2013 13:48, schrieb Helmut Schaa: On Wed, Jun 5, 2013 at 7:03 PM, Oleksij Rempel li...@rempel-privat.de wrote: I was running two stream netperf test for 2 hours without visible regressions. With or without your pskb_expand_head patch applied? Thanks, Helmut whithout my patch, on to of wireless-testing master git. But i didn't had this problem before. So, may be this scenario was not used by me. Shouldn't we actually have this check from my patch, to avoid other oopses? -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k_htc: fix skb_under_panic error
Hi, On Tue, Jun 4, 2013 at 8:37 PM, Oleksij Rempel li...@rempel-privat.de wrote: This error seems to be really rare, and we do not know real couse of it. But, in any case, we should check size of head before reducing it. We had a similar issue in rt2x00 quite some time ago. In general mac80211 should always reserve enough headroom as requested by the driver in hw-extra_tx_headroom. However, there is a chance that a frame is send to the driver again (see ieee80211_handle_filtered_frame). But if the frame payload (or head) was moved due to padding and was not restored before calling ieee80211_tx_status by the driver the second trip through the driver has reduced headroom and could lead to such an error. Quickly checking ath9k_htc it seems as if ath9k_htc_tx adds some padding but ath9k_htc_tx_process does not remove the padding when passing the frame back to mac80211. Helmut ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k_htc: fix skb_under_panic error
On Tue, Jun 4, 2013 at 8:37 PM, Oleksij Rempel li...@rempel-privat.de wrote: This error seems to be really rare, and we do not know real couse of it. But, in any case, we should check size of head before reducing it. Mind to try the (completely untested) patch against wireless-testing instead? Helmut --- Subject: [PATCH] ath9k_htc: Restore skb headroom when returning skb to mac80211 ath9k_htc adds padding between the 802.11 header and the payload during TX by moving the header. When handing the frame back to mac80211 for TX status handling the header is not moved back into its original position. This can result in a too small skb headroom when entering ath9k_htc again (due to a soft retransmission for example) causing an skb_under_panic oops. Fix this by moving the 802.11 header back into its original position before returning the frame to mac80211 as other drivers like rt2x00 or ath5k do. Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com --- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index e602c95..666cfb6 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c @@ -448,6 +448,8 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv, struct ieee80211_conf *cur_conf = priv-hw-conf; bool txok; int slot; +struct ieee80211_hdr *hdr; +int padpos, padsize; slot = strip_drv_header(priv, skb); if (slot 0) { @@ -504,6 +506,15 @@ send_mac80211: ath9k_htc_tx_clear_slot(priv, slot); +/* Remove padding before handing frame back to mac80211 */ +hdr = (struct ieee80211_hdr *) skb-data; +padpos = ieee80211_hdrlen(hdr-frame_control); +padsize = padpos 3; +if (padsize skb-len padpos + padsize) { +memmove(skb-data + padsize, skb-data, padpos); +skb_pull(skb, padsize); +} + /* Send status to mac80211 */ ieee80211_tx_status(priv-hw, skb); } -- 1.7.10.4 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k_htc: fix skb_under_panic error
On 06/05/2013 04:24 PM, Helmut Schaa wrote: On Tue, Jun 4, 2013 at 8:37 PM, Oleksij Rempel li...@rempel-privat.de wrote: This error seems to be really rare, and we do not know real couse of it. But, in any case, we should check size of head before reducing it. Mind to try the (completely untested) patch against wireless-testing instead? Helmut I will do, however I'm not in range of that USB wireless adapter for about 1,5 weeks. Marc signature.asc Description: OpenPGP digital signature ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k_htc: fix skb_under_panic error
Am 05.06.2013 16:26, schrieb Marc Kleine-Budde: On 06/05/2013 04:24 PM, Helmut Schaa wrote: On Tue, Jun 4, 2013 at 8:37 PM, Oleksij Rempel li...@rempel-privat.de wrote: This error seems to be really rare, and we do not know real couse of it. But, in any case, we should check size of head before reducing it. Mind to try the (completely untested) patch against wireless-testing instead? Helmut I will do, however I'm not in range of that USB wireless adapter for about 1,5 weeks. Helmut, thank you for patch! i'll do regression test, but not week long test. So i probably won't reproduce this issue. -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k_htc: fix skb_under_panic error
Am 05.06.2013 16:46, schrieb Oleksij Rempel: Am 05.06.2013 16:26, schrieb Marc Kleine-Budde: On 06/05/2013 04:24 PM, Helmut Schaa wrote: On Tue, Jun 4, 2013 at 8:37 PM, Oleksij Rempel li...@rempel-privat.de wrote: This error seems to be really rare, and we do not know real couse of it. But, in any case, we should check size of head before reducing it. Mind to try the (completely untested) patch against wireless-testing instead? Helmut I will do, however I'm not in range of that USB wireless adapter for about 1,5 weeks. Helmut, thank you for patch! i'll do regression test, but not week long test. So i probably won't reproduce this issue. I was running two stream netperf test for 2 hours without visible regressions. -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH] ath9k_htc: fix skb_under_panic error
This error seems to be really rare, and we do not know real couse of it. But, in any case, we should check size of head before reducing it. Signed-off-by: Oleksij Rempel li...@rempel-privat.de Reported-by: Marc Kleine-Budde m...@blackshift.org --- drivers/net/wireless/ath/ath9k/htc_hst.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c index aac4a40..2901351 100644 --- a/drivers/net/wireless/ath/ath9k/htc_hst.c +++ b/drivers/net/wireless/ath/ath9k/htc_hst.c @@ -26,6 +26,12 @@ static int htc_issue_send(struct htc_target *target, struct sk_buff* skb, struct htc_endpoint *endpoint = target-endpoint[epid]; int status; + if (skb_headroom(skb) len + pskb_expand_head(skb, len, 0, GFP_ATOMIC)) { + dev_err(target-dev, Unable to expand headrom to %d\n, len); + return -ENOMEM; + } + hdr = (struct htc_frame_hdr *) skb_push(skb, sizeof(struct htc_frame_hdr)); hdr-endpoint_id = epid; -- 1.8.1.2 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel