Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp592174pxb; Tue, 15 Feb 2022 23:07:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlFA+mrMlw2+9e3jfmI6fo6yt6VzUUIt3pUEy0LpHPDEvrEx0OYB44BSiMLlA07sOWvyL0 X-Received: by 2002:a17:90a:d786:b0:1b8:bd2a:d804 with SMTP id z6-20020a17090ad78600b001b8bd2ad804mr200030pju.245.1644995266540; Tue, 15 Feb 2022 23:07:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644995266; cv=none; d=google.com; s=arc-20160816; b=eer0Itj7154yHIbbsaUBPLLttJeuvnFjr3dCtB5r/xuKvVml4/hiPFDN7dnN/25eqj c1Is7UUDZtjmzzyr6amVvKOA1L2Zo+BXGsPfe3zcWR6MxYCx1vBDau+J52CbbQCPV3Sd RfPywOemjy6229PCIDS5miqhub6sVEA4LBo7x4Nrt7VCS+rAOXsqJa+NiBIkM3z215+Q +xmDQJCdfj41Ow0bZHin+QzJWJoDHmFZqbEgn25i58WEC92wbIuwz3OiB+lW3O5a46Nh C1gBjyavpJbPFMqCF2Y0rwmK022fS/Of4E96ErPXJKtitFch8N3QsGa/Xv7kXng7nsLL gWOQ== 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:date:cc:to:from:subject :message-id:dkim-signature; bh=KX0QaNd9nQ/9W6qY2LjL6AlOUaIrBsPYpTiS++NbNnE=; b=c5x6I8S43rD+kCJZDv0eXhyM/7GCvtmnHaBK20fN5bq0E/xyrYjJ05DjNdxzp3d5Yk fhqAVqDZYFLOItq9aHihRD3UVE+4oyzDfPDEVkDfKOIOqMKtaB61414Xp4bo4gwxGuRp L0/rxydujTnXR9nUmfvpFpQHb6Bbq7phmJfSzujbtuGl+/H1ynWl160A2HOvYVTdVc+s Jk9H8E3tA2ftZPMlDC/UOKZeqA2YSpBQHujB1cx+bJyu/7SqMDbzoYGPVB3Ycb0RkYWm IVqSMLkoaoX/Ey4fb8WP2nC/WmcY+oejr+bwpq+HHVhU+2B1NAGVRjGiNziUNna9Ta5K yt1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=lwsCfGoJ; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m5si5071636pgr.588.2022.02.15.23.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 23:07:46 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=lwsCfGoJ; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D9E4225BD6D; Tue, 15 Feb 2022 22:44:49 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240970AbiBOPuv (ORCPT + 72 others); Tue, 15 Feb 2022 10:50:51 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240760AbiBOPuq (ORCPT ); Tue, 15 Feb 2022 10:50:46 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35D20241; Tue, 15 Feb 2022 07:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=KX0QaNd9nQ/9W6qY2LjL6AlOUaIrBsPYpTiS++NbNnE=; t=1644940236; x=1646149836; b=lwsCfGoJ6pms0JlWAcH2wGj+eDxDbC4ZX8IfCvSyFfzmOT3 bbyLy9yULhjPdxdluYKQb1uM9A3Jms1eg4m6ergXU/WHZvYbz0oe+U9+Fk4Zv9F8AOOJkrNYI32Ik r6+wM+aD5COWK30s72pmlixL544J0lH4xYaZKbj5nLVHiqNCBnZNH6m3MT9x+7sBa3pQehr9tldQ8 Y5Up38syxUnLCdSBZHnwk4jnc267TaOdxF/3zmDgdjxukMyS1lecQ4LzfCyQh7YFbdbilg0m79zhP Witl4bdziLetltIGNU+ZoVxpIYMAO5ngEzs+2GqmH+mEX9kisLOMSk81G6xUBNmg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nK065-001ToU-Sr; Tue, 15 Feb 2022 16:50:33 +0100 Message-ID: Subject: Re: [PATCH] mac80211: fix RCU usage in ieee80211_tx_h_select_key() From: Johannes Berg To: Jiri Kosina Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 15 Feb 2022 16:50:33 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.3 (3.42.3-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned 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,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 > > ieee80211_tx_h_select_key() is performing a series of RCU dereferences, > but none of the callers seems to be taking RCU read-side lock; let's > acquire the lock in ieee80211_tx_h_select_key() itself. > but but ... > ieee80211_tx_dequeue+0x1a7/0x1260 [mac80211 911c23e2351c0ae60b597a67b1204a5ea955e365] > rtw89_core_txq_work+0x1a6/0x420 [rtw89_core b39ba493f2e517ad75e0f8187ecc24edf58bbbea] /** * ieee80211_tx_dequeue - dequeue a packet from a software tx queue * * @hw: pointer as obtained from ieee80211_alloc_hw() * @txq: pointer obtained from station or virtual interface, or from * ieee80211_next_txq() * * Returns the skb if successful, %NULL if no frame was available. * * Note that this must be called in an rcu_read_lock() critical section, * which can only be released after the SKB was handled. Some pointers in [...] -> driver bug? johannes