Skip to contentSkip to conversation

tasklet scheduled after end of rmmod

DISCUSSION Emmanuel Michon 3 participants 3 messages May 24, 2002 – May 27, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

as far as I understand nothing prevents a scheduled tasklet to have Linux jump to its routine, when the routine is in a module being rmmod'd. How should I take care of this?

Are timers safe regarding this (I mean, we can consider the timer function won't be called as soon as del_timer() has returned)?

Sincerely yours,

Signature · 4 lines
Emmanuel Michon
Chef de projet
REALmagic France SAS
Mobile: 0614372733 GPGkeyID: D2997E42  
#1 lore raw
Quoted 9 lines · Emmanuel Michon

Hi,

as far as I understand nothing prevents a scheduled tasklet to have Linux jump to its routine, when the routine is in a module being rmmod'd. How should I take care of this?

Are timers safe regarding this (I mean, we can consider the timer function won't be called as soon as del_timer() has returned)?

No, but del_timer_sync() is. See comments in
.../kernel/timer.c

Signature · 6 lines
George Anzinger   [email protected]
High-res-timers: 
http://sourceforge.net/projects/high-res-timers/
Real time sched:  http://sourceforge.net/projects/rtsched/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
#2 lore raw
In reply to Emmanuel Michon
Quoted 3 lines · Emmanuel Michon

as far as I understand nothing prevents a scheduled tasklet to have Linux jump to its routine, when the routine is in a module being rmmod'd. How should I take care of this?

tasklet_kill() in your module_exit() code looks like it does the job.

Regards

Ingo Oeser

Signature · 1 line
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth