From d5a7ee66e0241248b240d1d1afbdacfaa1310832 Mon Sep 17 00:00:00 2001 From: Sai Chaitanya Kaveti Date: Fri, 25 Feb 2022 16:37:17 +0530 Subject: [PATCH] msm: mhi_dev: Changing the GFP flag in alloc_skb() GFP_ATOMIC flag is typically used in memory allocations inside interrupt handlers or with spin locks. It is of high priority but it does not allow the caller to reclaim the memory allocation request. This may lead to memory allocation failures in low memory situations. Since alloc_skb() is not called from interrupt handler or in spin lock context, changing the GFP flag from GFP_ATOMIC to GFP_KERNEL. Change-Id: I6c3a2b5b4674965cf1d4860e9072fa46cd4adddb Signed-off-by: Sai Chaitanya Kaveti --- drivers/platform/msm/mhi_dev/mhi_dev_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/msm/mhi_dev/mhi_dev_net.c b/drivers/platform/msm/mhi_dev/mhi_dev_net.c index 08bf7f995f8f..c4b9d6972e33 100644 --- a/drivers/platform/msm/mhi_dev/mhi_dev_net.c +++ b/drivers/platform/msm/mhi_dev/mhi_dev_net.c @@ -279,7 +279,7 @@ static ssize_t mhi_dev_net_client_read(struct mhi_dev_net_client *mhi_handle) struct mhi_req, list); list_del_init(&req->list); spin_unlock_irqrestore(&mhi_handle->rd_lock, flags); - skb = alloc_skb(MHI_NET_DEFAULT_MTU, GFP_ATOMIC); + skb = alloc_skb(MHI_NET_DEFAULT_MTU, GFP_KERNEL); if (skb == NULL) { pr_err("%s(): skb alloc failed\n", __func__); spin_lock_irqsave(&mhi_handle->rd_lock, flags);