>>> On 30.05.17 at 18:19, <[email protected]> wrote:
> Since fn_result member is shared across all cpus, it must be filled
> only if an error happens. Assume CPU1 detects an error and set fn_result
> to -1, then CPU2 doesn't detect an error and set fn_result to 0. The
> error detected by CPU1 will be ignored.

First of all there's a difference between stop_machine_run()'s last
argument being a valid CPU number or NR_CPUS - what you say
above applies to the latter case only, so you should also state that.

And then even after your fix it'll remain ambiguous which error is
being returned on case multiple failures occur (which isn't all that
unlikely). This (almost unavoidable) effect should also be spelled
out imo, and I think you want to use write_atomic() to actually
store the error code.

Finally there a various coding style violations in the code you add.

Jan


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Reply via email to