summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2026-06-02 18:46:10 +0300
committerSven Eckelmann <sven@narfation.org>2026-06-05 10:12:06 +0300
commited497f64a617b0ecdc751c57f296bb7dc4b435c4 (patch)
tree486711dd2d34aba55dd67c7627b71596ca4ba8d8
parentb2e44a67ef4fb9593ea60c8c27f637bdeab40f09 (diff)
downloadlinux-ed497f64a617b0ecdc751c57f296bb7dc4b435c4.tar.xz
batman-adv: use GFP_KERNEL allocations for the wifi detection cache
The batadv_wifi_net_device_insert() is called with ASSERT_RTNL() held, but not inside a spinlock or another context which prevents "might_sleep" functions. To relax the requirements for the allocator, use GFP_KERNEL. Signed-off-by: Sven Eckelmann <sven@narfation.org>
-rw-r--r--net/batman-adv/hard-interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 96b8130375a3..04b227ec8052 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -983,11 +983,11 @@ batadv_wifi_net_device_insert(struct net_device *net_dev, u32 wifi_flags)
ASSERT_RTNL();
- device_state = kzalloc_obj(*device_state, GFP_ATOMIC);
+ device_state = kzalloc_obj(*device_state, GFP_KERNEL);
if (!device_state)
return -ENOMEM;
- netdev_hold(net_dev, &device_state->dev_tracker, GFP_ATOMIC);
+ netdev_hold(net_dev, &device_state->dev_tracker, GFP_KERNEL);
device_state->netdev = net_dev;
WRITE_ONCE(device_state->wifi_flags, wifi_flags);