Skip to contentSkip to conversation

Delivery Status Notification (Delay)

PATCH [email protected] 1 participant 1 message Jun 12, 2017

lore
Share & tools
lore
#0 lore raw

** Delivery incomplete **

There was a temporary problem delivering your message to [email protected]. Gmail will retry for 46 more hours. You'll be notified if the delivery fails permanently.

The response was:

Receive rate too high

-------------------------Blur-------------------------
This email is forwarded from a MASKED EMAIL you created using Blur. (https://dnt.abine.com/#help/faq/faq-whataremaskedemails).
IF THIS IS SPAM, CLICK HERE TO BLOCK:
https://dnt.abine.com/#/block_email/[email protected]/FWD-737QHYSMHVAYQAUCAOIQBDAAGAQLMA2YAMHECCJDLIBAYAWYAKIAZAQHSMCCWMBLIA4UANQUEIGCIMBKMAZUZ4AAEAACA===@opayq.com

Want to shop safely and privately online? Go Premium: https://dnt.abine.com/?pk_campaign=maskHeader#premium
-------------------------by Abine-------------------------

commit 314915cb4aa3865c8623516b65216b974a7d4e9a

Author:     Gregory Herrero <[email protected]>
AuthorDate: Fri Jun 9 13:58:57 2017 +0200
Commit:     Jan Beulich <[email protected]>
CommitDate: Fri Jun 9 13:58:57 2017 +0200

stop_machine: fill fn_result only in case of error

When stop_machine_run() is called with NR_CPUS as last argument, fn_result member must be filled only if an error happens since it is shared across all cpus.

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.

Note that in case multiple failures occur on different CPUs, only the last error will be reported.

master commit: d8b833d78f6bfde9855a949b5e6d3790d78c0fb7 master date: 2017-06-01 10:53:04 +0200

---
 xen/common/stop_machine.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
xen/common/stop_machine.c +12 -3
index cf109ba..f2484c7 100644
@@ -95,6 +95,7 @@ int stop_machine_run(int (*fn)(void *), void *data, unsigned int cpu)
     stopmachine_data.fn_data = data;
     stopmachine_data.nr_cpus = nr_cpus;
     stopmachine_data.fn_cpu = cpu;
+    stopmachine_data.fn_result = 0;
     atomic_set(&stopmachine_data.done, 0);
     stopmachine_data.state = STOPMACHINE_START;
 
@@ -113,7 +114,11 @@ int stop_machine_run(int (*fn)(void *), void *data, unsigned int cpu)
 
     stopmachine_set_state(STOPMACHINE_INVOKE);
     if ( (cpu == smp_processor_id()) || (cpu == NR_CPUS) )
-        stopmachine_data.fn_result = (*fn)(data);
+    {
+        ret = (*fn)(data);
+        if ( ret )
+            write_atomic(&stopmachine_data.fn_result, ret);
+    }
     stopmachine_wait_state();
     ret = stopmachine_data.fn_result;
 
@@ -151,8 +156,12 @@ static void stopmachine_action(unsigned long cpu)
         case STOPMACHINE_INVOKE:
             if ( (stopmachine_data.fn_cpu == smp_processor_id()) ||
                  (stopmachine_data.fn_cpu == NR_CPUS) )
-                stopmachine_data.fn_result =
-                    stopmachine_data.fn(stopmachine_data.fn_data);
+            {
+                int ret = stopmachine_data.fn(stopmachine_data.fn_data);
+
+                if ( ret )
+                    write_atomic(&stopmachine_data.fn_result, ret);
+            }
             break;
         default:
             break;

--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.6

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

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