Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1256660pxa; Thu, 20 Aug 2020 06:55:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJTNbbfFiwCXq9FOJuKAOJwL2I2zuzA4WQPS9yQ6NyWQSIz43z7uLidxgz5yD2b48vPfsb X-Received: by 2002:a17:906:ce59:: with SMTP id se25mr3525168ejb.359.1597931732484; Thu, 20 Aug 2020 06:55:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597931732; cv=none; d=google.com; s=arc-20160816; b=y1sXLHXdvTV4pdxI5bEPTi1SmvwX2fg06/oQCN3/tNw4xEmPe5czNPOoFKWUBRsRD1 U3NHLxHs9J5zJkfRYPIbcEG/mIPorBfmCk4hutBUIn2AtM1y/UZMGgtLgKzvPuyx6GT4 cXaDhyp+WadxJrGHq8ABt7jtG3lcXxyWqWxQj/pxI0JyKKdXfZDn49RSIKBQ5CmXZlpf Jhi/cf+XkQ3LvaVCLDRXZz62QEBgTEoR9QnDBeFTwXODcPX6V4rE3AgJo/XXkAsnz/9C OJf10X4iYFL7tuX0q/kuKtgOIOqv+VYMJksrYobreIIygbxrUgUp5XHFkwrBdHv4ks61 M49g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PILI3wmlHem36Y6M4yxWhxNnOGW9S5ADAqTaZQ6++E4=; b=Jj2gRuyCs7TT+pgkN7FHBNuggNfOidF3PMVVvR4hGl96ujO0VjCbl/L3+0v93V3l0L RCP2lWYO1j88+ruhIbb6ipvhizZz8arclxr/RTB2HP6xVphIQZVhYS47WhGDzdS9q/D0 scy19s/+ngMENJomPLgKRQ4YpzrvDzfYQ1tCzZoocuPLTFC6w44Wm8fBimPvN1OGUg0S 9lH3pXYO0ZiivWq5wbPm/Vy8LrErqyGeqnuJ98Mvdsm7UF/j90nWXnvHEgWLJ3wZuSIq CW2fMNsbEmBI/Fy2PiNGI/7kj8JSVsowPygM9wmhgMQvTk0uzePU3wMUvUqrqY8kUHaX AWAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f8eRxaUF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s21si1159592eja.382.2020.08.20.06.55.08; Thu, 20 Aug 2020 06:55:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f8eRxaUF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730609AbgHTNyl (ORCPT + 99 others); Thu, 20 Aug 2020 09:54:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:35748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727905AbgHTJ0k (ORCPT ); Thu, 20 Aug 2020 05:26:40 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4165322CB1; Thu, 20 Aug 2020 09:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597915597; bh=fEdiXVCUATGjxgpl36gAhW7CNegS9vb79xmy4lwUylo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f8eRxaUF4a+1MoA2rovzm41Q36wueq8iSS901+IzC4kl+1UJp3IzXaeI532HO1Sqn cens2YNwEcXrotHEgJELC22zMb9KO9yK59fvN3UDXFb4YqCRRfONdAaodVq/i2aM+4 90VK87Nolnz1UqbioP3bAmfdVl1fGJnn6ihYqqbU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ben Greear , Johannes Berg Subject: [PATCH 5.8 070/232] mac80211: fix misplaced while instead of if Date: Thu, 20 Aug 2020 11:18:41 +0200 Message-Id: <20200820091616.191553035@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg commit 5981fe5b0529ba25d95f37d7faa434183ad618c5 upstream. This never was intended to be a 'while' loop, it should've just been an 'if' instead of 'while'. Fix this. I noticed this while applying another patch from Ben that intended to fix a busy loop at this spot. Cc: stable@vger.kernel.org Fixes: b16798f5b907 ("mac80211: mark station unauthorized before key removal") Reported-by: Ben Greear Link: https://lore.kernel.org/r/20200803110209.253009ae41ff.I3522aad099392b31d5cf2dcca34cbac7e5832dde@changeid Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/mac80211/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -1050,7 +1050,7 @@ static void __sta_info_destroy_part2(str might_sleep(); lockdep_assert_held(&local->sta_mtx); - while (sta->sta_state == IEEE80211_STA_AUTHORIZED) { + if (sta->sta_state == IEEE80211_STA_AUTHORIZED) { ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC); WARN_ON_ONCE(ret); }