X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=mm%2Fkmemleak.c;h=086292f7c59d1a69881068758150c2140feb8253;hb=3250845d0526407330592dd43b9f1354b6fe7a14;hp=04320d3adbef9922edda52e43cc516463e9e33c6;hpb=4dc14b343d47426858f3fb1c8669059b7e3f98d4;p=cascardo%2Flinux.git diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 04320d3adbef..086292f7c59d 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1485,8 +1485,10 @@ static int kmemleak_scan_thread(void *arg) * Wait before the first scan to allow the system to fully initialize. */ if (first_run) { + signed long timeout = msecs_to_jiffies(SECS_FIRST_SCAN * 1000); first_run = 0; - ssleep(SECS_FIRST_SCAN); + while (timeout && !kthread_should_stop()) + timeout = schedule_timeout_interruptible(timeout); } while (!kthread_should_stop()) {