Message ID | 20220516193614.963992242@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05AA0C433F5 for <stable@archiver.kernel.org>; Mon, 16 May 2022 19:47:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345904AbiEPTry (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 16 May 2022 15:47:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346107AbiEPTpw (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 16 May 2022 15:45:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 977013F884; Mon, 16 May 2022 12:43:17 -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 ams.source.kernel.org (Postfix) with ESMTPS id 4C21CB81616; Mon, 16 May 2022 19:43:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D409C385AA; Mon, 16 May 2022 19:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652730194; bh=C3qRh3O7j80V8NskUV4RSWEG9R9RkIc5taM0ld4ydt4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KjH06WOA2Zx9MNCeY7gsMEtIC1FY7wLqc/Ngw6CjiShFXS+X7ICaxtDHERVZJgCXv uGxWJ+6ROL2EUb67n3QkyPBBzowexaSeE1QO7yFN7h7+RdblZIZ+IeS4/xg/Dp6NTw xb/+uYmyAZywe3o4iwS0K09r1kM6BLrcxrKjwbjE= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 5.4 08/43] mac80211_hwsim: call ieee80211_tx_prepare_skb under RCU protection Date: Mon, 16 May 2022 21:36:19 +0200 Message-Id: <20220516193614.963992242@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220516193614.714657361@linuxfoundation.org> References: <20220516193614.714657361@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: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 6e1721d53384..ffe27104f654 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -2062,11 +2062,13 @@ static void hw_scan_work(struct work_struct *work) if (req->ie_len) skb_put_data(probe, req->ie, req->ie_len); + rcu_read_lock(); if (!ieee80211_tx_prepare_skb(hwsim->hw, hwsim->hw_scan_vif, probe, hwsim->tmp_chan->band, NULL)) { + rcu_read_unlock(); kfree_skb(probe); continue; } @@ -2074,6 +2076,7 @@ static void hw_scan_work(struct work_struct *work) local_bh_disable(); mac80211_hwsim_tx_frame(hwsim->hw, probe, hwsim->tmp_chan); + rcu_read_unlock(); local_bh_enable(); } }