All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Joel Fernandes (Google)" <joel@joelfernandes.org>
To: Alexander Aring <alex.aring@gmail.com>,
	Stefan Schmidt <stefan@datenfreihafen.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	David Girault <david.girault@qorvo.com>
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Alexander Aring <aahringo@redhat.com>,
	linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 12/14] mac802154: Rename kfree_rcu() to kvfree_rcu_mightsleep()
Date: Wed, 15 Mar 2023 18:18:59 +0000	[thread overview]
Message-ID: <20230315181902.4177819-12-joel@joelfernandes.org> (raw)
In-Reply-To: <20230315181902.4177819-1-joel@joelfernandes.org>

The k[v]free_rcu() macro's single-argument form is deprecated.
Therefore switch to the new k[v]free_rcu_mightsleep() variant. The goal
is to avoid accidental use of the single-argument forms, which can
introduce functionality bugs in atomic contexts and latency bugs in
non-atomic contexts.

The callers are holding a mutex so the context allows blocking. Hence
using the API with a single argument will be fine, but use its new name.

There is no functionality change with this patch.

Fixes: 57588c71177f ("mac802154: Handle passive scanning")
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
 net/mac802154/scan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac802154/scan.c b/net/mac802154/scan.c
index 9b0933a185eb..5c191bedd72c 100644
--- a/net/mac802154/scan.c
+++ b/net/mac802154/scan.c
@@ -52,7 +52,7 @@ static int mac802154_scan_cleanup_locked(struct ieee802154_local *local,
 	request = rcu_replace_pointer(local->scan_req, NULL, 1);
 	if (!request)
 		return 0;
-	kfree_rcu(request);
+	kvfree_rcu_mightsleep(request);
 
 	/* Advertize first, while we know the devices cannot be removed */
 	if (aborted)
@@ -403,7 +403,7 @@ int mac802154_stop_beacons_locked(struct ieee802154_local *local,
 	request = rcu_replace_pointer(local->beacon_req, NULL, 1);
 	if (!request)
 		return 0;
-	kfree_rcu(request);
+	kvfree_rcu_mightsleep(request);
 
 	nl802154_beaconing_done(wpan_dev);
 
-- 
2.40.0.rc1.284.g88254d51c5-goog


  parent reply	other threads:[~2023-03-15 18:20 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 18:18 [PATCH v2 01/14] drbd: Rename kvfree_rcu() to kvfree_rcu_mightsleep() Joel Fernandes (Google)
2023-03-15 18:18 ` [PATCH v2 02/14] misc: vmw_vmci: " Joel Fernandes (Google)
2023-03-16  6:50   ` Greg Kroah-Hartman
2023-03-16 15:21     ` Joel Fernandes
2023-03-15 18:18 ` [PATCH v2 03/14] tracing: " Joel Fernandes (Google)
2023-03-16  7:38   ` Daniel Bristot de Oliveira
2023-03-16 15:11     ` Joel Fernandes
2023-03-15 18:18 ` [PATCH v2 04/14] lib/test_vmalloc.c: " Joel Fernandes (Google)
2023-03-15 18:18 ` [PATCH v2 05/14] net/sysctl: " Joel Fernandes (Google)
2023-03-26 12:28   ` Joel Fernandes
2023-03-27 17:14     ` Jakub Kicinski
2023-03-30 15:43       ` Joel Fernandes
2023-03-15 18:18 ` [PATCH v2 06/14] net/mlx5: Rename kfree_rcu() to kfree_rcu_mightsleep() Joel Fernandes (Google)
2023-03-26 12:34   ` Joel Fernandes
2023-03-27 15:09     ` Saeed Mahameed
2023-03-15 18:18 ` [PATCH v2 07/14] ext4/super: " Joel Fernandes (Google)
2023-03-15 19:07   ` Theodore Ts'o
2023-03-16 15:23     ` Joel Fernandes
2023-03-15 18:18 ` [PATCH v2 08/14] rcuscale: " Joel Fernandes (Google)
2023-03-15 18:18 ` [PATCH v2 09/14] torture: Enable clocksource watchdog with "tsc=watchdog" Joel Fernandes (Google)
2023-03-15 18:18 ` [PATCH v2 10/14] rcutorture: Create nocb kthreads only when testing rcu in CONFIG_RCU_NOCB_CPU=y kernels Joel Fernandes (Google)
2023-03-15 18:18 ` [PATCH v2 11/14] rcu/kvfree: Eliminate k[v]free_rcu() single argument macro Joel Fernandes (Google)
2023-03-15 18:18 ` Joel Fernandes (Google) [this message]
2023-03-16 16:41   ` [PATCH v2 12/14] mac802154: Rename kfree_rcu() to kvfree_rcu_mightsleep() Stefan Schmidt
2023-03-16 18:06     ` Joel Fernandes
2023-03-15 18:19 ` [PATCH v2 13/14] RDMA/rxe: " Joel Fernandes (Google)
2023-03-15 18:38   ` Bob Pearson
2023-03-15 18:41     ` Joel Fernandes
2023-03-15 19:05       ` Bob Pearson
2023-03-15 19:59         ` Joel Fernandes
2023-03-15 18:19 ` [PATCH v2 14/14] checkpatch: Error out if deprecated RCU API used Joel Fernandes (Google)
2023-03-16  3:49   ` Paul E. McKenney
2023-03-26 12:27 ` [PATCH v2 01/14] drbd: Rename kvfree_rcu() to kvfree_rcu_mightsleep() Joel Fernandes
2023-03-27 19:26   ` Jens Axboe
2023-03-30 15:38     ` Joel Fernandes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230315181902.4177819-12-joel@joelfernandes.org \
    --to=joel@joelfernandes.org \
    --cc=aahringo@redhat.com \
    --cc=alex.aring@gmail.com \
    --cc=davem@davemloft.net \
    --cc=david.girault@qorvo.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=stefan@datenfreihafen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.