]> 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)
commitdc7b6237dcc689a1ec416c979bf06073129560cc
treefea1a9cd6cf0cad04f6f81e0e51509621d1cc794
parentca064c0f642b993a174cd7c311bfdde1befd8a83
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