OSDN Git Service

mm/mempool: use might_alloc()
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 5 Jun 2022 15:25:39 +0000 (17:25 +0200)
committerakpm <akpm@linux-foundation.org>
Fri, 17 Jun 2022 02:48:30 +0000 (19:48 -0700)
commit21bfe8db0a4223c16d4f863ef4250dce5ffd08bb
tree1861d309a2f200eab2cb21351d0aa8ad346c3299
parenta3967244430eb91698ac8dca7db8bd0871251305
mm/mempool: use might_alloc()

mempool are generally used for GFP_NOIO, so this wont benefit all that
much because might_alloc currently only checks GFP_NOFS.  But it does
validate against mmu notifier pte zapping, some might catch some drivers
doing really silly things, plus it's a bit more meaningful in what we're
checking for here.

Link: https://lkml.kernel.org/r/20220605152539.3196045-3-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mempool.c