Whamcloud - gitweb
b=1511
authorphil <phil>
Wed, 16 Jul 2003 06:21:36 +0000 (06:21 +0000)
committerphil <phil>
Wed, 16 Jul 2003 06:21:36 +0000 (06:21 +0000)
Add a SIGNAL_MASK_ASSERT() function to try to nail down whether the
lock magic is already trashed before we enter Lustre

lnet/include/linux/portals_compat25.h
lustre/portals/include/linux/portals_compat25.h

index c5e17a9..1c6f1d8 100644 (file)
@@ -1,3 +1,17 @@
+// XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved
+#if SPINLOCK_DEBUG
+# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20)
+#  define SIGNAL_MASK_ASSERT() \
+   LASSERT(current->sighand->siglock->magic == SPINLOCK_MAGIC)
+# else
+#  define SIGNAL_MASK_ASSERT() \
+   LASSERT(current->sigmask_lock->magic == SPINLOCK_MAGIC)
+# endif
+#else
+# define SIGNAL_MASK_ASSERT()
+#endif
+// XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved
+
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20)
 # define SIGNAL_MASK_LOCK(task, flags)                                 \
   spin_lock_irqsave(&task->sighand->siglock, flags)
index c5e17a9..1c6f1d8 100644 (file)
@@ -1,3 +1,17 @@
+// XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved
+#if SPINLOCK_DEBUG
+# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20)
+#  define SIGNAL_MASK_ASSERT() \
+   LASSERT(current->sighand->siglock->magic == SPINLOCK_MAGIC)
+# else
+#  define SIGNAL_MASK_ASSERT() \
+   LASSERT(current->sigmask_lock->magic == SPINLOCK_MAGIC)
+# endif
+#else
+# define SIGNAL_MASK_ASSERT()
+#endif
+// XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved
+
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20)
 # define SIGNAL_MASK_LOCK(task, flags)                                 \
   spin_lock_irqsave(&task->sighand->siglock, flags)