Revision dbda8feadfa46b3d8dd7a2304f84ccbc036effe9 authored by Barry Song on 24 July 2020, 04:15:30 UTC, committed by Linus Torvalds on 24 July 2020, 19:42:41 UTC
hugetlb_cma[0] can be NULL due to various reasons, for example, node0 has no memory. so NULL hugetlb_cma[0] doesn't necessarily mean cma is not enabled. gigantic pages might have been reserved on other nodes. This patch fixes possible double reservation and CMA leak. [akpm@linux-foundation.org: fix CONFIG_CMA=n warning] [sfr@canb.auug.org.au: better checks before using hugetlb_cma] Link: http://lkml.kernel.org/r/20200721205716.6dbaa56b@canb.auug.org.au Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma") Signed-off-by: Barry Song <song.bao.hua@hisilicon.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Acked-by: Roman Gushchin <guro@fb.com> Cc: Jonathan Cameron <jonathan.cameron@huawei.com> Cc: <stable@vger.kernel.org> Link: http://lkml.kernel.org/r/20200710005726.36068-1-song.bao.hua@hisilicon.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent d38a2b7
File | Mode | Size |
---|---|---|
bpf | ||
cgroup | ||
configs | ||
debug | ||
dma | ||
events | ||
gcov | ||
irq | ||
kcsan | ||
livepatch | ||
locking | ||
power | ||
printk | ||
rcu | ||
sched | ||
time | ||
trace | ||
.gitignore | -rw-r--r-- | 71 bytes |
Kconfig.freezer | -rw-r--r-- | 92 bytes |
Kconfig.hz | -rw-r--r-- | 1.7 KB |
Kconfig.locks | -rw-r--r-- | 4.9 KB |
Kconfig.preempt | -rw-r--r-- | 3.0 KB |
Makefile | -rw-r--r-- | 4.7 KB |
acct.c | -rw-r--r-- | 15.5 KB |
async.c | -rw-r--r-- | 10.2 KB |
audit.c | -rw-r--r-- | 62.9 KB |
audit.h | -rw-r--r-- | 10.5 KB |
audit_fsnotify.c | -rw-r--r-- | 5.4 KB |
audit_tree.c | -rw-r--r-- | 25.7 KB |
audit_watch.c | -rw-r--r-- | 13.8 KB |
auditfilter.c | -rw-r--r-- | 34.1 KB |
auditsc.c | -rw-r--r-- | 70.6 KB |
backtracetest.c | -rw-r--r-- | 1.9 KB |
bounds.c | -rw-r--r-- | 751 bytes |
capability.c | -rw-r--r-- | 14.6 KB |
compat.c | -rw-r--r-- | 7.3 KB |
configs.c | -rw-r--r-- | 2.0 KB |
context_tracking.c | -rw-r--r-- | 6.4 KB |
cpu.c | -rw-r--r-- | 60.8 KB |
cpu_pm.c | -rw-r--r-- | 5.6 KB |
crash_core.c | -rw-r--r-- | 11.4 KB |
crash_dump.c | -rw-r--r-- | 1.1 KB |
cred.c | -rw-r--r-- | 23.3 KB |
delayacct.c | -rw-r--r-- | 4.7 KB |
dma.c | -rw-r--r-- | 3.3 KB |
elfcore.c | -rw-r--r-- | 459 bytes |
exec_domain.c | -rw-r--r-- | 1.1 KB |
exit.c | -rw-r--r-- | 42.3 KB |
extable.c | -rw-r--r-- | 4.4 KB |
fail_function.c | -rw-r--r-- | 6.9 KB |
fork.c | -rw-r--r-- | 74.5 KB |
freezer.c | -rw-r--r-- | 4.4 KB |
futex.c | -rw-r--r-- | 110.3 KB |
gen_kheaders.sh | -rwxr-xr-x | 3.2 KB |
groups.c | -rw-r--r-- | 4.9 KB |
hung_task.c | -rw-r--r-- | 7.5 KB |
iomem.c | -rw-r--r-- | 4.7 KB |
irq_work.c | -rw-r--r-- | 4.8 KB |
jump_label.c | -rw-r--r-- | 20.8 KB |
kallsyms.c | -rw-r--r-- | 17.8 KB |
kcmp.c | -rw-r--r-- | 5.7 KB |
kcov.c | -rw-r--r-- | 27.7 KB |
kexec.c | -rw-r--r-- | 8.0 KB |
kexec_core.c | -rw-r--r-- | 31.2 KB |
kexec_elf.c | -rw-r--r-- | 11.4 KB |
kexec_file.c | -rw-r--r-- | 32.6 KB |
kexec_internal.h | -rw-r--r-- | 976 bytes |
kheaders.c | -rw-r--r-- | 1.6 KB |
kmod.c | -rw-r--r-- | 5.0 KB |
kprobes.c | -rw-r--r-- | 65.9 KB |
ksysfs.c | -rw-r--r-- | 6.3 KB |
kthread.c | -rw-r--r-- | 36.2 KB |
latencytop.c | -rw-r--r-- | 7.2 KB |
module-internal.h | -rw-r--r-- | 782 bytes |
module.c | -rw-r--r-- | 115.9 KB |
module_signature.c | -rw-r--r-- | 1.1 KB |
module_signing.c | -rw-r--r-- | 1.1 KB |
notifier.c | -rw-r--r-- | 15.5 KB |
nsproxy.c | -rw-r--r-- | 12.6 KB |
padata.c | -rw-r--r-- | 30.6 KB |
panic.c | -rw-r--r-- | 18.3 KB |
params.c | -rw-r--r-- | 22.7 KB |
pid.c | -rw-r--r-- | 16.7 KB |
pid_namespace.c | -rw-r--r-- | 11.3 KB |
profile.c | -rw-r--r-- | 14.8 KB |
ptrace.c | -rw-r--r-- | 36.5 KB |
range.c | -rw-r--r-- | 3.0 KB |
reboot.c | -rw-r--r-- | 14.1 KB |
relay.c | -rw-r--r-- | 32.1 KB |
resource.c | -rw-r--r-- | 42.9 KB |
rseq.c | -rw-r--r-- | 9.8 KB |
scs.c | -rw-r--r-- | 1.9 KB |
seccomp.c | -rw-r--r-- | 46.4 KB |
signal.c | -rw-r--r-- | 118.4 KB |
smp.c | -rw-r--r-- | 23.0 KB |
smpboot.c | -rw-r--r-- | 11.7 KB |
smpboot.h | -rw-r--r-- | 640 bytes |
softirq.c | -rw-r--r-- | 17.5 KB |
stackleak.c | -rw-r--r-- | 3.9 KB |
stacktrace.c | -rw-r--r-- | 9.7 KB |
stop_machine.c | -rw-r--r-- | 17.2 KB |
sys.c | -rw-r--r-- | 62.7 KB |
sys_ni.c | -rw-r--r-- | 10.0 KB |
sysctl-test.c | -rw-r--r-- | 10.8 KB |
sysctl.c | -rw-r--r-- | 79.2 KB |
sysctl_binary.c | -rw-r--r-- | 3.8 KB |
task_work.c | -rw-r--r-- | 3.6 KB |
taskstats.c | -rw-r--r-- | 15.8 KB |
test_kprobes.c | -rw-r--r-- | 5.9 KB |
torture.c | -rw-r--r-- | 21.6 KB |
tracepoint.c | -rw-r--r-- | 14.9 KB |
tsacct.c | -rw-r--r-- | 4.7 KB |
ucount.c | -rw-r--r-- | 5.6 KB |
uid16.c | -rw-r--r-- | 5.1 KB |
uid16.h | -rw-r--r-- | 442 bytes |
umh.c | -rw-r--r-- | 19.4 KB |
up.c | -rw-r--r-- | 2.3 KB |
user-return-notifier.c | -rw-r--r-- | 1.3 KB |
user.c | -rw-r--r-- | 5.5 KB |
user_namespace.c | -rw-r--r-- | 33.2 KB |
utsname.c | -rw-r--r-- | 3.8 KB |
utsname_sysctl.c | -rw-r--r-- | 3.2 KB |
watch_queue.c | -rw-r--r-- | 16.1 KB |
watchdog.c | -rw-r--r-- | 20.1 KB |
watchdog_hld.c | -rw-r--r-- | 7.7 KB |
workqueue.c | -rw-r--r-- | 165.7 KB |
workqueue_internal.h | -rw-r--r-- | 2.4 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...