kernel panic after sema_init(&sem,-1) why?

From: Sujeet Kumar
Date: Thu Jan 06 2005 - 22:45:50 EST




Hi !
In our sample driver ,
The system gives panic, if I initialise the semaphore to -1
[sema_init(&sem,-1)] and
then try to acquire it by calling down() .
It gives a kernel panic . what could be the reason for this.
Where exactly is panic() called?

could not figure out easily from code.
Thanks
sujeet




http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at netadmin@xxxxxxxxx and delete this mail.
_____________________________________________________________________