Commit b30af6b
committed
Add flush_workqueue before destroying workqueue
To ensure no work is left running when the module is removed, call
flush_workqueue() before destroy_workqueue() in the module exit path.
According to the kernel documentation, destroy_workqueue() expects
that all work items have already completed:
"Safely destroy a workqueue. All work currently pending will be
done first."
This change adds an explicit call to flush_workqueue() in the module
exit function to ensure no work handler remains in progress or pending
at the time of destruction.1 parent 2588783 commit b30af6b
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
0 commit comments