Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9031380ybi; Tue, 23 Jul 2019 20:24:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWsTdPm/75gnaxZL9lHC1njnXk+TAflVTXXiwhHisYTxZqcscYl79ADdjX2fMWqWpdp/lr X-Received: by 2002:a17:902:2bc5:: with SMTP id l63mr86284104plb.30.1563938657839; Tue, 23 Jul 2019 20:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563938657; cv=none; d=google.com; s=arc-20160816; b=HNLd1HuamwWL5mzdsLz5yi+FV+Ku6e7ji/Odxxf4FnVcib5SsSIXfQKPsl70c5zE4y jTDLVNdFeiTJKh6dMzyTtkfp7ABtu6A5nFAkj1Po8s1Nn/tgQCSyufHWD1MRsTe1Z0DK RKTYz68geo2Lyljb1NvnvWFavohs1ugcehF6XnrO2Xva92SnJ6TdUJ+1FiXsdka1dwgP Gddk4UySFI9fK4pi9Plbvafy1vm9Z0lFfFn9x4EAX048z3oJEUPPH3VRywZ38FRhIxCB ip0YwQJOCV8HMoKQzjHb3I7F1PZidktEHF1ujRCUHjT1zcoFvAYiClz0UJ9DkAbLPyG/ 0lAw== 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=CP04MJx5LNIJHu3uY/4H6O/v8qoKk8OtMXdphWQ4LUw=; b=0sEO88MFGp59Is7rz9Sc2y+IuRgtHKlxD7fmqsG9JqhJsGEMZ5sOvg2fH3lbcpZc8s vZ10p/+h98wV4mHf976MoIUEVszWmJ3Rd1qLJEHbejHDsQifP0GSPJ+Nv9PXT/fb+XRw 1+I+/HBzmtvLjOuA8RV+ArzogKlnqFe08HEaNZIOkwmF0kiV3DeJCx1jDOTPM5nlwyH1 1/UYU+u8xanoiGU5PhrQv1qmuom88q9yicfu9tE/UJZuunayxWLUcuzN8PCHlLeUaUpV 83nX6XU+Ih7SSI0eFmEUDOdHOEx2R3+v5v0e/f2mC0agQvO9Xuw5WsGwC85t1JPB838k HtBg== 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 h63si12193284pje.79.2019.07.23.20.24.03; Tue, 23 Jul 2019 20:24:17 -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 S1726781AbfGXDVn (ORCPT + 99 others); Tue, 23 Jul 2019 23:21:43 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:50690 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726388AbfGXDU7 (ORCPT ); Tue, 23 Jul 2019 23:20:59 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8D98112D6EBEF9C25736; Wed, 24 Jul 2019 11:20:52 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Wed, 24 Jul 2019 11:20:43 +0800 From: Huazhong Tan To: CC: , , , , , Yufeng Mo , lipeng 00277521 , Huazhong Tan Subject: [PATCH net-next 05/11] net: hns3: change GFP flag during lock period Date: Wed, 24 Jul 2019 11:18:41 +0800 Message-ID: <1563938327-9865-6-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1563938327-9865-1-git-send-email-tanhuazhong@huawei.com> References: <1563938327-9865-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 a59d13f..f345095 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -5799,7 +5799,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