Commit 14758f5b authored by Trond Myklebust's avatar Trond Myklebust

[PATCH] 2.5.27 fix potential spinlocking race.

In case of socket transmission errors etc. kfree_skb(), and hence
xprt_write_space() can potentially get called outside of a bh-safe
context.
parent 263399c6
......@@ -966,10 +966,10 @@ xprt_write_space(struct sock *sk)
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)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment