Skip to content

Commit 5dee872

Browse files
committed
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: - avoid unnecessary rebuilds for library objects - fix return value of __setup handlers - fix invalid input check for "crashkernel=" kernel option - silence KASAN warnings in unwind_frame * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9191/1: arm/stacktrace, kasan: Silence KASAN warnings in unwind_frame() ARM: 9190/1: kdump: add invalid input check for 'crashkernel=0' ARM: 9187/1: JIVE: fix return value of __setup handler ARM: 9189/1: decompressor: fix unneeded rebuilds of library objects
2 parents be2d3ec + de4fb17 commit 5dee872

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

arch/arm/boot/compressed/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ ifeq ($(CONFIG_USE_OF),y)
9292
OBJS += $(libfdt_objs) fdt_check_mem_start.o
9393
endif
9494

95+
OBJS += lib1funcs.o ashldi3.o bswapsdi2.o
96+
9597
targets := vmlinux vmlinux.lds piggy_data piggy.o \
9698
head.o $(OBJS)
9799

@@ -126,8 +128,6 @@ endif
126128
# Next argument is a linker script
127129
LDFLAGS_vmlinux += -T
128130

129-
OBJS += lib1funcs.o ashldi3.o bswapsdi2.o
130-
131131
# We need to prevent any GOTOFF relocs being used with references
132132
# to symbols in the .bss section since we cannot relocate them
133133
# independently from the rest at run time. This can be achieved by

arch/arm/kernel/setup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,8 @@ static void __init reserve_crashkernel(void)
10041004
total_mem = get_total_mem();
10051005
ret = parse_crashkernel(boot_command_line, total_mem,
10061006
&crash_size, &crash_base);
1007-
if (ret)
1007+
/* invalid value specified or crashkernel=0 */
1008+
if (ret || !crash_size)
10081009
return;
10091010

10101011
if (crash_base <= 0) {

arch/arm/kernel/stacktrace.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ int notrace unwind_frame(struct stackframe *frame)
5454
return -EINVAL;
5555

5656
frame->sp = frame->fp;
57-
frame->fp = *(unsigned long *)(fp);
58-
frame->pc = *(unsigned long *)(fp + 4);
57+
frame->fp = READ_ONCE_NOCHECK(*(unsigned long *)(fp));
58+
frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp + 4));
5959
#else
6060
/* check current frame pointer is within bounds */
6161
if (fp < low + 12 || fp > high - 4)
6262
return -EINVAL;
6363

6464
/* restore the registers from the stack frame */
65-
frame->fp = *(unsigned long *)(fp - 12);
66-
frame->sp = *(unsigned long *)(fp - 8);
67-
frame->pc = *(unsigned long *)(fp - 4);
65+
frame->fp = READ_ONCE_NOCHECK(*(unsigned long *)(fp - 12));
66+
frame->sp = READ_ONCE_NOCHECK(*(unsigned long *)(fp - 8));
67+
frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp - 4));
6868
#endif
6969
#ifdef CONFIG_KRETPROBES
7070
if (is_kretprobe_trampoline(frame->pc))

arch/arm/mach-s3c/mach-jive.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ static int __init jive_mtdset(char *options)
236236
unsigned long set;
237237

238238
if (options == NULL || options[0] == '\0')
239-
return 0;
239+
return 1;
240240

241241
if (kstrtoul(options, 10, &set)) {
242242
printk(KERN_ERR "failed to parse mtdset=%s\n", options);
243-
return 0;
243+
return 1;
244244
}
245245

246246
switch (set) {
@@ -256,7 +256,7 @@ static int __init jive_mtdset(char *options)
256256
"using default.", set);
257257
}
258258

259-
return 0;
259+
return 1;
260260
}
261261

262262
/* parse the mtdset= option given to the kernel command line */

0 commit comments

Comments
 (0)