|
From: ratheesh k. <rat...@gm...> - 2013-03-06 04:08:10
|
I have kernel timer which check for flag.
if(flag ) {
igb_down(adapter);
} else {
igb_up(adapter);
}
I could see a kernel crash; because there are a lot of msleep() in
igb_down function.
#define msleep(x) do { set_current_state(TASK_UNINTERRUPTIBLE); \
schedule_timeout((x * HZ)/1000 + 2); \
} while (0)
sleep() is called from bottom half context; this is the cause of kernel crash.
1) Since timer call back dont have process context associated with it;
i think , "current" points to the last preempted task ?
2) How can i introduce delays in interrupt context to avoid the kernel
crash. mdelay() will work ?
3) is there any better mechanism to do this job ?
Thanks,
Ratheesh
|