Skip to content

Commit e963b7a

Browse files
chleroympe
authored andcommitted
powerpc/vdso32: Fallback on getres syscall when clock is unknown
There are other clocks than the standard ones, for instance per process clocks. Therefore, being above the last standard clock doesn't mean it is a bad clock. So, fallback to syscall instead of returning -EINVAL inconditionaly. Fixes: e33ffc9 ("powerpc/vdso32: implement clock_getres entirely") Cc: [email protected] # v5.6+ Reported-by: Aurelien Jarno <[email protected]> Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Tested-by: Aurelien Jarno <[email protected]> Link: https://lore.kernel.org/r/7316a9e2c0c2517923eb4b0411c4a08d15e675a4.1589017281.git.christophe.leroy@csgroup.eu
1 parent 4833ce0 commit e963b7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/powerpc/kernel/vdso32/gettimeofday.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
218218
blr
219219

220220
/*
221-
* invalid clock
221+
* syscall fallback
222222
*/
223223
99:
224-
li r3, EINVAL
225-
crset so
224+
li r0,__NR_clock_getres
225+
sc
226226
blr
227227
.cfi_endproc
228228
V_FUNCTION_END(__kernel_clock_getres)

0 commit comments

Comments
 (0)