linux/mm/damon
SeongJae Park db7a347b26 mm/damon/dbgfs: use '__GFP_NOWARN' for user-specified size buffer allocation
Patch series "DAMON fixes".

This patch (of 2):

DAMON users can trigger below warning in '__alloc_pages()' by invoking
write() to some DAMON debugfs files with arbitrarily high count
argument, because DAMON debugfs interface allocates some buffers based
on the user-specified 'count'.

        if (unlikely(order >= MAX_ORDER)) {
                WARN_ON_ONCE(!(gfp & __GFP_NOWARN));
                return NULL;
        }

Because the DAMON debugfs interface code checks failure of the
'kmalloc()', this commit simply suppresses the warnings by adding
'__GFP_NOWARN' flag.

Link: https://lkml.kernel.org/r/20211110145758.16558-1-sj@kernel.org
Link: https://lkml.kernel.org/r/20211110145758.16558-2-sj@kernel.org
Fixes: 4bc05954d0 ("mm/damon: implement a debugfs-based user space interface")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-11-20 10:35:54 -08:00
..
core-test.h mm/damon/core-test: fix wrong expectations for 'damon_split_regions_of()' 2021-10-28 17:18:55 -07:00
core.c mm/damon: fix a few spelling mistakes in comments and a pr_debug message 2021-11-06 13:30:46 -07:00
dbgfs-test.h mm/damon: fix a few spelling mistakes in comments and a pr_debug message 2021-11-06 13:30:46 -07:00
dbgfs.c mm/damon/dbgfs: use '__GFP_NOWARN' for user-specified size buffer allocation 2021-11-20 10:35:54 -08:00
Kconfig mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM) 2021-11-06 13:30:46 -07:00
Makefile mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM) 2021-11-06 13:30:46 -07:00
paddr.c mm/damon/vaddr,paddr: support pageout prioritization 2021-11-06 13:30:45 -07:00
prmtv-common.c mm/damon/vaddr,paddr: support pageout prioritization 2021-11-06 13:30:45 -07:00
prmtv-common.h mm/damon/vaddr,paddr: support pageout prioritization 2021-11-06 13:30:45 -07:00
reclaim.c mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM) 2021-11-06 13:30:46 -07:00
vaddr-test.h mm/damon: fix a few spelling mistakes in comments and a pr_debug message 2021-11-06 13:30:46 -07:00
vaddr.c mm/damon: remove unnecessary variable initialization 2021-11-06 13:30:46 -07:00