lkml.org 
[lkml]   [2002]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] 2.5.27 fix potential spinlocking race.
From

In case of socket transmission errors etc. kfree_skb(), and hence
xprt_write_space() can potentially get called outside of a bh-safe
context.

Cheers,
Trond

diff -u --recursive --new-file linux-2.5.27/net/sunrpc/xprt.c linux-2.5.27-fix_wspace/net/sunrpc/xprt.c
--- linux-2.5.27/net/sunrpc/xprt.c Sat Jul 20 21:11:08 2002
+++ linux-2.5.27-fix_wspace/net/sunrpc/xprt.c Tue Jul 23 22:20:48 2002
@@ -966,10 +966,10 @@
return;

if (!xprt_test_and_set_wspace(xprt)) {
- spin_lock(&xprt->sock_lock);
+ spin_lock_bh(&xprt->sock_lock);
if (xprt->snd_task && xprt->snd_task->tk_rpcwait == &xprt->pending)
rpc_wake_up_task(xprt->snd_task);
- spin_unlock(&xprt->sock_lock);
+ spin_unlock_bh(&xprt->sock_lock);
}

if (test_bit(SOCK_NOSPACE, &sock->flags)) {
-
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:27    [W:0.047 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site