diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-01 18:13:29 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-01 18:13:29 +0200 |
commit | 2a4b6e13e170a5c0c201a1858a8f5a61f98eb11e (patch) | |
tree | dfe77d3d92266f1f833ca2ee841dd60a8c378b9c /mm/util.c | |
parent | Merge tag 'drm-fixes-2022-10-01' of git://anongit.freedesktop.org/drm/drm (diff) | |
parent | damon/sysfs: fix possible memleak on damon_sysfs_add_target (diff) | |
download | linux-2a4b6e13e170a5c0c201a1858a8f5a61f98eb11e.tar.xz linux-2a4b6e13e170a5c0c201a1858a8f5a61f98eb11e.zip |
Merge tag 'mm-hotfixes-stable-2022-09-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull more hotfixes from Andrew Morton:
"One MAINTAINERS update, two MM fixes, both cc:stable"
The previous pull wasn't fated to be the last one..
* tag 'mm-hotfixes-stable-2022-09-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
damon/sysfs: fix possible memleak on damon_sysfs_add_target
mm: fix BUG splat with kvmalloc + GFP_ATOMIC
MAINTAINERS: drop entry to removed file in ARM/RISCPC ARCHITECTURE
Diffstat (limited to 'mm/util.c')
-rw-r--r-- | mm/util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/util.c b/mm/util.c index c9439c66d8cf..346e40177bc6 100644 --- a/mm/util.c +++ b/mm/util.c @@ -619,6 +619,10 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node) if (ret || size <= PAGE_SIZE) return ret; + /* non-sleeping allocations are not supported by vmalloc */ + if (!gfpflags_allow_blocking(flags)) + return NULL; + /* Don't even allow crazy sizes */ if (unlikely(size > INT_MAX)) { WARN_ON_ONCE(!(flags & __GFP_NOWARN)); |