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>
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);