From patchwork Wed Sep 6 13:19:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefano Brivio X-Patchwork-Id: 9940685 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5EE6F6035F for ; Wed, 6 Sep 2017 13:19:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5463828AD6 for ; Wed, 6 Sep 2017 13:19:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 494AC28BCD; Wed, 6 Sep 2017 13:19:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB72928AD6 for ; Wed, 6 Sep 2017 13:19:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754320AbdIFNTb convert rfc822-to-8bit (ORCPT ); Wed, 6 Sep 2017 09:19:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49862 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753494AbdIFNT3 (ORCPT ); Wed, 6 Sep 2017 09:19:29 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 00BC181DFA; Wed, 6 Sep 2017 13:19:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 00BC181DFA Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=sbrivio@redhat.com Received: from elisabeth (unknown [10.33.36.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D69F6E1EA; Wed, 6 Sep 2017 13:19:27 +0000 (UTC) Date: Wed, 6 Sep 2017 15:19:22 +0200 From: Stefano Brivio To: Johannes Berg Cc: Matteo Croce , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: hung task in mac80211 Message-ID: <20170906151922.4a320b1d@elisabeth> In-Reply-To: <1504702115.13457.16.camel@sipsolutions.net> References: <20170906144019.1c98a636@elisabeth> <1504702115.13457.16.camel@sipsolutions.net> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 06 Sep 2017 13:19:29 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 06 Sep 2017 14:48:35 +0200 Johannes Berg wrote: > I'll look in a bit - but > > > + mutex_unlock(&sta->ampdu_mlme.mtx); > >   ___ieee80211_stop_rx_ba_session( > >   sta, tid, WLAN_BACK_RECIPIENT, > >   WLAN_REASON_QSTA_TIMEOUT, true); > > This already has three underscores so shouldn't drop. Right, of course. > [...] > > + mutex_unlock(&sta->ampdu_mlme.mtx); > >   __ieee80211_start_rx_ba_session(sta, 0, 0, > > 0, 1, tid, > > maybe this one needs a ___ version then? Either that, or as it's a single call, perhaps just the following? Matter of taste I guess... diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index c92df492e898..377dd3c233d3 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c @@ -332,10 +332,13 @@ void ieee80211_ba_session_work(struct work_struct *work) WLAN_REASON_UNSPECIFIED, true); if (test_and_clear_bit(tid, - sta->ampdu_mlme.tid_rx_manage_offl)) + sta->ampdu_mlme.tid_rx_manage_offl)) { + mutex_unlock(&sta->ampdu_mlme.mtx); __ieee80211_start_rx_ba_session(sta, 0, 0, 0, 1, tid, IEEE80211_MAX_AMPDU_BUF, false, true); + mutex_lock(&sta->ampdu_mlme.mtx); + } if (test_and_clear_bit(tid + IEEE80211_NUM_TIDS, sta->ampdu_mlme.tid_rx_manage_offl))