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=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 16EC2C43603 for ; Wed, 11 Dec 2019 18:37:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DEE81206A5 for ; Wed, 11 Dec 2019 18:37:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576089462; bh=1gXvBUogE2AAfBihgg+EAwI3LDxBCsXa5+dajF/kmjg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:List-ID: From; b=2jLmasi8iouNvSUk5dBrVhO6bEwvv98vZn7rlTuzkz0pdMrD5e4R/g9DEj78qKm1K G8xeDsK9wCGdKompIvtOCCPBTHTttJzMoVKz7R9qRkn2a05ZwYHK0eUCURaC/PmK4R hasIHRcEELOarTvWoI/JTz4izX9nhoMKa6Sh25HY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729663AbfLKShl (ORCPT ); Wed, 11 Dec 2019 13:37:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:33568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728128AbfLKShl (ORCPT ); Wed, 11 Dec 2019 13:37:41 -0500 Received: from paulmck-ThinkPad-P72.home (unknown [199.201.64.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B79420836; Wed, 11 Dec 2019 18:37:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576089460; bh=1gXvBUogE2AAfBihgg+EAwI3LDxBCsXa5+dajF/kmjg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=hUmBWcOiez6O+QK8DycrGZ2NKd6Z3nHXV/0pJfua9Gta8moied6bv+yOJn7bQ1X6D 8fW9F20i/hua59a3OBG/PBntIQRbzkfqyaZejLwlyso3iA4FAq6g7K4AB/NXh4eBk9 WaEpX1g0e5s3Mko+AB+T+4cDjVmCzvR5FRAiAIJ0= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id B94B535203C6; Wed, 11 Dec 2019 10:37:38 -0800 (PST) Date: Wed, 11 Dec 2019 10:37:38 -0800 From: "Paul E. McKenney" To: "Martin K. Petersen" Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, Bart Van Assche , Christoph Hellwig , Hannes Reinecke , Johannes Thumshirn , Shane M Seymour , Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Roy Luo , Kalle Valo , "David S. Miller" , Matthias Brugger Subject: Re: [PATCH tip/core/rcu 01/12] rcu: Remove rcu_swap_protected() Message-ID: <20191211183738.GA5190@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20191210040714.GA2715@paulmck-ThinkPad-P72> <20191210040741.2943-1-paulmck@kernel.org> <20191211035122.GC2889@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191211035122.GC2889@paulmck-ThinkPad-P72> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 10, 2019 at 07:51:22PM -0800, Paul E. McKenney wrote: > On Tue, Dec 10, 2019 at 10:35:49PM -0500, Martin K. Petersen wrote: > > > > Paul, > > > > > Now that the calls to rcu_swap_protected() have been replaced by > > > rcu_replace_pointer(), this commit removes rcu_swap_protected(). > > > > It appears there are two callers remaining in Linus' master. Otherwise > > looks good to me. > > I did queue a fix for one of them, and thank you for calling my > attention to the new one. This commit should hit -next soon, so > hopefully this will discourage further additions. ;-) > > > Reviewed-by: Martin K. Petersen > > Thank you! And here is the patch for the new one. Thanx, Paul ------------------------------------------------------------------------ commit 10699d92c906707d679e28b099cd798a519b4f51 Author: Paul E. McKenney Date: Wed Dec 11 10:30:21 2019 -0800 wireless/mediatek: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds Reported-by: "Martin K. Petersen" Signed-off-by: Paul E. McKenney Cc: Felix Fietkau Cc: Lorenzo Bianconi Cc: Ryder Lee Cc: Roy Luo Cc: Kalle Valo Cc: "David S. Miller" Cc: Matthias Brugger Cc: Cc: Cc: Cc: diff --git a/drivers/net/wireless/mediatek/mt76/agg-rx.c b/drivers/net/wireless/mediatek/mt76/agg-rx.c index 53b5a4b..80986ce 100644 --- a/drivers/net/wireless/mediatek/mt76/agg-rx.c +++ b/drivers/net/wireless/mediatek/mt76/agg-rx.c @@ -281,8 +281,8 @@ void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno) { struct mt76_rx_tid *tid = NULL; - rcu_swap_protected(wcid->aggr[tidno], tid, - lockdep_is_held(&dev->mutex)); + tid = rcu_swap_protected(wcid->aggr[tidno], tid, + lockdep_is_held(&dev->mutex)); if (tid) { mt76_rx_aggr_shutdown(dev, tid); kfree_rcu(tid, rcu_head);