Kernel panics : trying to write / read on tiny tty driver
I'm a beginner to the Linux programming and trying my hands on some device driver examples while practising. The below code (a trimmed down version of tiny_tty.c from ldd3 book) loads perfectly using insmod and I'm able to see it in /proc/tty/drivers , /proc/modules and device nodes are getting created under /dev. When I try to write to device file like echo "abcd" > /dev/ttyms0 or read like cat /dev/ttyms0, the kernel panics with a call trace on the screen. I'm on kernel 3.5.0 under Ubuntu. Any help is very much appreciated.
I tried initializing the timer in open function and below is the call trace for "kernel panic - not syncing : fatal exception in interrupt panic occurred, switching back to text console".
Call trace I get when Kernel panics:
I am looking for a guide on how to program for either the Linux or FreeBSD (includes 4.4BSD, NetBSD or OpenBSD) kernel. I would prefer to learn how to write device drivers, but anything would help.
If you know, please email me at *removed* or leave a post here
Regards,
Farhan (0 Replies)
Ok, so I'm trying to finalize my understanding of read/write and kernel interaction.
read():
You have a library function that has as it's first parameter (what the open file to read from is), second parameter( a pointer to a buffer (is this the location of a buffer in the user area or the... (1 Reply)
Ok, so I'm trying to finalize my understanding of read/write and kernel interaction.
read():
You have a library function that has as it's first parameter (what the open file to read from is), second parameter( a pointer to a buffer (is this the location of a buffer in the user area or the... (7 Replies)
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Hi gurus
Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value
Is it /dev/kmem file or something... (1 Reply)
I have been reading prep questions for my second unix academy exam, and there's a nuance, I'm not sure I understand it correctly.
I've been under impression from my readings of book by Evi Nemeth and from unix academy DVDs I've been watching, that kernel's modules are drivers. I think of it, as... (25 Replies)
Hello,
I am trying to find out how I can find the tty number of a terminal a bash script has just created.
Ultimately what I am trying to achieve is a script that starts a new terminal where stderr can be directed to.
ls -l missing_file 2> /dev/pts/X
To find the tty number of the... (3 Replies)
I have an old hppa workstation install Openbsd on it,suppose
i want to use bktr driver on it,i see bktr is configured on some archs(amd64,i386,ppc) but not on hppa,can i use
the bktr driver line from amd64 or i386 in Generic kernel or custom kernel config? (3 Replies)
I am relatively new to 'older unix' systems but I am hoping someone can help me with the error I am seeing on my box. We have an Irix 6.5 running. Our computer keeps restarting (crashed once) itself, by itself, at random points in the last 5 out of 8 sessions. This is the sys log, that i took a... (0 Replies)