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:	Wed, 1 Feb 2012 21:53:11 -0800
From:	Josh Triplett <josh@...htriplett.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, niv@...ibm.com, tglx@...utronix.de,
	peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
	dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
	fweisbec@...il.com, patches@...aro.org,
	"Paul E. McKenney" <paul.mckenney@...aro.org>,
	Julia Lawall <julia@...u.dk>
Subject: Re: [PATCH RFC tip/core/rcu 31/41] rcu: Add CPU-stall capability to
 rcutorture

On Wed, Feb 01, 2012 at 11:41:49AM -0800, Paul E. McKenney wrote:
> --- a/kernel/rcutorture.c
> +++ b/kernel/rcutorture.c
> +/* Spawn CPU-stall kthread, if stall_cpu specified. */
> +static int __init rcu_torture_stall_init(void)
> +{
> +	if (stall_cpu <= 0)
> +		return 0;
> +	stall_task = kthread_run(rcu_torture_stall, NULL, "rcu_torture_stall");
> +	if (IS_ERR(stall_task)) {
> +		stall_task = NULL;
> +		return PTR_ERR(stall_task);

This seems...unlikely to produce the desired result. :)

A quick check turns up the same bug in rcutorture_onoff_init.

This suggests a possible Coccinelle check, for uses of PTR_ERR(foo) after
foo = (any constant other than ERR_PTR(foo)).

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