From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Simon Derr <Simon.Derr@bull.net>
Cc: Frederik Deweerdt <deweerdt@free.fr>,
linux-kernel@vger.kernel.org,
FACCINI BRUNO <Bruno.Faccini@bull.net>
Subject: Re: Deadlock in net/sunrpc/sched.c
Date: Thu, 02 Mar 2006 09:31:35 -0800 [thread overview]
Message-ID: <1141320695.10398.4.camel@netapplinux-10.connectathon.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0603021242150.15393@openx3.frec.bull.fr>
On Thu, 2006-03-02 at 12:45 +0100, Simon Derr wrote:
> On Thu, 2 Mar 2006, Frederik Deweerdt wrote:
>
> > On Thu, Mar 02, 2006 at 11:38:10AM +0100, Simon Derr wrote:
> > > This happened with 2.6.12 but it seems that the code has not changed and
> > > the issue is very probably still present in the current kernels.
> > Looks like it's fixed in 2.6.16-rc5, could you check agains the current
> > tree?
>
> No, the code is still the same.
>
> > Hmm, not sure this will even compile...
>
> oops....
>
> Index: linux-2.6.12.6/net/sunrpc/sched.c
> ===================================================================
> --- linux-2.6.12.6.orig/net/sunrpc/sched.c 2005-08-29 18:55:27.000000000 +0200
> +++ linux-2.6.12.6/net/sunrpc/sched.c 2006-03-02 12:41:42.000000000 +0100
> @@ -400,16 +400,16 @@ __rpc_default_timer(struct rpc_task *tas
> */
> void rpc_wake_up_task(struct rpc_task *task)
> {
> + struct rpc_wait_queue *queue = task->u.tk_wait.rpc_waitq;
> + spin_lock_bh(&queue->lock);
> if (rpc_start_wakeup(task)) {
> if (RPC_IS_QUEUED(task)) {
> - struct rpc_wait_queue *queue = task->u.tk_wait.rpc_waitq;
>
> - spin_lock_bh(&queue->lock);
> __rpc_do_wake_up_task(task);
> - spin_unlock_bh(&queue->lock);
> }
> rpc_finish_wakeup(task);
> }
> + spin_unlock_bh(&queue->lock);
> }
Bzzzt... Race: How do you know that task->u.tk_wait.rpc_waitq contains a
valid pointer to a queue before you call rpc_start_wakeup()?
Cheers,
Trond
> /*
> -
> 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/
next prev parent reply other threads:[~2006-03-02 17:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-02 10:38 Simon Derr
2006-03-02 10:59 ` Frederik Deweerdt
2006-03-02 11:45 ` Simon Derr
2006-03-02 12:17 ` Simon Derr
2006-03-02 17:51 ` Frederik Deweerdt
2006-03-02 17:58 ` Trond Myklebust
2006-03-02 18:33 ` Frederik Deweerdt
2006-03-02 17:31 ` Trond Myklebust [this message]
2006-03-02 17:45 ` Trond Myklebust
2006-03-03 8:53 ` Simon Derr
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=1141320695.10398.4.camel@netapplinux-10.connectathon.org \
--to=trond.myklebust@fys.uio.no \
--cc=Bruno.Faccini@bull.net \
--cc=Simon.Derr@bull.net \
--cc=deweerdt@free.fr \
--cc=linux-kernel@vger.kernel.org \
/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®