Received: by 10.192.165.156 with SMTP id m28csp1149397imm; Wed, 11 Apr 2018 13:22:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4++TXQObi9BSQVdSEs96oqyBqGr7wnIdowKZaBmF4JIfpI/2dMvmV4VH0TFk9BxoiYB93B5 X-Received: by 10.98.202.212 with SMTP id y81mr5205633pfk.227.1523478126861; Wed, 11 Apr 2018 13:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523478126; cv=none; d=google.com; s=arc-20160816; b=EPFDLl6Zoe/YGPEpgqFyhNPN0eFWdZCb+C8282Va0jVSrnvZo+S+BnGmzj7wQRBvaU 60HdQS/7XBr7vun5b77qe5crrh1eGDXGx8xNZHyOpdI+89aBXophAABhvBnCZZvdQRrC 7m/5DrsVvoIdIkwVPagqFe5SZDU/j/dQsxIrI9bJl72Suu7NgcdZriRxEIwlTO/Hpi+l SZTo7yyqBk0fR+V9TzYQSI225MXoqanIlAI0VlAh72475wb3VBcxo/QbdZl6kDpq+7zC MgvgPX2ZEaIp6r7FvbBYwohBclnRjzi3JVOkiqELVaelGBlFdUTzOllbvh++pGT4xxsq x78g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=RHumeLrNZRbeFDbv4I/6CXjcR2N543fFUDNmfiJ4JYc=; b=Zx7Smyd5Docv4CQbymoxTEZaz/Gq8MmsVj3JHWjh6uqsRCG+t8l+NvCg9FWmwo5J+H ViMIcdJmFEn67DlDq+e2eX3wtT7w90SLX4yp7fyc2EQnpaKEUfDAb7FZ6Ww7t+LXJjLT 3JbfLWgmlw9mJPtorVTNfb08kBf5jJGnN/qqa7Lg9YPo6cmJmuVynvfFI2nph3uNOTKJ JBodt7XKfhwmF9wHmyDdETKJW3VbI9lPwjgX4RD3OqynKvABo0wOYR6RaGhqGaVvQtaJ wpb6fArDEJdtL5/QiAlwXTyf4W5nLWp6Jaus2cAhBcA1oxLciajh5Zqx7H6Wm8DP5qck 3wGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q5si1224722pgc.620.2018.04.11.13.21.30; Wed, 11 Apr 2018 13:22:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933169AbeDKSwy (ORCPT + 99 others); Wed, 11 Apr 2018 14:52:54 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33560 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933117AbeDKSwv (ORCPT ); Wed, 11 Apr 2018 14:52:51 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 28AC6E3F; Wed, 11 Apr 2018 18:52:51 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Coelho , Johannes Berg , Sasha Levin Subject: [PATCH 4.9 013/310] mac80211: bail out from prep_connection() if a reconfig is ongoing Date: Wed, 11 Apr 2018 20:32:32 +0200 Message-Id: <20180411183622.879087040@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180411183622.305902791@linuxfoundation.org> References: <20180411183622.305902791@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luca Coelho [ Upstream commit f8860ce836f2d502b07ef99559707fe55d90f5bc ] If ieee80211_hw_restart() is called during authentication, the authentication process will continue, causing the driver to be called in a wrong state. This ultimately causes an oops in the iwlwifi driver (at least). This fixes bugzilla 195299 partly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195299 Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/mac80211/mlme.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -4332,6 +4332,10 @@ static int ieee80211_prep_connection(str if (WARN_ON(!ifmgd->auth_data && !ifmgd->assoc_data)) return -EINVAL; + /* If a reconfig is happening, bail out */ + if (local->in_reconfig) + return -EBUSY; + if (assoc) { rcu_read_lock(); have_sta = sta_info_get(sdata, cbss->bssid);