DEVEL15-linux-2-6-22-updates-20070611
authorMarc Dionne <marc.dionne@technoconseil.com>
Tue, 12 Jun 2007 06:44:00 +0000 (06:44 +0000)
committerRuss Allbery <rra@stanford.edu>
Tue, 12 Jun 2007 06:44:00 +0000 (06:44 +0000)
FIXES 61767

1 - task_struct loses thread_info, which is now accessible through the
task_thread_info() macro. A configure test is added to deal with this.

2 - the SLAB_CTOR_VERIFY flag is gone

(cherry picked from commit 37a0b14e016af74176d714cc1b25a2af00275d56)

acinclude.m4
src/afs/LINUX/osi_sleep.c
src/afs/LINUX/osi_vfsops.c
src/cf/linux-test4.m4
src/rx/LINUX/rx_kmutex.c
src/rx/LINUX/rx_knet.c

index 5122637..71d3aee 100644 (file)
@@ -643,6 +643,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TGID
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TODO
+                LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_THREAD_INFO
                 LINUX_EXPORTS_TASKLIST_LOCK
                 LINUX_GET_SB_HAS_STRUCT_VFSMOUNT
                 LINUX_STATFS_TAKES_DENTRY
@@ -832,6 +833,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 if test "x$ac_cv_linux_sched_struct_task_struct_has_todo" = "xyes"; then 
                  AC_DEFINE(STRUCT_TASK_STRUCT_HAS_TODO, 1, [define if your struct task_struct has todo])
                 fi
+                if test "x$ac_cv_linux_sched_struct_task_struct_has_thread_info" = "xyes"; then 
+                 AC_DEFINE(STRUCT_TASK_STRUCT_HAS_THREAD_INFO, 1, [define if your struct task_struct has thread_info])
+                fi
                 if test "x$ac_cv_linux_get_sb_has_struct_vfsmount" = "xyes"; then
                  AC_DEFINE(GET_SB_HAS_STRUCT_VFSMOUNT, 1, [define if your get_sb_nodev needs a struct vfsmount argument])
                 fi
index 5626292..ed81e51 100644 (file)
@@ -205,7 +205,11 @@ afs_osi_SleepSig(void *event)
 #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
            !current->todo
 #else
+#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
             test_ti_thread_flag(current->thread_info, TIF_FREEZE)
+#else
+            test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
+#endif
 #endif
 #endif
            )
@@ -303,7 +307,11 @@ osi_TimedSleep(char *event, afs_int32 ams, int aintok)
 #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
            !current->todo
 #else
+#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
             test_ti_thread_flag(current->thread_info, TIF_FREEZE)
+#else
+            test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
+#endif
 #endif
 #endif
            )
index 64699d1..048a46b 100644 (file)
@@ -298,8 +298,10 @@ init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
 {
     struct vcache *vcp = (struct vcache *) foo;
 
+#if defined(SLAB_CTOR_VERIFY)
     if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
        SLAB_CTOR_CONSTRUCTOR)
+#endif
        inode_init_once(AFSTOV(vcp));
 }
 
index 44a3679..099d3c7 100644 (file)
@@ -444,6 +444,18 @@ printk("%d\n", _tsk.exit_state);],
   AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_exit_state)])
 
 
+AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_THREAD_INFO], [
+  AC_MSG_CHECKING([for thread_info in struct task_struct])
+  AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_thread_info], [
+    AC_TRY_KBUILD(
+[#include <linux/sched.h>],
+[struct task_struct _tsk;
+printk("%d\n", _tsk.thread_info);],
+      ac_cv_linux_sched_struct_task_struct_has_thread_info=yes,
+      ac_cv_linux_sched_struct_task_struct_has_thread_info=no)])
+  AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_thread_info)])
+
+
 AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE], [
   AC_MSG_CHECKING([for alloc_inode in struct super_operations])
   AC_CACHE_VAL([ac_cv_linux_fs_struct_super_has_alloc_inode], [
index a4c863f..0385c5f 100644 (file)
@@ -122,7 +122,11 @@ afs_cv_wait(afs_kcondvar_t * cv, afs_kmutex_t * l, int sigok)
 #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
            !current->todo
 #else
+#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
            test_ti_thread_flag(current->thread_info, TIF_FREEZE)
+#else
+           test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
+#endif
 #endif
 #endif
            )
index f1b3667..9d3b4ad 100644 (file)
@@ -173,7 +173,11 @@ osi_NetReceive(osi_socket so, struct sockaddr_in *from, struct iovec *iov,
 #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
            !current->todo
 #else
+#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
             test_ti_thread_flag(current->thread_info, TIF_FREEZE)
+#else
+            test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
+#endif
 #endif
 #endif
            )