From: Huazhong Tan <tanhuazhong@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
<linuxarm@huawei.com>, <saeedm@mellanox.com>,
Yufeng Mo <moyufeng@huawei.com>,
lipeng 00277521 <lipeng321@huawei.com>,
Huazhong Tan <tanhuazhong@huawei.com>
Subject: [PATCH V3 net-next 04/10] net: hns3: change GFP flag during lock period
Date: Sat, 27 Jul 2019 13:46:06 +0800 [thread overview]
Message-ID: <1564206372-42467-5-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1564206372-42467-1-git-send-email-tanhuazhong@huawei.com>
From: Yufeng Mo <moyufeng@huawei.com>
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 <moyufeng@huawei.com>
Signed-off-by: lipeng 00277521 <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
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
next prev parent reply other threads:[~2019-07-27 5:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-27 5:46 [PATCH V3 net-next 00/10] net: hns3: some code optimizations & bugfixes & features Huazhong Tan
2019-07-27 5:46 ` [PATCH V3 net-next 01/10] net: hns3: add reset checking before set channels Huazhong Tan
2019-07-27 5:46 ` [PATCH V3 net-next 02/10] net: hns3: add a check for get_reset_level Huazhong Tan
2019-07-27 5:46 ` [PATCH V3 net-next 03/10] net: hns3: remove upgrade reset level when reset fail Huazhong Tan
2019-07-27 5:46 ` Huazhong Tan [this message]
2019-07-27 5:46 ` [PATCH V3 net-next 05/10] net: hns3: modify firmware version display format Huazhong Tan
2019-07-27 5:46 ` [PATCH V3 net-next 06/10] net: hns3: add debug messages to identify eth down cause Huazhong Tan
2019-07-28 2:03 ` David Miller
2019-07-29 1:21 ` tanhuazhong
2019-07-27 5:46 ` [PATCH V3 net-next 07/10] net: hns3: make hclge_service use delayed workqueue Huazhong Tan
2019-07-27 5:46 ` [PATCH V3 net-next 08/10] net: hns3: add interrupt affinity support for misc interrupt Huazhong Tan
2019-07-27 5:46 ` [PATCH V3 net-next 09/10] net: hns3: Add support for using order 1 pages with a 4K buffer Huazhong Tan
2019-07-27 5:46 ` [PATCH V3 net-next 10/10] net: hns3: use dev_info() instead of pr_info() Huazhong Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1564206372-42467-5-git-send-email-tanhuazhong@huawei.com \
--to=tanhuazhong@huawei.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lipeng321@huawei.com \
--cc=moyufeng@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=salil.mehta@huawei.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox