]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: change GFP flag during lock period
authorYufeng Mo <moyufeng@huawei.com>
Mon, 29 Jul 2019 02:53:25 +0000 (10:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jul 2019 15:23:40 +0000 (08:23 -0700)
commit8c3dbe6e6c382ec1cbdb0eb9d04551efa7600981
treecd931780d9e38430be6027d36c8034c4372cc014
parent65c60d723bb8ff18e79713ea9ccc640167649a0d
net: hns3: change GFP flag during lock period

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: 20dd70e1a57b ("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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c