Hi there,
I'm writing a kernel (2.6.28) module that uses a dynamic timer. I'm using the timer_list structure as follows:
struct timer_list our_timer;
init_timer(&our_timer);
our_timer.function = handleFlowTimer;
our_timer.expires = jiffies + 2000;
our_timer.data = 0;
add_timer(&our_timer);
void handleFlowTimer(unsigned long data)
{
//do nothing
}
This works ok for about 2 seconds until the timer expires. Then the system crashes. I've also tried something like this with the same result:
struct timer_list our_timer = TIMER_INITIALIZER(handleFlowTimer, 0, 0);
mod_timer(&our_timer, jiffies + 2000);
Any help would be greatly appreciated!