title: Add syscalls to linux kernel
body: <p>I'm new in working with kernel.
  I want to add a linked list to my kernel, and I try to fix it like this link : <a href="http://www.roman10.net/2011/07/28/linux-kernel-programminglinked-list/" rel="nofollow noreferrer">Linux Kernel Programming–Linked List</a></p>
  
  <p>here is code's that I added to sys.c :</p>
  
  <p>syscall defenition:</p>
  
  <pre><code>SYSCALL_DEFINE1(init_process_list,pid_t,ppid)
  {
   LIST_HEAD(processList);
   struct scallNode* newNode;
   newNode = kmalloc(sizeof(*newNode), GFP_KERNEL);
   newNode-&gt;ID = ppid;
   INIT_LIST_HEAD(&amp;newNode -&gt; list);
   list_add_tail(&amp;newNode -&gt; list , &amp;processList.list);
   printk(KERN_INFO "INIT PROCESS UID: %u\n", ppid);
   return 0; 
  }
  </code></pre>
  
  <p>and my struct for linked list:</p>
  
  <pre><code>struct scallNode{
      int ID;
      struct file_struct ffs;
      struct task_struct ts;
      struct list_head list;
  };
  struct scallNode processList;
  </code></pre>
  
  <p>and when I compile the kernel, I saw this error:</p>
  
  <pre><code>error: ‘struct list_head’ has no member named ‘list’   list_add_tail(&amp;newNode -&gt; list , &amp;processList.list);
  </code></pre>
  
  <p>thanks for your replies.</p>
  
  <p>that error disappeared, but another one is still exist.</p>
  
  <pre><code>kernel/sys.c:2136:24: error: field ‘fs’ has incomplete type      struct file_struct fs;
  </code></pre>
  
  <p>again thanks for your replies.</p>