Skip to content

Commit 00d43d1

Browse files
ardbiesheuvelRussell King (Oracle)
authored andcommitted
ARM: 9125/1: fix incorrect use of get_kernel_nofault()
Commit 344179f ("ARM: 9106/1: traps: use get_kernel_nofault instead of set_fs()") replaced an occurrence of __get_user() with get_kernel_nofault(), but inverted the sense of the conditional in the process, resulting in no values to be printed at all. I.e., every exception stack now looks like this: Exception stack(0xc18d1fb0 to 0xc18d1ff8) 1fa0: ???????? ???????? ???????? ???????? 1fc0: ???????? ???????? ???????? ???????? ???????? ???????? ???????? ???????? 1fe0: ???????? ???????? ???????? ???????? ???????? ???????? which is rather unhelpful. Fixes: 344179f ("ARM: 9106/1: traps: use get_kernel_nofault instead of set_fs()") Signed-off-by: Ard Biesheuvel <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent 9d417cb commit 00d43d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static void dump_mem(const char *lvl, const char *str, unsigned long bottom,
136136
for (p = first, i = 0; i < 8 && p < top; i++, p += 4) {
137137
if (p >= bottom && p < top) {
138138
unsigned long val;
139-
if (get_kernel_nofault(val, (unsigned long *)p))
139+
if (!get_kernel_nofault(val, (unsigned long *)p))
140140
sprintf(str + i * 9, " %08lx", val);
141141
else
142142
sprintf(str + i * 9, " ????????");

0 commit comments

Comments
 (0)