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, 6 Feb 2013 10:46:38 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Hillf Danton <dhillf@...il.com>
Cc:	Rusty Russell <rusty@...tcorp.com.au>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] stop_machine: check work->done while handling
 enqueued works

On Wed, Feb 06, 2013 at 08:36:01PM +0800, Hillf Danton wrote:
> To advoid invalid reference, updating work result is moved to
> cpu_stop_signal_done().

Can you please elaborate "why" in addition to "what"?  Do we actually
have a bug here, is it meant to be an independent cleanup, or is it
something which is necessary for later patches in the series?  What
are we achieving here?

>  /* signal completion unless @done is NULL */
> -static void cpu_stop_signal_done(struct cpu_stop_done *done, bool executed)
> +static void cpu_stop_signal_done(struct cpu_stop_done *done, bool
> executed, int ret)

Patch is corrupt.

> @@ -279,8 +281,6 @@ repeat:
>  		preempt_disable();
> 
>  		ret = fn(arg);
> -		if (ret)
> -			done->ret = ret;

If this is meant as a pure cleanup, I'm not sure it's an improvement.
You own your cpu_stop_done until you call cpu_stop_signal_done() on
it, so I don't think there's anything wrong with the current code.
The new code is different, not necessarily better.

Thanks.

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