提交 f1323258 编写于 作者: Y Yufeng Mo 提交者: Xie XiuQi

net: hns3: change GFP flag during lock period

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

When applying for a memory, the GFP_KERNEL cannot be used during
the lock period. This is because it may cause system hibernation.
This patch changes GFP flag to GFP_ATOMIC in this case.

Feature or Bugfix:Bugfix
Reviewed-by: Nlipeng <lipeng321@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 68e3fff2
...@@ -6055,7 +6055,7 @@ static int hclge_add_fd_entry_by_arfs(struct hnae3_handle *h, u16 queue_id, ...@@ -6055,7 +6055,7 @@ static int hclge_add_fd_entry_by_arfs(struct hnae3_handle *h, u16 queue_id,
return -ENOSPC; return -ENOSPC;
} }
rule = kzalloc(sizeof(*rule), GFP_KERNEL); rule = kzalloc(sizeof(*rule), GFP_ATOMIC);
if (!rule) { if (!rule) {
spin_unlock_bh(&hdev->fd_rule_lock); spin_unlock_bh(&hdev->fd_rule_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册