diff mbox series

[1/2] wifi: wilc1000: set atomic flag on kmemdup in srcu critical section

Message ID 20240410-wilc_srcu_to_rcu-v1-1-a9ff5b10feaa@bootlin.com
State New
Headers show
Series wifi: wilc1000: use RCU instead of SRCU | expand

Commit Message

Alexis Lothoré April 10, 2024, 7:10 a.m. UTC
In order to prepare wilc1000 driver switch from SRCU to RCU, make sure that
allocators are provided with the GFP_ATOMIC flag when called in a critical
read section.

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
 drivers/net/wireless/microchip/wilc1000/hif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo April 16, 2024, 3:31 p.m. UTC | #1
Alexis Lothoré <alexis.lothore@bootlin.com> wrote:

> In order to prepare wilc1000 driver switch from SRCU to RCU, make sure that
> allocators are provided with the GFP_ATOMIC flag when called in a critical
> read section.
> 
> Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>

2 patches applied to wireless-next.git, thanks.

35aee01ff43d wifi: wilc1000: set atomic flag on kmemdup in srcu critical section
f236464f1db7 wifi: wilc1000: convert list management to RCU
diff mbox series

Patch

diff --git a/drivers/net/wireless/microchip/wilc1000/hif.c b/drivers/net/wireless/microchip/wilc1000/hif.c
index f1085ccb7eed..3925ca653e80 100644
--- a/drivers/net/wireless/microchip/wilc1000/hif.c
+++ b/drivers/net/wireless/microchip/wilc1000/hif.c
@@ -1594,7 +1594,7 @@  void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length)
 	msg->body.net_info.rssi = buffer[8];
 	msg->body.net_info.mgmt = kmemdup(&buffer[9],
 					  msg->body.net_info.frame_len,
-					  GFP_KERNEL);
+					  GFP_ATOMIC);
 	if (!msg->body.net_info.mgmt) {
 		kfree(msg);
 		goto out;