Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3941704pxj; Mon, 21 Jun 2021 09:51:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSlUfG+iL4vfKlMGeeoyU917nT1gKjBBjEv7PwstBMs0WzS49YQrZfJIHGJYG6HvzhIDJg X-Received: by 2002:a05:6e02:1aa1:: with SMTP id l1mr3157606ilv.141.1624294279887; Mon, 21 Jun 2021 09:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294279; cv=none; d=google.com; s=arc-20160816; b=KF27HXiFWoI5vHBHJQW9vEuE1wuhTMCgLhMdSIiWKIMBIGT52uwHglAFJ67MhchGKa dlHBpdqCEgbGNYE5hHmEUARce3ST9AQ8vOYOTk3rADZOs5NWoLIPOIFt9pWWZo1Ce3D1 Ki3kB75VNByM9ybC06/W+nU32yRncEFEMfJq1rLbmrlcEoa4PBTRDunVjK94EQIuReQk kgbCZXlxcGbo3bjIy2qbUDhE8Dr1pmmdzqmczHxYQfLw5Sp/AO3aIHzTpCG5oE9q3Wnu GLmXHF77EtHBCgJmzuSHSjjwjN6+2xzpbkXvOwzZ9UiUjg+qehqnZc/ljaiCdP+IvVez LWcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TdJgPY8oxQj9R2RjFdGhuFgxqTEbkY4E24rRNyUJ1x0=; b=Iy1P9wt59PeAf53XhN6SN3TpS6oFkzFMf5lN63RCCfKiCeh8uHKgerqUkyMJqRey3i SEtbWxlVVM2kmvqB7pQ66WtSGmb+75abI1xIB9elHnqYsnI86ZzlIMy414foO13EOhjQ kexgjR/MXAQLn5Sub2xjfJhr1FHu+14rWMjqzK+D8Ab/dMvNw0JQTkpV32WTCAtinHWj qs8aJEiN2jCehlfl8jTi+pVux2IqUyXlXmTT5WUwjz3rCUo9WwWnV5SabraiEFI+TGCH s4tFsqTVLU2Hr+ZWjLB4Qv+ryWGWuCF3sdxWoxG28vIZwUUXhqMNcV7UJgxcB6BS/zKN WfTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tpuO3ynQ; 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=pass (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 p5si14749357ilm.31.2021.06.21.09.51.08; Mon, 21 Jun 2021 09:51:19 -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=@linuxfoundation.org header.s=korg header.b=tpuO3ynQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232908AbhFUQwx (ORCPT + 99 others); Mon, 21 Jun 2021 12:52:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:37916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232254AbhFUQtF (ORCPT ); Mon, 21 Jun 2021 12:49:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3507161463; Mon, 21 Jun 2021 16:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293254; bh=nO/5Ne9fSc9iVoUhsDEATIjEcjgDkPyKt7rroixZULs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tpuO3ynQN+ARvoWV7McFWVl3zxcSE++ELUUxa9GhPNCfKXgE9Wzb8xVcEoDdKb1ix 4RXlgWyGrsaiSkhyMuJPFuz9R8C5/NVsHY4KD7nnUes8ZheWi+EGbYjpoPG1ODs05E EOSyXIP0YQSMGIJ7ZaKLjROM4YSI/9Q1+1Qwy0c0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg Subject: [PATCH 5.12 155/178] cfg80211: shut down interfaces on failed resume Date: Mon, 21 Jun 2021 18:16:09 +0200 Message-Id: <20210621154928.032405403@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg commit 65bec836da8394b1d56bdec2c478dcac21cf12a4 upstream. If resume fails, we should shut down all interfaces as the hardware is probably dead. This was/is already done now in mac80211, but we need to change that due to locking issues, so move it here and do it without the wiphy lock held. Cc: stable@vger.kernel.org Fixes: 2fe8ef106238 ("cfg80211: change netdev registration/unregistration semantics") Link: https://lore.kernel.org/r/20210608113226.d564ca69de7c.I2e3c3e5d410b72a4f63bade4fb075df041b3d92f@changeid Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/wireless/sysfs.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c @@ -133,6 +133,10 @@ static int wiphy_resume(struct device *d if (rdev->wiphy.registered && rdev->ops->resume) ret = rdev_resume(rdev); wiphy_unlock(&rdev->wiphy); + + if (ret) + cfg80211_shutdown_all_interfaces(&rdev->wiphy); + rtnl_unlock(); return ret;