Skip to contentSkip to conversation

Kernel semaphores

DISCUSSION James Roper 1 participant 1 message Sep 14, 2004

lore
Share & tools
lore
#0 lore raw

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