From fcd242c6c835dff4b5334b4db870f9fc23a8e7b7 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 6 May 2019 14:39:37 +0200 Subject: um: fix os_timer_one_shot() os_timer_one_shot() gets passed a value "unsigned long delta", so must not have an "int ticks" as that actually ends up being -1, and thus triggering a timer over and over again. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger --- arch/um/include/shared/os.h | 2 +- arch/um/os-Linux/time.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/um') diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h index ebf23012a59b..d579adcb2690 100644 --- a/arch/um/include/shared/os.h +++ b/arch/um/include/shared/os.h @@ -252,7 +252,7 @@ extern void os_warn(const char *fmt, ...) extern void os_idle_sleep(unsigned long long nsecs); extern int os_timer_create(void* timer); extern int os_timer_set_interval(void* timer, void* its); -extern int os_timer_one_shot(int ticks); +extern int os_timer_one_shot(unsigned long ticks); extern long long os_timer_disable(void); extern long os_timer_remain(void* timer); extern void uml_idle_timer(void); diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index 0e39b9978729..b28cc35da21f 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c @@ -113,7 +113,7 @@ long os_timer_remain(void* timer) return its.it_value.tv_nsec; } -int os_timer_one_shot(int ticks) +int os_timer_one_shot(unsigned long ticks) { struct itimerspec its; unsigned long long nsec; -- cgit v1.2.3-55-g7522