lkml.org 
[lkml]   [2002]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.5.4 Can't use spin_lock_* with wait_queue_head_t object.
On Tue, Feb 12, 2002 at 04:23:39PM -0500, Richard B. Johnson wrote:

> On Tue, 12 Feb 2002, Bob Miller wrote:
>
> > There is code in sched.c that uses the spin_lock_* interfaces to acquire and
> > release the lock in the wait_queue_head_t embedded in the struct completion.
> >
> Isn't it just that the spin_lock wasn't initialized at the start?
>

No. The DECLARE_COMPLETION() macro was called in the case that oops'd.

The problem is that when wait.h:USE_RW_WAIT_QUEUE_SPINLOCK is set
the type of lock in the wait_queue_head_t changes from being a
spinlock_t to a rwlock_t.

If you also set CONFIG_DEBUG_SPINLOCK, the wq_lock_t in the
wait_queue_head_t is initialized with a rwlock_t magic number
(0xdeaf1eed), but the spin_lock_XXX() code checks for the spinlock_t
magic number (0xdead4ead) and calls BUG() when the check fails.


--
Bob Miller Email: rem@osdl.org
Open Software Development Lab Phone: 503.626.2455 Ext. 17
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.038 / U:4.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site