Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2334186pxb; Fri, 25 Mar 2022 15:45:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVbF8cfs9zm2AXflQUG0pfNiFcjhfWXP40BqAx9zkcaGZz4JoyiRtLlO73IBhHwVvhFrlt X-Received: by 2002:aa7:8215:0:b0:4f7:125a:c88c with SMTP id k21-20020aa78215000000b004f7125ac88cmr12533837pfi.70.1648248339632; Fri, 25 Mar 2022 15:45:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648248339; cv=none; d=google.com; s=arc-20160816; b=VHacjJ/37/1ZS496pYPt1aodhKde0/hvO6R7Glt1HxSdStagVAnWLm9FQoU9Wb04bv KBAoTLXCXpSPtB1xe6QrXhNQ1uGn+D0NAxbbl3L9WSwbKJyZLg+6S7aiHsQ426MJaxBe 1RxumIaxi3/gVqItkWX3YwZ+T/clNzOfhd8+DCzRO0w3x6LePpNj+4apLB2D5r0bkRw7 Wj0zD2BPE/EhgR73HMOEps3lTByFiKQwGD8/ACi9LJv87jLf9KgJvDPbcSPFV5oIE96d gyV8Ocv7Qya1OdpbOo0aRbjK0MlmZRHOk4botGALyKSkSCTtMNnQUvGHxImTLp+7/IiD 3w+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=9jYjx+4jeXCmvNIm9diCTLqf2spnMxHz/9y78hPvvBQ=; b=pyHQUrUANCaFxWNQSUU486aY/pzkRwXY9ZHRh/dG8qj5iAQEz0X3nPqwQdQTUBq0kz Xp77duhoanPSm2x09n69RTWLo1kCY9B2nhBT7tYbLDC5I7V/82zVBAvVxjWuGVRz/3eB gg7glTh3tM4HukyV3LS3N8GrDlnIzGamDVwlUslCbujj6LCD2Zx9tOImaLP7AjSoLijT rVCs28qDoeEWMrDc1OXeEjao36GD52/i+Mpr6frNBMIMqwn60ZTn2zgdvvpafFZ9zANa GwzdPwllPPqQ5hbYEVHtTuBVymcJYDSLAunzHKNhxXDDkcGOPUKI4ci26uwjRg5tsOq3 UGIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="Yk/zxMdg"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id pf3-20020a17090b1d8300b001bd14e01fbesi7731406pjb.172.2022.03.25.15.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 15:45:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="Yk/zxMdg"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 371A316BCF7; Fri, 25 Mar 2022 15:18:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233690AbiCYWTs (ORCPT + 70 others); Fri, 25 Mar 2022 18:19:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233603AbiCYWTr (ORCPT ); Fri, 25 Mar 2022 18:19:47 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12A6816AA6A; Fri, 25 Mar 2022 15:18:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1648246693; x=1679782693; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=9jYjx+4jeXCmvNIm9diCTLqf2spnMxHz/9y78hPvvBQ=; b=Yk/zxMdglai/5OZ8UFe7yPyyVRs8dAHlgseQ+zq8o8bULUZ0rcTOimj7 XDKEd3pSlyUv48fxqnarSzSlxHxmz9eO9fqdkel0WunEIgD8g4cg2YCD6 N5fJxw2BsHLhi/+rnI/7ev5qxUa07zER6LYgKlByWXzSZI9qh8QzNNjaw Q=; Received: from ironmsg07-lv.qualcomm.com ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 25 Mar 2022 15:18:13 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg07-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2022 15:18:12 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 25 Mar 2022 15:18:11 -0700 Received: from [10.110.27.134] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 25 Mar 2022 15:18:10 -0700 Message-ID: <487e4136-94dc-5a77-89c7-e416a05c3a35@quicinc.com> Date: Fri, 25 Mar 2022 15:18:10 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [BUG] deadlock in nl80211_vendor_cmd Content-Language: en-US To: Johannes Berg , William McVicker CC: Jakub Kicinski , , "Marek Szyprowski" , Kalle Valo , "David S. Miller" , , "Amitkumar Karwar" , Ganapathi Bhat , Xinming Hu , , Paolo Abeni References: <0000000000009e9b7105da6d1779@google.com> <99eda6d1dad3ff49435b74e539488091642b10a8.camel@sipsolutions.net> <5d5cf050-7de0-7bad-2407-276970222635@quicinc.com> <19e12e6b5f04ba9e5b192001fbe31a3fc47d380a.camel@sipsolutions.net> <20220325094952.10c46350@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <976e8cf697c7e5bc3a752e758a484b69a058710a.camel@sipsolutions.net> From: Jeff Johnson In-Reply-To: <976e8cf697c7e5bc3a752e758a484b69a058710a.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 3/25/2022 2:16 PM, Johannes Berg wrote: > On Fri, 2022-03-25 at 20:36 +0000, William McVicker wrote: >> >> I found that my wlan driver is using the vendor commands to create/delete NAN >> interfaces for this Android feature called Wi-Fi aware [1]. Basically, this >> features allows users to discover other nearby devices and allows them to >> connect directly with one another over a local network. >> > > Wait, why is it doing that? We actually support a NAN interface type > upstream :) It's not really quite fully fleshed out, but it could be? > Probably should be? And this is the issue with Android drivers. Android team proposes changes to the Wifi HAL and driver vendors have to implement those quickly to meet product deadlines. Some infrastructure changes we're able to get into the core kernel without having an in-tree driver that uses them (such as introducing NL80211_IFTYPE_NAN), but there have been instances of core kernel changes being rejected because there was not an in-tree user. Yes, in your ideal world all of the Android wifi drivers would be in-tree. And in that ideal world every release cycle the Android team would advocate for core kernel changes needed to support the new features of the HAL. But past history has shown attempts to upstream new features has been delayed, perhaps in part due to the absence of an in-tree driver that utilizes those features, and the only way to meet product deadlines is to take the vendor command route. And yes my out-of-tree driver is facing the exact same issue with NAN interface creation and deletion via vendor commands. Previously you had suggested: > Your easiest option might be to just patch NL80211_FLAG_NEED_RTNL into > your kernel for vendor commands and call it a day? Would you consider taking that upstream given that there are very few in-tree users of vendor commands, and I fear Will and I aren't the only ones who'll face this issue? Will, suggest you at least advocate for getting this into the 5.15 ACK. /jeff