Skip to content

Commit 2a4b6e1

Browse files
committed
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
2 parents ffb4d94 + 1c8e234 commit 2a4b6e1

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2670,7 +2670,6 @@ M: Russell King <[email protected]>
26702670
L: [email protected] (moderated for non-subscribers)
26712671
S: Maintained
26722672
W: http://www.armlinux.org.uk/
2673-
F: arch/arm/include/asm/hardware/entry-macro-iomd.S
26742673
F: arch/arm/include/asm/hardware/ioc.h
26752674
F: arch/arm/include/asm/hardware/iomd.h
26762675
F: arch/arm/include/asm/hardware/memc.h

mm/damon/sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2182,12 +2182,12 @@ static int damon_sysfs_add_target(struct damon_sysfs_target *sys_target,
21822182

21832183
if (!t)
21842184
return -ENOMEM;
2185+
damon_add_target(ctx, t);
21852186
if (damon_target_has_pid(ctx)) {
21862187
t->pid = find_get_pid(sys_target->pid);
21872188
if (!t->pid)
21882189
goto destroy_targets_out;
21892190
}
2190-
damon_add_target(ctx, t);
21912191
err = damon_sysfs_set_regions(t, sys_target->regions);
21922192
if (err)
21932193
goto destroy_targets_out;

mm/util.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,10 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node)
619619
if (ret || size <= PAGE_SIZE)
620620
return ret;
621621

622+
/* non-sleeping allocations are not supported by vmalloc */
623+
if (!gfpflags_allow_blocking(flags))
624+
return NULL;
625+
622626
/* Don't even allow crazy sizes */
623627
if (unlikely(size > INT_MAX)) {
624628
WARN_ON_ONCE(!(flags & __GFP_NOWARN));

0 commit comments

Comments
 (0)