diff options
Diffstat (limited to 'kernel/irq_work.c')
-rw-r--r-- | kernel/irq_work.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/irq_work.c b/kernel/irq_work.c index 1588e3b2871b..57be1a6cd8da 100644 --- a/kernel/irq_work.c +++ b/kernel/irq_work.c | |||
@@ -119,8 +119,11 @@ void irq_work_run(void) | |||
119 | /* | 119 | /* |
120 | * Clear the PENDING bit, after this point the @work | 120 | * Clear the PENDING bit, after this point the @work |
121 | * can be re-used. | 121 | * can be re-used. |
122 | * Make it immediately visible so that other CPUs trying | ||
123 | * to claim that work don't rely on us to handle their data | ||
124 | * while we are in the middle of the func. | ||
122 | */ | 125 | */ |
123 | work->flags = IRQ_WORK_BUSY; | 126 | xchg(&work->flags, IRQ_WORK_BUSY); |
124 | work->func(work); | 127 | work->func(work); |
125 | /* | 128 | /* |
126 | * Clear the BUSY bit and return to the free state if | 129 | * Clear the BUSY bit and return to the free state if |