[lkml]   [2001]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Spinlocking patch for in xprt.c

Trond, did you actually look at how this code works before
you made modifications to my fixes?

xprt_lock serializes sleep/wakeup sequences in the xprt code, so you
cannot remove xprt_lock from the sections where I added holding of
xprt_sock_lock to protect the state of xprt->snd_task. So for
example, this part of your patch is completely bogus and will create
new corruptions and crashes:

@@ -1143,10 +1143,10 @@
struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt;

if (xprt->snd_task && xprt->snd_task == task) {
- spin_lock(&xprt_lock);
+ spin_lock_bh(&xprt_sock_lock);
xprt->snd_task = NULL;
- spin_unlock(&xprt_lock);
+ spin_unlock_bh(&xprt_sock_lock);

You _must_ hold both xprt_lock and xprt_sock_lock in this
section of code, not just one or just the other.

Linus, please do not apply this patch until these issues
are addressed.

David S. Miller
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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