# Why are we all worked up about atomicity when applying hot-patches if we can just suspend all the threads?

DevFeed: [Why are we all worked up about atomicity when applying hot-patches if we can just suspend all the threads?](<https://devfeed.tech/articles/why-are-we-all-worked-up-about-atomicity-when-applying-hot-patches-if-we-can-just-suspend-all-the-threads-122103.md>)

Original publisher: [Read original article](<https://devblogs.microsoft.com/oldnewthing/20261106-00/?p=112838/>)

Author: Raymond Chen

Published: 2026-11-06T15:00:00Z

Content type: article

Language: en

Sources: [Raymond Chen](<https://devfeed.tech/sources/raymond-chen.md>)

Topics: [patches](<https://devfeed.tech/topics/patches.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>)

Tags: [atomic](<https://devfeed.tech/tags/atomic.md>), [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [old-new-thing](<https://devfeed.tech/tags/old-new-thing.md>), [patches](<https://devfeed.tech/tags/patches.md>), [patching](<https://devfeed.tech/tags/patching.md>), [process](<https://devfeed.tech/tags/process.md>), [processors](<https://devfeed.tech/tags/processors.md>), [suspend](<https://devfeed.tech/tags/suspend.md>), [threads](<https://devfeed.tech/tags/threads.md>), [time](<https://devfeed.tech/tags/time.md>), [update](<https://devfeed.tech/tags/update.md>), [variable](<https://devfeed.tech/tags/variable.md>), [windows](<https://devfeed.tech/tags/windows.md>), [windows-update](<https://devfeed.tech/tags/windows-update.md>), [x86](<https://devfeed.tech/tags/x86.md>)

## AI overview

Atomic activation matters because suspending a process's existing threads does not prevent a new, runnable thread from being created with CreateRemoteThread while patching is underway. On processors with variable-length instructions such as x86, a suspended thread may also be poised to execute bytes that become the tail of a replacement instruction; the post says the original instruction must be at least as large as the replacement to avoid that case. Atomicity still cannot guard against concurrent, non-atomic WriteProcessMemory changes, which the post describes as already broken and outside supported hot-patching use.

## Source excerpt

Suspending all the threads stops the threads that are there now, those are not the only possible sources of change. The post Why are we all worked up about atomicity when applying hot-patches if we can just suspend all the threads? appeared first on The Old New Thing.