Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3943101pxj; Tue, 8 Jun 2021 02:33:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrolSCP216gv9S8nGRpd/PKr8V4CePZ9nKyi4lUva/Vm05GznH69T2m/Sq0IX8wedh2HKu X-Received: by 2002:a05:6402:b11:: with SMTP id bm17mr24398868edb.109.1623144818245; Tue, 08 Jun 2021 02:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623144818; cv=none; d=google.com; s=arc-20160816; b=ry7qgKgkwc29PJsGlB3rOXQe8U4fAPpe0phdbDthTQ7xQA9x+y7/yWy4fQ7aRSnKXn 1rpGbTX1N4PUyHMz9IztT2mGGlAFVQOT9P8LbIph0rgLI1Z1TFh6FpQaggFqRuNwljld OFgh6OnEHvvFyuwu+JneNRewG76bzDQ6HwkVYLWECePO7wK3QUF8RDMQB16YYYMl7mMV TsTR9ZyQ2jz/Xpw1cW+zfSpWSlnUm2nt0dsZJ92xcGtdMFRa0IhuIsrEPU2/EZSYVZlH Ql2qTU6vHTi/D4U1XhbM/9pYVtWsl4IB0q5dDwdZDAT84tnyxUAwrgr+IX/rvAo9Oa0C k5Jg== 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 :message-id:date:subject:cc:to:from; bh=VrRe7IKmh38rzJhEfJNrDzC8dyAU2AC+MzCGNDbiA24=; b=LRF1b0SPBuo+sH7qrj5rq+SMlmmUI4aVeZwHCAqTIXPZr+Jf+xPbO204bzBG4qpMSS OlEIXAIWnH6ZrQi88khPe68C50VH8RS7thp6JSUk+vB2Dmh0p6TyvuhJs9pyQscoLDdv vCqHYf8rL4DA0K4RWdBfsmAjLoGlBmKG3lmHph9597caEJITEjZj/rjdxZWJPjHjBsgD bKVi7nWORG7aBohlTHVWwIas377a6Z1KSElsXSorDuO1lcQxgcldTaOn3IyQOmfSxlVe +iNno9PW6qE5hs+uAHKKTLWqaT6vlMVdUpFoxw5ospUwLolmhn85gdw3PfKbjPVKbF81 9IYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n5si15188840edr.505.2021.06.08.02.33.10; Tue, 08 Jun 2021 02:33:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230520AbhFHJe3 (ORCPT + 99 others); Tue, 8 Jun 2021 05:34:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhFHJe3 (ORCPT ); Tue, 8 Jun 2021 05:34:29 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CACEC061787 for ; Tue, 8 Jun 2021 02:32:36 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1lqY65-003gsH-RM; Tue, 08 Jun 2021 11:32:33 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 1/4] mac80211: fix 'reset' debugfs locking Date: Tue, 8 Jun 2021 11:32:27 +0200 Message-Id: <20210608113226.14020430e449.I78e19db0a55a8295a376e15ac4cf77dbb4c6fb51@changeid> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg cfg80211 now calls suspend/resume with the wiphy lock held, and while there's a problem with that needing to be fixed, we should do the same in debugfs. Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Signed-off-by: Johannes Berg --- net/mac80211/debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 9245c0421bda..b5ff61b6448a 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c @@ -4,7 +4,7 @@ * * Copyright 2007 Johannes Berg * Copyright 2013-2014 Intel Mobile Communications GmbH - * Copyright (C) 2018 - 2019 Intel Corporation + * Copyright (C) 2018 - 2019, 2021 Intel Corporation */ #include @@ -389,8 +389,10 @@ static ssize_t reset_write(struct file *file, const char __user *user_buf, struct ieee80211_local *local = file->private_data; rtnl_lock(); + wiphy_lock(local->hw.wiphy); __ieee80211_suspend(&local->hw, NULL); __ieee80211_resume(&local->hw); + wiphy_unlock(local->hw.wiphy); rtnl_unlock(); return count; -- 2.31.1