LinuxQuestions.org
Review your favorite Linux distribution.
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 03-01-2005, 09:10 AM   #1
imransadat
LQ Newbie
 
Registered: Jan 2005
Posts: 5

Rep: Reputation: 0
Unable to process skb in my own handler


Hi,
I have registered my own protocol handler using dev_add_pack. When I receive the packet my function is being invoked correctly with the skb. If I print the skb data using printk it shows correctly but if I queue up the skb or do any other operation on it the kernel crashes. I would be thankful if someone could point out the problem.

Thanks in advance,

Imran Sadat.
 
Old 03-03-2005, 02:49 AM   #2
machron1
Member
 
Registered: Mar 2005
Posts: 34

Rep: Reputation: 15
I can only speak from writing interrupt service routines in assembly code back in school, but I remember running into problems from not storing values in certain registers and restoring them after I was done. Also, you have to make sure to call the proper handler from your own handler so as not to break the chain. For instance, if A() calls B(), but your method X() replaces A(), and DOESN'T call B(), well then the system is broken. I assume your code is just a hook and not meant to replace the existing code. To make things work as planned, I would imagine you want your method X() to call A() so that it can in turn call B() and keep the cycle going.

Dunno if any of that helped, but I'm trying to answer what few posts I may be vaguely helpful with
 
Old 03-03-2005, 12:41 PM   #3
imransadat
LQ Newbie
 
Registered: Jan 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for your reply.
I rewrote the whole thing again from scratch and its now working. The code had grown quite complex and now I have completely modularized it.
 
Old 03-03-2005, 07:34 PM   #4
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Rep: Reputation: 15
Pardon me, but what code is that?
 
Old 03-04-2005, 12:18 PM   #5
imransadat
LQ Newbie
 
Registered: Jan 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Its my final year project. I am implementing a high speed data transfer protocol on Linux.
 
  


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
Nagios Event Handler not running - NRPE: Unable to read output notque Linux - Software 7 04-05-2013 06:27 AM
SIGSEGV handler (segmentation fauld handler) myp Programming 8 03-08-2011 02:17 PM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 09:47 AM
xml_parse(): Unable to call handler dhammika Programming 2 06-11-2004 10:14 PM
unable to handler kernal paging request at virtual address yawhum80 Linux - Hardware 4 10-28-2003 08:33 PM

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

All times are GMT -5. The time now is 08:11 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