mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next] net: wwan: t7xx: fix GFP_KERNEL usage in spin_lock context
@ 2022-05-14  9:14 Ziyang Xuan
  2022-05-16 20:36 ` Sergey Ryazanov
  0 siblings, 1 reply; 4+ messages in thread
From: Ziyang Xuan @ 2022-05-14  9:14 UTC (permalink / raw)
  To: chandrashekar.devegowda, linuxwwan, chiranjeevi.rapolu,
	haijun.liu, m.chetan.kumar, ricardo.martinez, loic.poulain,
	ryazanov.s.a, davem, edumazet, kuba, pabeni, netdev
  Cc: linux-kernel

t7xx_cldma_clear_rxq() call t7xx_cldma_alloc_and_map_skb() in spin_lock
context, But __dev_alloc_skb() in t7xx_cldma_alloc_and_map_skb() uses
GFP_KERNEL, that will introduce scheduling factor in spin_lock context.

Replace GFP_KERNEL with GFP_ATOMIC to fix it.

Fixes: 39d439047f1d ("net: wwan: t7xx: Add control DMA interface")
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
---
 drivers/net/wwan/t7xx/t7xx_hif_cldma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wwan/t7xx/t7xx_hif_cldma.c b/drivers/net/wwan/t7xx/t7xx_hif_cldma.c
index 46066dcd2607..54c34639f1a5 100644
--- a/drivers/net/wwan/t7xx/t7xx_hif_cldma.c
+++ b/drivers/net/wwan/t7xx/t7xx_hif_cldma.c
@@ -93,7 +93,7 @@ static void t7xx_cldma_gpd_set_next_ptr(struct cldma_gpd *gpd, dma_addr_t next_p
 static int t7xx_cldma_alloc_and_map_skb(struct cldma_ctrl *md_ctrl, struct cldma_request *req,
 					size_t size)
 {
-	req->skb = __dev_alloc_skb(size, GFP_KERNEL);
+	req->skb = __dev_alloc_skb(size, GFP_ATOMIC);
 	if (!req->skb)
 		return -ENOMEM;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-17  3:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-14  9:14 [PATCH net-next] net: wwan: t7xx: fix GFP_KERNEL usage in spin_lock context Ziyang Xuan
2022-05-16 20:36 ` Sergey Ryazanov
2022-05-16 20:57   ` Martinez, Ricardo
2022-05-17  3:12     ` Ziyang Xuan (William)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®