linux-stable/arch
Christophe Leroy f1797e4de1 powerpc/modules: Don't WARN on first module allocation attempt
module_alloc() first tries to allocate module text within 24 bits direct
jump from kernel text, and tries a wider allocation if first one fails.

When first allocation fails the following is observed in kernel logs:

  vmap allocation for size 2400256 failed: use vmalloc=<size> to increase size
  systemd-udevd: vmalloc error: size 2395133, vm_struct allocation failed, mode:0xcc0(GFP_KERNEL), nodemask=(null)
  CPU: 0 PID: 127 Comm: systemd-udevd Tainted: G        W         5.15.5-gentoo-PowerMacG4 #9
  Call Trace:
  [e2a53a50] [c0ba0048] dump_stack_lvl+0x80/0xb0 (unreliable)
  [e2a53a70] [c0540128] warn_alloc+0x11c/0x2b4
  [e2a53b50] [c0531be8] __vmalloc_node_range+0xd8/0x64c
  [e2a53c10] [c00338c0] module_alloc+0xa0/0xac
  [e2a53c40] [c027a368] load_module+0x2ae0/0x8148
  [e2a53e30] [c027fc78] sys_finit_module+0xfc/0x130
  [e2a53f30] [c0035098] ret_from_syscall+0x0/0x28
  ...

Add __GFP_NOWARN flag to first allocation so that no warning appears
when it fails.

Reported-by: Erhard Furtner <erhard_f@mailbox.org>
Fixes: 2ec13df167 ("powerpc/modules: Load modules closer to kernel text")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/93c9b84d6ec76aaf7b4f03468e22433a6d308674.1638267035.git.christophe.leroy@csgroup.eu
2021-11-30 22:44:32 +11:00
..
alpha Merge branch 'akpm' (patches from Andrew) 2021-11-09 10:11:53 -08:00
arc Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
arm kmap_local: don't assume kmap PTEs are linear arrays in memory 2021-11-20 10:35:54 -08:00
arm64 Selftest changes: 2021-11-18 12:05:22 -08:00
csky asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
h8300 Kbuild updates for v5.16 2021-11-08 09:15:45 -08:00
hexagon hexagon: ignore vmlinux.lds 2021-11-20 10:35:54 -08:00
ia64 asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
m68k signal: Replace force_fatal_sig with force_exit_sig when in doubt 2021-11-19 09:15:58 -06:00
microblaze asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
mips Selftest changes: 2021-11-18 12:05:22 -08:00
nds32 Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
nios2 asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
openrisc Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
parisc parisc: Enable CONFIG_PRINTK_TIME=y in 32bit defconfig 2021-11-18 09:02:32 +01:00
powerpc powerpc/modules: Don't WARN on first module allocation attempt 2021-11-30 22:44:32 +11:00
riscv RISC-V Fixes for 5.16-rc2 2021-11-19 11:40:14 -08:00
s390 s390 updates for 5.16-rc2 2021-11-20 10:55:50 -08:00
sh arch/sh updates for 5.16 2021-11-14 11:37:49 -08:00
sparc signal: Replace force_fatal_sig with force_exit_sig when in doubt 2021-11-19 09:15:58 -06:00
um Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
x86 Two X86 fixes: 2021-11-21 11:25:19 -08:00
xtensa Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
.gitignore
Kconfig Tracing updates for 5.16: 2021-11-01 20:05:19 -07:00