lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 03 Feb 2009 12:31:44 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Mandeep Singh Baines <msb@...gle.com>
Cc:	Frédéric Weisbecker <fweisbec@...il.com>,
	Alexander Beregalov <a.beregalov@...il.com>,
	"linux-next@...r.kernel.org" <linux-next@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: next-20090202: task kmemleak:763 blocked for more than 120
	seconds.

On Mon, 2009-02-02 at 13:57 -0800, Mandeep Singh Baines wrote:
> The hung_task timeout is now 480 seconds because of sys_sync:
> 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fb822db465bd9fd4208eef1af4490539b236c54e
> 
> But are there are really any other tasks which call
> schedule_timeout_uninterruptibl() for with a timeout >480 seconds?
> 
> Right now kmemleak appears to be the only exception. (A quick grep didn't turn
> anything up.) And it is trivial to change kmemleak to use INTERRUPTIBLE.
> Might even be a nice feature. You could stop it faster that way.

I changed the code as below as it makes more sense:

--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1044,6 +1044,7 @@ static int kmemleak_scan_thread(void *arg)
 
 	while (!kthread_should_stop()) {
 		struct kmemleak_object *object;
+		signed long timeout = jiffies_scan_wait;
 
 		mutex_lock(&scan_mutex);
 
@@ -1069,7 +1070,8 @@ static int kmemleak_scan_thread(void *arg)
 
 		mutex_unlock(&scan_mutex);
 		/* wait before the next scan */
-		schedule_timeout_uninterruptible(jiffies_scan_wait);
+		while (timeout && !kthread_should_stop())
+			timeout = schedule_timeout_interruptible(timeout);
 	}
 
 	pr_info("kmemleak: Automatic memory scanning thread ended\n");

-- 
Catalin

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ