LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-12-2012, 02:18 AM   #1
zaffer
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Rep: Reputation: Disabled
character driver .


hi,
i have written a character driver which works fine...when i run the application again with using rmmod it crashes that is:
[char_driver]#make
[char_driver]#insmod ./modules/lkm.ko
[char_driver]#mknod node c 250 0
[char_driver]#./a.out node
till here it works but when i type the following line
[char_driver]#./a.out node
it crashes .....
any solution......
waiting for reply.
 
Old 06-13-2012, 02:02 AM   #2
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
please post it only in one forum..
 
Old 06-13-2012, 03:17 AM   #3
zaffer
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bsat View Post
please post it only in one forum..
thanks for the answer suggestion i have any how solved the problem .....it was just a small thing my driver was nt trimming the quantams now i have adjusted it so now it is fine.
 
Old 06-25-2012, 03:07 AM   #4
zaffer
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
completions in character driver in linux

hi,
i am trying o implement completion. i have to simple applications one for read and other for write.
my code is as follows
struct sculldev{
...........
...........
struct completiom my_completion;
.......
............
};

scullread(........)
{declare vriables......struct sculldev *lsculldev;
wait_for_completion(lsculldev->my_completion);
.............
}
scull_write(...........)
{
declare vriables......struct sculldev *lsculldev;
............................................
............code........................
............code.......................
complete(&lsculldev->my_completion);
return 0;
}
HOWEVER WHEN I RUN THE APPLICATION THE SYSTEM CRASHES.
the messages in var/log/messages is
BUG: sleeping function called from invalid context at arch/x86/mm fault.c
in_atomic(): 0, irqs_disabled:1, pid 2207

i would appreciate if any one could help
 
Old 06-26-2012, 02:11 AM   #5
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
please create a new thread for a new problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
linux kernel character driver xinren Linux - Newbie 2 06-26-2012 03:53 AM
problem with character driver zaffer Linux - Kernel 3 06-13-2012 01:41 AM
Simple character driver sukhdham Linux - Newbie 2 09-25-2010 10:51 AM
Newbie character driver questions kamputty Linux - Kernel 2 04-06-2007 02:39 AM
Character device driver calsoft_pg Linux - Software 0 01-03-2006 01:17 PM


All times are GMT -5. The time now is 01:02 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration