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
DEPMOD.D(5)							     depmod.d							       DEPMOD.D(5)

NAME
depmod.d - Configuration directory for depmod SYNOPSIS
/usr/lib/depmod.d/*.conf /etc/depmod.d/*.conf /run/depmod.d/*.conf DESCRIPTION
The order in which modules are processed by the depmod command can be altered on a global or per-module basis. This is typically useful in cases where built-in kernel modules are complemented by custom built versions of the same and the user wishes to affect the priority of processing in order to override the module version supplied by the kernel. The format of files under depmod.d is simple: one command per line, with blank lines and lines starting with '#' ignored (useful for adding comments). A '' at the end of a line causes it to continue on the next line, which makes the files a bit neater. COMMANDS
search subdirectory... This allows you to specify the order in which /lib/modules (or other configured module location) subdirectories will be processed by depmod. Directories are listed in order, with the highest priority given to the first listed directory and the lowest priority given to the last directory listed. The special keyword built-in refers to the standard module directories installed by the kernel. By default, depmod will give a higher priority to a directory with the name updates using this built-in search string: "updates built-in" but more complex arrangements are possible and are used in several popular distributions. override modulename kernelversion modulesubdirectory This command allows you to override which version of a specific module will be used when more than one module sharing the same name is processed by the depmod command. It is possible to specify one kernel or all kernels using the * wildcard. modulesubdirectory is the name of the subdirectory under /lib/modules (or other module location) where the target module is installed. For example, it is possible to override the priority of an updated test module called kmod by specifying the following command: "override kmod * extra". This will ensure that any matching module name installed under the extra subdirectory within /lib/modules (or other module location) will take priority over any likenamed module already provided by the kernel. COPYRIGHT
This manual page Copyright 2006-2010, Jon Masters, Red Hat, Inc. SEE ALSO
depmod(8) AUTHORS
Jon Masters <jcm@jonmasters.org> Developer Robby Workman <rworkman@slackware.com> Developer Lucas De Marchi <lucas.de.marchi@gmail.com> Developer kmod 01/28/2018 DEPMOD.D(5)
All times are GMT -4. The time now is 07:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy