Driver Development - Semaphore problem! Help please!
Hello there,
we got a problem here we couldn't solve, yet:
our self developed driver for kernel 2.6.x works fine until we unload it with rmmod. Then we get an error message telling us that it is crashing somewhere in the function __down due to a failing dereference of a NULL-pointer. We know that this can't work but the pointer 'sem' given to the function down(struct semaphore *sem) is definitly a valid pointer to a correctly initialized semaphore struct.
Well there is another message telling us that the driver crashes deeper in a function called in_atomic. The message looks like this:
Debug: sleeping function called from invalid context in include/linux/rwsem.h: in_atomic()...
or something like that.
What did we do wrong? What do you people need to help us solve this problem?
Thanks a lot in advance!
Hendrik
|