Commit 2a4b6e13 authored by Linus Torvalds's avatar Linus Torvalds

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
parents ffb4d94b 1c8e2349
...@@ -2670,7 +2670,6 @@ M: Russell King <linux@armlinux.org.uk> ...@@ -2670,7 +2670,6 @@ M: Russell King <linux@armlinux.org.uk>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
W: http://www.armlinux.org.uk/ W: http://www.armlinux.org.uk/
F: arch/arm/include/asm/hardware/entry-macro-iomd.S
F: arch/arm/include/asm/hardware/ioc.h F: arch/arm/include/asm/hardware/ioc.h
F: arch/arm/include/asm/hardware/iomd.h F: arch/arm/include/asm/hardware/iomd.h
F: arch/arm/include/asm/hardware/memc.h F: arch/arm/include/asm/hardware/memc.h
......
...@@ -2182,12 +2182,12 @@ static int damon_sysfs_add_target(struct damon_sysfs_target *sys_target, ...@@ -2182,12 +2182,12 @@ static int damon_sysfs_add_target(struct damon_sysfs_target *sys_target,
if (!t) if (!t)
return -ENOMEM; return -ENOMEM;
damon_add_target(ctx, t);
if (damon_target_has_pid(ctx)) { if (damon_target_has_pid(ctx)) {
t->pid = find_get_pid(sys_target->pid); t->pid = find_get_pid(sys_target->pid);
if (!t->pid) if (!t->pid)
goto destroy_targets_out; goto destroy_targets_out;
} }
damon_add_target(ctx, t);
err = damon_sysfs_set_regions(t, sys_target->regions); err = damon_sysfs_set_regions(t, sys_target->regions);
if (err) if (err)
goto destroy_targets_out; goto destroy_targets_out;
......
...@@ -619,6 +619,10 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node) ...@@ -619,6 +619,10 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node)
if (ret || size <= PAGE_SIZE) if (ret || size <= PAGE_SIZE)
return ret; return ret;
/* non-sleeping allocations are not supported by vmalloc */
if (!gfpflags_allow_blocking(flags))
return NULL;
/* Don't even allow crazy sizes */ /* Don't even allow crazy sizes */
if (unlikely(size > INT_MAX)) { if (unlikely(size > INT_MAX)) {
WARN_ON_ONCE(!(flags & __GFP_NOWARN)); WARN_ON_ONCE(!(flags & __GFP_NOWARN));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment