Sponsored Content
Operating Systems Linux Ubuntu Stack overflow i guess while insmod Post 302523640 by sunilsukumar4u on Thursday 19th of May 2011 08:59:19 AM
Old 05-19-2011
Stack overflow i guess while insmod

I have built kernel 2.6.35 on my Ubuntu system with some specific requirement. I also built some app defined module with the same kernel. I booted up the built version and I find it did not work properly as there is some gui and other modules missing problem. But the system booted up and I did a insmod app.ko. I faced a crash. I found out that it is a stack problem. A caller function in the APP is passing address of two local variable. like int a, b; add (&a, &b); I checked the values of &a and &b before passing and it remained non-null but when i receive the same in the calling function, both the &a, &b are NULL or some garbage value. I increased the stack size but nothing happened. When i skipped the function call, I could see that many allocation of memory has also failed. So I think it should be memory problem. Is there anything I should be checking for gcc option to define the stack or check for stack overflow. Any hints on this could help me a lot. Thanks in advance. I just made some abstract examples since the original code section takes lot of time to explain. It could be helpful if some one give me hints to proceed.


Code:
main()
    {

    struct DMAINFO* pDmaInfo;
    struct DESC* pDesc;
            /*  printk("The function aruguments are Desc = %p and DmaInfo %p", &pDesc, &pDmaInfo); */

    Create_DMA(&pDesc, &pDmaInfo);
    }


void Create_DMA(**ppDesc, **ppDmaInfor)
    {
    printk("The function aruguments are Desc = %p and DmaInfo %p", ppDesc, ppDmaInfo);
    }

The printk statement inside create_DMA gives me NULL values, but the
same print statement in the main function before the create_DMA call has
some values. I am really confused and any sort of useful advice could help me a lot.

Last edited by radoulov; 05-19-2011 at 10:17 AM.. Reason: Code tags.
 

6 More Discussions You Might Find Interesting

1. BSD

stack overflow in function psync_status Abort (core dumped)

I am running Open BSD 3.8 (3.5 upgrade) on a Pent Pro. 200, 64 Megs Ram, Nvedia Vanta TNT 16 Megs, Realtech 8139 Nic. When running ifconfig -a I get this error back. I've run searches on google no deal. I can get Stack overflow or psync, but not both. So I would really like to know how to fix it. ... (0 Replies)
Discussion started by: jmcpreach
0 Replies

2. Shell Programming and Scripting

guess the fault :)

I really cant understand whats wrong with this: File looks like this: 55 11 Code: cost=30 a= cut -c9-12 File let a=${a}+${cost} echo $a The answer echo should echo 11+30(cost) however the output looks like this: 11 30 And also is there anyway to grep $2 without awk? or maybe... (4 Replies)
Discussion started by: maskot
4 Replies

3. HP-UX

Problem with stack overflow

Hi, I get a problem with stack overflow on HP-UX, when running a C program. Pid 28737 received a SIGSEGV for stack growth failure. Possible causes: insufficient memory or swap space, or stack size exceeded maxssiz. The possible cause i found, was that the definition of a structure had... (0 Replies)
Discussion started by: karthikb23
0 Replies

4. AIX

IBM xlf "parser stack overflow" error

Hello, Does anybody know how to increase IBM xlf parser stack to get rid of the "parser stack overflow" error? Thanks Ping (1 Reply)
Discussion started by: luop0812
1 Replies

5. UNIX for Dummies Questions & Answers

perform stack overflow

Help! I have an AIX system that has a power outage. When I logged in as root and got the system up and running it all looked ok. But.....when a user tries to log in they receive the error: The perform stack has overflowed OP=2117 PC=2124 E=46 in emmcshflif icrun is finished How can I fix... (1 Reply)
Discussion started by: dlegnar
1 Replies

6. Hardware

Stack Overflow Questions Tags Users Badges Unanswered Ask Question Ask for the explanation of types

I have read a document which tells me the following 4 things are done by the RAM embedded on disk driver controller. But I don't know what's difference between buffer and cache. Thanks! RAM on disk drive controllers 1 firmware 2 speed matching buffer 3 prefetching buffer 4 cache (1 Reply)
Discussion started by: 915086731
1 Replies
WHAT-PATCH(1)						      General Commands Manual						     WHAT-PATCH(1)

NAME
what-patch - detect which patch system a Debian package uses SYNOPSIS
what-patch [options] DESCRIPTION
what-patch examines the debian/rules file to determine which patch system the Debian package is using. what-patch should be run from the root directory of the Debian source package. OPTIONS
Listed below are the command line options for what-patch: -h, --help Display a help message and exit. -v Enable verbose mode. This will include the listing of any files modified outside or the debian/ directory and report any additional details about the patch system if available. AUTHORS
what-patch was written by Kees Cook <kees@ubuntu.com>, Siegfried-A. Gevatter <rainct@ubuntu.com>, and Daniel Hahler <ubuntu@thequod.de>, among others. This manual page was written by Jonathan Patrick Davies <jpds@ubuntu.com>. Both are released under the GNU General Public License, version 3 or later. SEE ALSO
The Ubuntu MOTU team has some documentation about patch systems at the Ubuntu wiki: https://wiki.ubuntu.com/PackagingGuide/PatchSystems cdbs-edit-patch(1), dbs-edit-patch(1), dpatch-edit-patch(1) DEBIAN
Debian Utilities WHAT-PATCH(1)
All times are GMT -4. The time now is 09:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy