]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: do not reuse pfmemalloc pages
authorYunsheng Lin <linyunsheng@huawei.com>
Tue, 21 Jan 2020 08:42:06 +0000 (16:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jan 2020 10:46:20 +0000 (11:46 +0100)
commitad57fbf715339fd992d722edba5ff214ad62cbf7
treefea1a9cd6cf0cad04f6f81e0e51509621d1cc794
parent6d4b0317c6b8860e67b0194ee47468ab34e03c20
net: hns3: do not reuse pfmemalloc pages

HNS3 driver allocates pages for DMA with dev_alloc_pages(), which
calls alloc_pages_node() with the __GFP_MEMALLOC flag. So, in case
of OOM condition, HNS3 can get pages with pfmemalloc flag set.

So do not reuse the pages with pfmemalloc flag set because those
pages are reserved for special cases, such as low memory case.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c