Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2406598pxb; Fri, 25 Mar 2022 17:27:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/ce3EDHSVIRV+cR4pV9RAG3fjr2l6OMjWmoFc2f6oCYSgtAMF+ylUkyaGf3MlmtJdQiVL X-Received: by 2002:aa7:8385:0:b0:4f6:ef47:e943 with SMTP id u5-20020aa78385000000b004f6ef47e943mr12509538pfm.38.1648254462057; Fri, 25 Mar 2022 17:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648254462; cv=none; d=google.com; s=arc-20160816; b=iFfq5k+oU3ZvADNZkgja/Q/QGJQPF2/nl1884iy0eWF0JOBHOg8nye6JrokeaFsHSk 1sthRhhaVPZyoSs7APqoS3nVaYUbeWoquEYepO/HQhkGD94vwP6DND1WUBAJUWr6RSVY kw9+9xm1V7U7Xi/MRuy3Q+0Kc/qpIr/PkNymWiBoy+i3jSXOOQrLmxc6e9xM6g4PjphA 1qWcbCJJRTfF5+xu5hvbLNzNpVVwx1RWjTvV/luYY0ffl5PkYKLH4maw8mLiuYfy+Zq2 fAQ9VRakEJg3cjmEl5XZp2RWQmPeoNZgP5kRV00Fm5iEqLhm5axMShqPM0KlJLQFdanf WQnw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=tT77U/2pd2gFom3oKJhn7P+rDvfzSBxcwAA+3OIDXSE=; b=B7n/mYP7gTbybmPEK01HBm8Xt9DKFnpWnJjxrtK0S895FEcc3LFakptkD0qy7NM8JB S1qF4O8+nT41ujpWDeDjN987ULoH0RI4WPoDyU4nxCqBQuhQyMMrCeiAVGoFNlganY20 Oif9DWNt8DZ9eyTBUyc++Z5//JgWG/rTR0bvkPO+Vcl1E1NrP7X5U9bL26IAWV6vfNGf qIq6bQUEX717CE9yz39rtFeUdP1Wc9nVe0pHaoUI6OA8xDqsm1AStrbYCwTKwouI9VXo X2YpfIs8LMAKVL0qfpdmPWey0yPZb7Sg5xTLY4bHTa3G3VPFJJqhm8pOMRSfuIg9Dtpe jC7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KhYh1XSz; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w18-20020a63c112000000b0038265eb30cfsi3546760pgf.879.2022.03.25.17.27.31; Fri, 25 Mar 2022 17:27:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KhYh1XSz; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229985AbiCZAJW (ORCPT + 70 others); Fri, 25 Mar 2022 20:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbiCZAIu (ORCPT ); Fri, 25 Mar 2022 20:08:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BA813A71A; Fri, 25 Mar 2022 17:07:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AA6D061811; Sat, 26 Mar 2022 00:07:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 830BFC004DD; Sat, 26 Mar 2022 00:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648253234; bh=r8o9J8nfd9zoplXKjH+VNY9tM59LRhY5cImmkN7hXQE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KhYh1XSzMHuNNU26yhhilFLXwxkcq7OMmlYWYGPTDJYKlt+fjwu7LKHLgRL/NPwUF RMEu2s4CeSOU4e7p49i6deinKoocXF/TBuNJbNJHCbNx0tNZQqmSYgkykAHtFN656H +y3jX0NMOhCJfBCvAJH++c4HFFL9lBOQz0ExGTsiJKK5sTeVOjxGmdT3FQWxsgHNY8 kJbJygSG4/TqRvmptFD4PtCMGZGR19uLt57zAOCr0h2X2m7RjAoJd+7UC3qsd+QN+q 35MTbG7zA53Wzg+A1GBhWEXC46Ap92BD3jaY6Pxa5DlbpV5yA9HSL7fk+V1aJb+7Tz rlCtGnB1K4ngA== Date: Fri, 25 Mar 2022 17:07:12 -0700 From: Jakub Kicinski To: William McVicker Cc: Johannes Berg , linux-wireless@vger.kernel.org, Marek Szyprowski , Kalle Valo , "David S. Miller" , netdev@vger.kernel.org, Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , kernel-team@android.com, Paolo Abeni Subject: Re: [BUG] deadlock in nl80211_vendor_cmd Message-ID: <20220325170712.69c2c8d3@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <5d5cf050-7de0-7bad-2407-276970222635@quicinc.com> <19e12e6b5f04ba9e5b192001fbe31a3fc47d380a.camel@sipsolutions.net> <20220325094952.10c46350@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <976e8cf697c7e5bc3a752e758a484b69a058710a.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 25 Mar 2022 23:57:33 +0000 William McVicker wrote: > Instead of open coding it, we could just pass the internal_flags via struct > genl_info to nl80211_vendor_cmds() and then handle the rtnl_unlock() there if > the vendor command doesn't request it. I included the patch below in case > there's any chance you would consider this for upstream. This would at least > add backwards compatibility to the vendor ops API so that existing drivers that > depend on the RTNL being held don't need to be fully refactored. Sorry to step in, Johannes may be AFK already. There's no asterisk next to the "we don't cater to out of tree code" rule, AFAIK. We change locking often, making a precedent like this would be ill-advised.