From: Bob Miller <rem@osdl.org>
To: "Richard B. Johnson" <root@chaos.analogic.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5.4 Can't use spin_lock_* with wait_queue_head_t object.
Date: Tue, 12 Feb 2002 14:15:33 -0800 [thread overview]
Message-ID: <20020212141533.A7653@doc.pdx.osdl.net> (raw)
In-Reply-To: <20020212120100.A7619@doc.pdx.osdl.net> <Pine.LNX.3.95.1020212162231.10673A-100000@chaos.analogic.com>
In-Reply-To: <Pine.LNX.3.95.1020212162231.10673A-100000@chaos.analogic.com>
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
prev parent reply other threads:[~2002-02-12 22:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-12 20:01 Bob Miller
2002-02-12 21:23 ` Richard B. Johnson
2002-02-12 22:15 ` Bob Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020212141533.A7653@doc.pdx.osdl.net \
--to=rem@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=root@chaos.analogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®