Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3943312pxj; Mon, 21 Jun 2021 09:53:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwFFuWE0atVjzc4rZGqPk1JNXXcPwhuMxIJhTpez2O6ckwIa2mcq6N1kL5xBmnRuw7Z8xE X-Received: by 2002:a17:906:2bd0:: with SMTP id n16mr25935096ejg.110.1624294428236; Mon, 21 Jun 2021 09:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294428; cv=none; d=google.com; s=arc-20160816; b=WiL/vS2SaSWqMxSKsWJlzEKRs9U7OH/fsCDQf+d4XAojg/M/7SHWSYniI5y31c73Kl v8qzBf7WYp0Xj2HvlsBVa2yFJoWnC7GT5717+2RTbNWMk0BG3HmOhRs61tGZE/WvsoUd RzGMG8WN8nm5BN2ykbfHQHnWVZtNNkvAriHrZiaXouw1Opz13371VgzZXyq5vSbVlU8I n0H2DRp/YXKFCrJ7Yr6jU56tzt5I8phvrdnFQnW+v6YNzKqiCfwQwSLGMsHkxMoAioWy 2HtWbIxCqacdG2PmPVPNrX7Jv90DvtwNZF9Ab5lBRT5uNK9wGill9XhAxQu473pBcLkJ jZkg== 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=0I+faP6HITA+RThjSO41ylcu06HsPUTaT4wMSWP9XTs=; b=jnV9vQk4yiU/lnQ1BFdUdEivRfrJ+C8OhMEiX9wtOnkm6csjr63MahEjGgd35DT3kG TtP/Cp3KE3Hm/cobAaJbdQxqZnjd30Ch5Ae6t7UIGMht5mxVXTVvqOelSkPBRS+LQ1RO GkGeiWvOILGvcLMqhmfQ7v46iVgH0N0Kmh2zFZpTT2fOcgytsGMAY+w9XzrT3rqK/jR0 0YJ14S8NysazIzWtAy3++umkRg5cv7q9rS6jGk9Qn3ppIYtp35nirnl1dcVqOhPRChz0 WqsixzUOzYx3eSe31p9ez19hTFKkvJjM35va5/D6z0qQev7/pK/CIbRtEV9xrQ07DYE3 25fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="VYS/TNgI"; 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 8si10664508ejq.15.2021.06.21.09.53.25; Mon, 21 Jun 2021 09:53:48 -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="VYS/TNgI"; 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 S233233AbhFUQwb (ORCPT + 99 others); Mon, 21 Jun 2021 12:52:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:37760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232878AbhFUQs0 (ORCPT ); Mon, 21 Jun 2021 12:48:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A760F61261; Mon, 21 Jun 2021 16:34:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293249; bh=5llupwawFWCcgtuCEhELqDzb0ymnrs9wODIqXwN9DbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VYS/TNgIe9/CwvDiddvwPGNQItLIRmmHj7S4NF2V1JeJJP5qmblTuqlPcvV5Z8WbT 7JdvM4w30UtuvwUeIo84o/Uu8W/YW63UfzEyCwmv2I1+BRS54K/gjQCA2p2Dpdkj6x RHBrwF4ULS/B/3CSL3CLDvMyYeCFQAuwDDN6JLcU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg Subject: [PATCH 5.12 153/178] mac80211: fix reset debugfs locking Date: Mon, 21 Jun 2021 18:16:07 +0200 Message-Id: <20210621154927.965366135@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 adaed1b9daf5a045be71e923e04b5069d2bee664 upstream. 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. Cc: stable@vger.kernel.org Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Link: https://lore.kernel.org/r/20210608113226.14020430e449.I78e19db0a55a8295a376e15ac4cf77dbb4c6fb51@changeid Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/mac80211/debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- 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 * 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;