From patchwork Tue Jul 22 14:55:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean-Pierre TOSONI X-Patchwork-Id: 4603881 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0E4059F375 for ; Tue, 22 Jul 2014 15:15:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D28F20123 for ; Tue, 22 Jul 2014 15:15:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2402520120 for ; Tue, 22 Jul 2014 15:15:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755032AbaGVPPy (ORCPT ); Tue, 22 Jul 2014 11:15:54 -0400 Received: from smtp-out05.msg.oleane.net ([62.161.7.3]:43318 "EHLO smtp-out05.msg.oleane.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752751AbaGVPPy convert rfc822-to-8bit (ORCPT ); Tue, 22 Jul 2014 11:15:54 -0400 Received: from smtp04.msg.oleane.net (smtp04.mail.priv [172.17.20.113]) by smtp-out05.msg.oleane.net with ESMTP id s6MFFnqA014642; Tue, 22 Jul 2014 17:15:50 +0200 Received: from RD9 ([195.6.104.67]) (authenticated) by smtp04.msg.oleane.net (MSA) with ESMTP id s6MEtMGX017840; Tue, 22 Jul 2014 16:55:22 +0200 From: "Jean-Pierre Tosoni" To: "'Felix Fietkau'" , References: <004101cfa58c$e0ccb3f0$a2661bd0$@acksys.fr> <53CE6B6F.3090503@openwrt.org> In-Reply-To: <53CE6B6F.3090503@openwrt.org> Subject: RE: get_expected_throughput introduces a kernel oops on sta_set_sinfo calls Date: Tue, 22 Jul 2014 16:55:22 +0200 Message-ID: <005001cfa5bc$f6befc60$e43cf520$@acksys.fr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQEMT+FQZdAhHBUSKyRgd2hFwjPzNQH/iWK2nSLYnMA= Content-Language: fr X-Backend: vm-smtp-sophos08v3 X-PMX-Spam: Probability=8% X-PFSI-Info: PMX 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.7.22.144220 (no antivirus check) X-Orange-Auth: bWMxNDg4LTE4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Great, it works! No more oops, and my debug printk never appears anymore. But it looks like one line is missing in your patch, 12/15 lines announced but only 11/14 lines present? Thanks you so much! -----Message d'origine----- De : Felix Fietkau [mailto:nbd@openwrt.org] Envoyé : mardi 22 juillet 2014 15:47 À : Jean-Pierre Tosoni; linux-wireless@vger.kernel.org Objet : Re: get_expected_throughput introduces a kernel oops on sta_set_sinfo calls On 2014-07-22 11:11, Jean-Pierre Tosoni wrote: > Hi list, > > I am using compat-wireless-20132-04-16 with kernel 3.3.8. > I experienced a kernel oops after applying the "get_expected_throughput" > patches series from Antonio Quartulli. > It happens when a station_dump is issued from userspace while an > association has begun but does not complete immediately due to bad channel. > After some debugging I made this patch which solves the issue: Please try this patch: --- -- 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 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -472,12 +472,15 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo) { struct ieee80211_sub_if_data *sdata = sta->sdata; struct ieee80211_local *local = sdata->local; - struct rate_control_ref *ref = local->rate_ctrl; + struct rate_control_ref *ref = NULL; struct timespec uptime; u64 packets = 0; u32 thr = 0; int i, ac; + if (test_sta_flag(sta, WLAN_STA_RATE_CONTROL)) + ref = local->rate_ctrl; + sinfo->generation = sdata->local->sta_generation; sinfo->filled = STATION_INFO_INACTIVE_TIME |