kernel 2.6 hangs

From: manomugdha biswas
Date: Sat Sep 17 2005 - 01:40:51 EST


Hi,
I have a driver module in kernel 2.6. I use ioctl to
drive my module from user application. My driver
module does the following:

When it is called (via ioctl from user application) it
loops in a for loop at most 50 times. After each
iteration i have used delay as below:

wait_queue_head_t wq;
init_waitqueue_head (&wq);

for (/* at most 50 times */) {
wait_event_timeout(wq, 0, HZ * 2);
/* wait_event_interruptible_timeout(wq, 0, HZ * 2); */
}

But this wait_event_timeout() causes my module to get
hanged when this function is executed! I am saying
that this function causes to get hanged because if I
comment out this function then 'for' loop can iterate
50 times. When this function is being used after first
iteration my module (and as well as well computer)
gets hanged.

Could you please tell me what is wrong here or what I
need to do?

Regards,
Mano




Manomugdha Biswas



__________________________________________________________
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/