I am having a linked list of nodes modified(added and deleted) dynamically from a user space program. What are the chances that the allocation of nodes are always in user space?
Usual Linked list node,
struct node {
int x;
struct node *next;
};
I got this question since when I traverse through the list, the kernel sends a SIGSEGV signal to this user space process.Also I have done the NULL pointer check whenever I create a new node.
Also I know that the kernel sends SIGSEGV signal if the process tries accessing kernel memory.
100% certain.
It means there is a bug in your program trying to access la-la-land.
SIGSEGV is a POSIX standard signal sent when the program tries to access forbidden memory. So not necessarily just kernel memory, but rather any memory anywhere outside the space that your process has access to.