From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B157C433DB for ; Tue, 26 Jan 2021 11:21:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65A5A23104 for ; Tue, 26 Jan 2021 11:21:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404252AbhAZLVe (ORCPT ); Tue, 26 Jan 2021 06:21:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:40916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392194AbhAZLVT (ORCPT ); Tue, 26 Jan 2021 06:21:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7039022795; Tue, 26 Jan 2021 11:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611660038; bh=cxRRKLvkAzn2aBTFkAN9CJZ7uMjLsyIWHcwe3vNgWns=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mboS0X9Ca6iVq9Fp7TWZryUk0WK0mCud4u2Gn2bvqyR8Tg60493cnPLHqJT/TsstQ HZyG+oSPHSEEjGphSBg+68LZYU3EAVpHn9G0VK3ysj0M5aTo0FwwohhObGsu9dziND Vh0cTQuEWEIoc1sgAGgYrvOXRqnBzT0RahtGfg1E= Date: Tue, 26 Jan 2021 12:20:36 +0100 From: Greg Kroah-Hartman To: Johannes Berg Cc: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, ilan.peer@intel.com, Johannes Berg , Hans de Goede Subject: Re: [PATCH] staging: rtl8723bs: fix wireless regulatory API misuse Message-ID: References: <20210126115409.d5fd6f8fe042.Ib5823a6feb2e2aa01ca1a565d2505367f38ad246@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210126115409.d5fd6f8fe042.Ib5823a6feb2e2aa01ca1a565d2505367f38ad246@changeid> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jan 26, 2021 at 11:54:09AM +0100, Johannes Berg wrote: > From: Johannes Berg > > This code ends up calling wiphy_apply_custom_regulatory(), for which > we document that it should be called before wiphy_register(). This > driver doesn't do that, but calls it from ndo_open() with the RTNL > held, which caused deadlocks. > > Since the driver just registers static regdomain data and then the > notifier applies the channel changes if any, there's no reason for > it to call this in ndo_open(), move it earlier to fix the deadlock. > > Reported-and-tested-by: Hans de Goede > Fixes: 51d62f2f2c50 ("cfg80211: Save the regulatory domain with a lock") > Signed-off-by: Johannes Berg > --- > Greg, can you take this for 5.11 please? Or if you prefer, since the > patch that exposed this and broke the driver went through my tree, I > can take it as well. Please feel free to take it through yours, as I don't think I'll have any more staging patches for 5.11-final (or none have been sent to me yet), so this might be the fastest way in: Acked-by: Greg Kroah-Hartman