Index: trunk/src/samhain_hide.c
===================================================================
--- trunk/src/samhain_hide.c	(revision 89)
+++ trunk/src/samhain_hide.c	(revision 90)
@@ -119,5 +119,9 @@
 /* The configure options (#defines) for the Kernel
  */
+#if SH_KERNEL_NUMERIC >= 206019
+#include <linux/autoconf.h>
+#else
 #include <linux/config.h>
+#endif
 
 #ifndef LINUX26
@@ -164,4 +168,8 @@
  */
 #include <linux/smp_lock.h>
+
+#if SH_KERNEL_NUMERIC >= 206019
+#include <linux/mutex.h>
+#endif
 
 /* Include for fget().
@@ -341,4 +349,6 @@
   long                 dirp_offset;
 
+  unsigned long        dummy;
+
   lock_kernel();
 
@@ -400,5 +410,5 @@
   /* Copy the dirp table to kernel space.
    */
-  copy_from_user(dirp_new, dirp, status);
+  dummy = (unsigned long) copy_from_user(dirp_new, dirp, status);
 
 #ifdef FILE_DEBUG
@@ -498,5 +508,5 @@
   /* Copy our modified dirp table back to user space.
    */
-  copy_to_user(dirp, dirp_new, status);
+  dummy = (unsigned long) copy_to_user(dirp, dirp_new, status);
 #ifdef FILE_DEBUG
   printk("COPY to user\n");
@@ -534,4 +544,6 @@
   __s64                dirp_offset;
 
+  unsigned long        dummy;
+
   lock_kernel();
 
@@ -612,5 +624,5 @@
   /* Copy the dirp table to kernel space.
    */
-  copy_from_user(dirp_new, dirp, status);
+  dummy = (unsigned long) copy_from_user(dirp_new, dirp, status);
 
 #ifdef FILE_DEBUG
@@ -716,5 +728,5 @@
   /* Copy our modified dirp table back to user space.
    */
-  copy_to_user(dirp, dirp_new, status);
+  dummy = (unsigned long) copy_to_user(dirp, dirp_new, status);
   kfree (dirp_new);
   unlock_kernel();
@@ -768,15 +780,34 @@
 #ifdef LINUX26
   {
+#if defined(SH_MODLIST_LOCK)
     spinlock_t * modlist_lock = (spinlock_t * ) SH_MODLIST_LOCK;
-    struct module *mod = find_module(SH_INSTALL_NAME"_hide");
+#endif
+#if SH_KERNEL_NUMERIC >= 206019
+    struct mutex * module_mutex = (struct mutex *) SH_MODLIST_MUTEX;
+#endif
+
+    struct module *mod;
+
+#if SH_KERNEL_NUMERIC >= 206019
+    mutex_lock(module_mutex);
+#endif
+
+    mod = find_module(SH_INSTALL_NAME"_hide");
     if (mod) {
       /* Delete from various lists */
+#if defined(SH_MODLIST_LOCK)
       spin_lock_irq(modlist_lock);
+#endif
       if (removeme == 1)
 	{
 	  list_del(&mod->list);
 	}
+#if defined(SH_MODLIST_LOCK)
       spin_unlock_irq(modlist_lock);
+#endif
     }
+#if SH_KERNEL_NUMERIC >= 206019
+      mutex_unlock(module_mutex);
+#endif
   }
 #endif
