From: phil Date: Wed, 16 Jul 2003 06:21:36 +0000 (+0000) Subject: b=1511 X-Git-Tag: v1_7_100~1^91~13 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=dc12ec7eabfd87c78448670dde4f74bedba51712;p=fs%2Flustre-release.git b=1511 Add a SIGNAL_MASK_ASSERT() function to try to nail down whether the lock magic is already trashed before we enter Lustre --- diff --git a/lnet/include/linux/portals_compat25.h b/lnet/include/linux/portals_compat25.h index c5e17a9..1c6f1d8 100644 --- a/lnet/include/linux/portals_compat25.h +++ b/lnet/include/linux/portals_compat25.h @@ -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) diff --git a/lustre/portals/include/linux/portals_compat25.h b/lustre/portals/include/linux/portals_compat25.h index c5e17a9..1c6f1d8 100644 --- a/lustre/portals/include/linux/portals_compat25.h +++ b/lustre/portals/include/linux/portals_compat25.h @@ -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)