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]
Message-ID: <tkrat.92d38dd320374c4d@s5r6.in-berlin.de>
Date:	Mon, 16 Mar 2009 20:29:04 +0100 (CET)
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Arjan van de Ven <arjan@...radead.org>
cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] async: remove the temporary (2.6.29) "async is off by
 default" code

On 15 Mar, Arjan van de Ven wrote:
> --- a/kernel/async.c
> +++ b/kernel/async.c
> @@ -391,16 +391,8 @@ static int __init async_init(void)
>  		if (IS_ERR(kthread_run(async_manager_thread, NULL,
>  				       "async/mgr")))
>  			async_enabled = 0;
> -	return 0;
> -}
> -
> -static int __init setup_async(char *str)
> -{
>  	async_enabled = 1;
> -	return 1;
> +	return 0;
>  }
>  
> -__setup("fastboot", setup_async);
> -
> -
>  core_initcall(async_init);


From: Stefan Richter <stefanr@...6.in-berlin.de>
Subject: async: enable it for real

Fix 'async: remove the temporary (2.6.29) "async is off by default" code'.

Also warn if the thread couldn't be started.  A start failure may have
serious side effects when more code starts to use <linux/async.h>.

Signed-off-by: Stefan Richter <stefanr@...6.in-berlin.de>
---

Only compile-tested.

 kernel/async.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux/kernel/async.c
===================================================================
--- linux.orig/kernel/async.c
+++ linux/kernel/async.c
@@ -49,6 +49,7 @@ asynchronous and synchronous parts of th
 */
 
 #include <linux/async.h>
+#include <linux/bug.h>
 #include <linux/module.h>
 #include <linux/wait.h>
 #include <linux/sched.h>
@@ -387,11 +388,10 @@ static int async_manager_thread(void *un
 
 static int __init async_init(void)
 {
-	if (async_enabled)
-		if (IS_ERR(kthread_run(async_manager_thread, NULL,
-				       "async/mgr")))
-			async_enabled = 0;
-	async_enabled = 1;
+	async_enabled =
+		!IS_ERR(kthread_run(async_manager_thread, NULL, "async/mgr"));
+
+	WARN_ON(!async_enabled);
 	return 0;
 }
 


-- 
Stefan Richter
-=====-==--= --== =----
http://arcgraph.de/sr/

--
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