Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 04-21-2013, 03:21 AM   #1
LQ Newbie
Registered: Apr 2013
Posts: 8

Rep: Reputation: Disabled
How to handle kernel signals

Am writing a kernel module.By default the kernel stack is not executable, so while executing this stack section, the kernel throws a signal i.e SIGSEGV, SO my question is how to handle or capture this signal in kernel module ?
Old 04-22-2013, 04:27 PM   #2
Senior Member
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
SIGSEGV is a segmentation fault, meaning you are trying to read memory that is not allocated usually. What do you mean by "handle" or "capture" the sig11?

Heres some sig11 info.
2 members found this post helpful.
Old 05-24-2013, 11:06 AM   #3
LQ Newbie
Registered: Apr 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Smile error: too few arguments to function `d_path'

Hi All,

Though am providing the correct argument to the function `d_path`, still it shows the error :
module/rt.c:23: error: too few arguments to function `d_path'

#include <linux/init.h>
#include <linux/module.h>
#include <linux/rcupdate.h>
#include <linux/fdtable.h>
#include <linux/fs.h>
#include <linux/fs_struct.h>
#include <linux/dcache.h>


static int current_init(void)

char *cwd;
struct path pwd, root;
pwd = current->fs->pwd;
root= current->fs->root;
char *buf = (char *)kmalloc(GFP_KERNEL,100*sizeof(char));
cwd = d_path(&pwd,buf,100*sizeof(char));
printk(KERN_ALERT "Hello,the current working directory is \n %s",cwd);

return 0;

static void current_exit(void)

printk(KERN_ALERT "Goodbye cruel world");



Could any one help, how to solve this error ? Thanks in advance - Binu


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
Sending Signals in kernel sindhu4sind Linux - Newbie 1 05-09-2012 11:18 AM
Can we handle the signals for Services like httpd ,mysql vass Programming 3 08-20-2004 06:43 PM
Capturing the signals from UNIX kernel Micha Agovic Programming 3 01-30-2002 08:11 AM

All times are GMT -5. The time now is 07:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration