Kernel semaphores

From: James Roper
Date: Tue Sep 14 2004 - 00:26:38 EST


Hi,

I'm very new to kernel development. I'm implementing a mechanism in the CIFS
VFS client to ensure that the maximum number of outstanding requests is not
exceeded. To do this I'm using a semaphore. It works for a while, but
eventually (while doing some torture tests that send/receive many > 10MB
files simultaneously by multiple threads) my computer freezes. The logs show
the message "bad: scheduling while atomic!" followed by a trace. I'm
guessing this is where the problem is. So my question is, if my semaphore is
causing that error, what possible things could be triggering it? Could it be
an interrupt while waiting to acquire the semaphore? I'm using the
down_interruptible() to acquire and up() to release.

Thanks,

James
-
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/