History

kthread: Do not use TIMER_IRQSAFE

The TIMER_IRQSAFE usage was introduced in commit 22597dc3d97b1 ("kthread: initial support for delayed kthread work") which modelled the delayed kthread code after workqueue's code. The workqueue code requires the flag TIMER_IRQSAFE for synchronisation purpose. This is not true for kthread's delay timer since all operations occur under a lock. Remove TIMER_IRQSAFE from the timer initialisation and use timer_setup() for initialisation purpose which is the official function.

Sebastian Andrzej Siewior committed 7 years ago

Commit ad014231 parent fe99a4f2 files · +5 −5Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/kthread.h+2−3
@@ -164,9 +164,8 @@ extern void __kthread_init_worker(struct kthread_worker *worker, · 163 unmodified lines
164164 #define kthread_init_delayed_work(dwork, fn) \
165165 do { \
166166 kthread_init_work(&(dwork)->work, (fn)); \
167− __init_timer(&(dwork)->timer, \
168− kthread_delayed_work_timer_fn, \
169− TIMER_IRQSAFE); \
167+ timer_setup(&(dwork)->timer, \
168+ kthread_delayed_work_timer_fn, 0); \
170169 } while (0)
171170
172171 int kthread_worker_fn(void *worker_ptr);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t