From patchwork Sat May 14 09:14:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ziyang Xuan (William)" X-Patchwork-Id: 12849738 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B86FCC433EF for ; Sat, 14 May 2022 08:57:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230333AbiENI5J (ORCPT ); Sat, 14 May 2022 04:57:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231134AbiENI5I (ORCPT ); Sat, 14 May 2022 04:57:08 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 662443FDB1; Sat, 14 May 2022 01:57:06 -0700 (PDT) Received: from canpemm500006.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4L0fWj2gPhzgYhd; Sat, 14 May 2022 16:56:33 +0800 (CST) Received: from container.huawei.com (10.175.104.82) by canpemm500006.china.huawei.com (7.192.105.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 14 May 2022 16:57:04 +0800 From: Ziyang Xuan To: , , , , , , , , , , , , CC: Subject: [PATCH net-next] net: wwan: t7xx: fix GFP_KERNEL usage in spin_lock context Date: Sat, 14 May 2022 17:14:43 +0800 Message-ID: <20220514091443.4150162-1-william.xuanziyang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.104.82] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500006.china.huawei.com (7.192.105.130) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org 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 --- 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;