Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2872585ybi; Sun, 28 Jul 2019 19:58:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCm3S6rKnDZPctWfFcOq4GxWhwqKijhmzzDQdYiUVfEImJXqbKysLobOmQzVSRE+6VBQT0 X-Received: by 2002:a17:902:fe14:: with SMTP id g20mr101909125plj.54.1564369106476; Sun, 28 Jul 2019 19:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564369106; cv=none; d=google.com; s=arc-20160816; b=Hjj8Al0QbS7hFTa76uHShPoveCKgnr57mhzINU6i34gXpwkea3dmvUfLAtK20ft04M P3YzXX83I6lfFG896gmdy0a83qwIJsEDnpWTx8Msz0eCUahWRaFHRF56+g3KL8mgrkHy FV+HNeQgi+L0mObxTJfp+SuVl7LzHQwzr1YVAY6vvHZSgXKp6F2bRoFCvp7d9YJGNilG dF9ZSF7fOn/RX5iwexAp4OS7S7iNvhJjvNTh2GRbCZFqsZL69ApfCOrWelnCrUP1oLBp kMYjuW1om9krPX51zHvmLlIfRSCT1oTp2fqaSQbJY5r0+GczVkvrrucR36aTm1J0UWqT Lw+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=SeEdGTtHnDwgBip7tO4wDgYAAasUrf0VtjYoA6miFgU=; b=xnV0wnU5XNC58YEte979fdwryRREtpOts1fQbK7smXbquqrDXHZMnQ0t+7Dptlueld 6qw3vH8yrNLh+k/xjyucdMaEVkEe/z19hmkhggYSE8BJ8pieqNvg9VmyFAiLQRY1Mb4N do9LnVPABFyNjEpVWWi/UVQiaUFUY2xJ4swIxK2ZBM1Uf+xEhQaQsGqojGlNDmTmtRTD oYR+F6iN2MlEFKWwkEhqwN3D3HsuWsbEAX/gi6c9bJG+3JmHLLwIeBL3driB2j1OgA9/ zmtcW3u5sFpEhOovSMIzQB6PpPO4IyZtqKDwKH7JFqVCMvynLSXj8zdUGJmaCIFZd1fv m/DQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3si23516160plb.205.2019.07.28.19.58.11; Sun, 28 Jul 2019 19:58:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726633AbfG2Czk (ORCPT + 99 others); Sun, 28 Jul 2019 22:55:40 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:45358 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726302AbfG2Czj (ORCPT ); Sun, 28 Jul 2019 22:55:39 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 09DF31FC2DB48132A209; Mon, 29 Jul 2019 10:55:36 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Mon, 29 Jul 2019 10:55:29 +0800 From: Huazhong Tan To: CC: , , , , , , Yufeng Mo , lipeng 00277521 , Huazhong Tan Subject: [PATCH V4 net-next 04/10] net: hns3: change GFP flag during lock period Date: Mon, 29 Jul 2019 10:53:25 +0800 Message-ID: <1564368811-65492-5-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564368811-65492-1-git-send-email-tanhuazhong@huawei.com> References: <1564368811-65492-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yufeng Mo When allocating memory, the GFP_KERNEL cannot be used during the spin_lock period. This is because it may cause scheduling when holding spin_lock. This patch changes GFP flag to GFP_ATOMIC in this case. Fixes: dd74f815dd41 ("net: hns3: Add support for rule add/delete for flow director") Signed-off-by: Yufeng Mo Signed-off-by: lipeng 00277521 Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 3c64d70..14199c4 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -5796,7 +5796,7 @@ static int hclge_add_fd_entry_by_arfs(struct hnae3_handle *handle, u16 queue_id, return -ENOSPC; } - rule = kzalloc(sizeof(*rule), GFP_KERNEL); + rule = kzalloc(sizeof(*rule), GFP_ATOMIC); if (!rule) { spin_unlock_bh(&hdev->fd_rule_lock); -- 2.7.4