Fix verifier and debug spew due to worker exiting with affinity set. By default the workers have no affinity. We set it to the specific cpu, but KeSetSystemAffinityThreadEx returns 0, as there was no affinity. You still have to KeSetSystemAffinityThreadEx before you exit and reset it back to 0.
@@ -2115,7 +2115,7 @@ ENTER_FN();
HandleResponse(DeviceExtension, cmd);
listEntry = next;
}
- if (old_affinity != 0) {
+ if (new_affinity != 0) {
KeRevertToUserAffinityThreadEx(old_affinity);
}
}
