diff options
| -rw-r--r-- | arch/x86/kernel/alternative.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 18f959975ea0..7b9b49dfc05a 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
| @@ -810,6 +810,11 @@ static void *__text_poke(void *addr, const void *opcode, size_t len) | |||
| 810 | * It means the size must be writable atomically and the address must be aligned | 810 | * It means the size must be writable atomically and the address must be aligned |
| 811 | * in a way that permits an atomic write. It also makes sure we fit on a single | 811 | * in a way that permits an atomic write. It also makes sure we fit on a single |
| 812 | * page. | 812 | * page. |
| 813 | * | ||
| 814 | * Note that the caller must ensure that if the modified code is part of a | ||
| 815 | * module, the module would not be removed during poking. This can be achieved | ||
| 816 | * by registering a module notifier, and ordering module removal and patching | ||
| 817 | * trough a mutex. | ||
| 813 | */ | 818 | */ |
| 814 | void *text_poke(void *addr, const void *opcode, size_t len) | 819 | void *text_poke(void *addr, const void *opcode, size_t len) |
| 815 | { | 820 | { |
