LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-10-2004, 07:12 AM   #1
7.e.Q
LQ Newbie
 
Registered: Nov 2003
Posts: 25

Rep: Reputation: 15
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
 
Old 11-10-2004, 10:57 PM   #2
Peterius
Member
 
Registered: May 2004
Distribution: Gentoo, Debian, OpenBSD, NetBSD
Posts: 158

Rep: Reputation: 16
Maybe you should post some of the offending code. Not that I personally could help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Compile problem (FC 3, 2.6.11.6 -> 2.6.13.3, semaphore.c) U4ea Linux - Software 1 10-07-2005 03:29 AM
Driver development steuni Linux - Hardware 0 07-18-2005 10:43 AM
shared memory/semaphore problem V_Ganesh Programming 1 03-31-2005 10:58 PM
A Problem in USB deive driver development D. Marowa Linux - Hardware 4 11-26-2004 12:55 AM
semaphore init problem in linux marry_jeo Programming 0 02-25-2003 11:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration