From patchwork Thu Jan 30 19:39:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 3559111 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3350CC02DC for ; Thu, 30 Jan 2014 20:03:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 209EA2017E for ; Thu, 30 Jan 2014 20:03:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 43DC920179 for ; Thu, 30 Jan 2014 20:03:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752954AbaA3UDj (ORCPT ); Thu, 30 Jan 2014 15:03:39 -0500 Received: from mx3.wp.pl ([212.77.101.7]:52735 "EHLO mx3.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751165AbaA3UDi (ORCPT ); Thu, 30 Jan 2014 15:03:38 -0500 X-Greylist: delayed 1599 seconds by postgrey-1.27 at vger.kernel.org; Thu, 30 Jan 2014 15:03:38 EST Received: (wp-smtpd smtp.wp.pl 23319 invoked from network); 30 Jan 2014 20:36:57 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1391110617; bh=PlyhomZEvt+QpitX42iu5yXAAwsuzdtomYnWCTQlQ6A=; h=From:To:Cc:Subject; b=HOTfRSNlekQrAgm6QH7GPCXe6PpCz1sfqkc/UKpEVlkEtf2iyUmO75GX9+LP692C8 +T1flyFE4iQtYGS00n0lZpuqpyCOkSxsI4pcg3VIB0nXGdBNzcxU+SwBcvNHiiU4Fy 1byxEPoavNschSnKHd39LYz3Y253EKownyVchYvI= Received: from ip-94-112-189-223.net.upcbroadband.cz (HELO localhost) (stf_xl@wp.pl@[94.112.189.223]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with AES128-SHA encrypted SMTP for ; 30 Jan 2014 20:36:57 +0100 Date: Thu, 30 Jan 2014 20:39:06 +0100 From: Stanislaw Gruszka To: Tuomas =?iso-8859-1?Q?R=E4s=E4nen?= Cc: Ivo van Doorn , Gertjan van Wingerde , Helmut Schaa , "John W. Linville" , linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com, tuomasjjrasanen@tjjr.fi, Veli-Matti Lintu Subject: Re: PROBLEM: skb_push called from rt2x00 panics occasionally Message-ID: <20140130193906.GA2977@localhost.localdomain> References: <2018379362.52866.1391084425810.JavaMail.zimbra@opinsys.fi> <879434908.52885.1391085222657.JavaMail.zimbra@opinsys.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <879434908.52885.1391085222657.JavaMail.zimbra@opinsys.fi> User-Agent: Mutt/1.5.21 (2010-09-15) X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000000 [YZOU] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Jan 30, 2014 at 12:33:42PM +0000, Tuomas Räsänen wrote: > ================================================= > skb_push called from rt2x00 panics occasionally > ================================================= > > We have been experiencing occasional skb_push panics with rt2x00 driver > throughout the stable v3.10 -series. Problems occur with hosts acting as > accesspoints, managed by hostapd 2.0. Some hosts panic reportedly > several times per week, some almost never. All hosts have identical > kernels and WiFi adapters. > > We have not been able to reproduce panics in a controlled manner. > > I'd be very happy to get some advice how to proceed in debugging and fixing > this problem and even better, to understand the whole issue > thoroughly. Unfortunately, all I know now is that the skb headroom is > not big enough for the frame the AP is trying to transmit, right? > Hopefully someone can shed some light on this problem. Yes, is possible that we have no headroom for frame retransmitted several times, but I do not see bug in code for that so far. We remove and add again l2 pad for retransmit frame, that should not utilize more headroom than for first frame transmission (as long mac80211 does not increase header length, but that seems to be not possible and sensible). For know you can try to increase headroom like on below patch or use module with nohwcrypt=1. Please check if any of that stops panics or just make it less reproducible. You can also configure kdump to dump memory to see how skb looks when kernel crashes. Stanislaw --- 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 diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index e4ba2ce..50fc3e7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h @@ -115,7 +115,7 @@ * Constants for extra TX headroom for alignment purposes. */ #define RT2X00_ALIGN_SIZE 4 /* Only whole frame needs alignment */ -#define RT2X00_L2PAD_SIZE 8 /* Both header & payload need alignment */ +#define RT2X00_L2PAD_SIZE 12 /* Both header & payload need alignment */ /* * Standard timing and size defines.