]> git.baikalelectronics.ru Git - kernel.git/commit
stop_machine: fix error code handling on multiple cpus
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 22 Oct 2008 15:00:26 +0000 (10:00 -0500)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 21 Oct 2008 23:00:26 +0000 (10:00 +1100)
commit5aa5e242335744935c8373e4dffc927e85887560
tree8fcf397c504fadbebecde09901aacef06b4551d8
parent28fe02bde5d74940292e42d09e404ab4728c6bfa
stop_machine: fix error code handling on multiple cpus

Using |= for updating a value which might be updated on several cpus
concurrently will not always work since we need to make sure that the
update happens atomically.
To fix this just use a write if the called function returns an error
code on a cpu. We end up writing the error code of an arbitrary cpu
if multiple ones fail but that should be sufficient.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/stop_machine.c