Re: [PATCH] kmemleak: don't hang if user disables scanning early

From: Catalin Marinas
Date: Fri Jul 22 2016 - 08:46:27 EST


On Mon, Jul 18, 2016 at 11:43:25AM +0200, Vegard Nossum wrote:
> If the user tries to disable automatic scanning early in the boot
> process using e.g.:
>
> echo scan=off > /sys/kernel/debug/kmemleak
>
> then this command will hang until SECS_FIRST_SCAN (= 60) seconds have
> elapsed, even though the system is fully initialised.
>
> We can fix this using interruptible sleep and checking if we're
> supposed to stop whenever we wake up (like the rest of the code does).
>
> Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx>

Acked-by: Catalin Marinas <catalin.marinas@xxxxxxx>