summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@opteron.homeip.net>2008-02-06 19:25:07 -0600
committerEric Van Hensbergen <ericvh@opteron.homeip.net>2008-02-06 19:25:07 -0600
commit7c7d90f2dda6daec5a6aaf8f97aacc10ee4deb77 (patch)
tree918b84a88cb4515de1e46125534e6a266f567b29 /net
parentc55703d807a8c6c239a5fea7b9cd7da08c27d7a9 (diff)
downloadop-kernel-dev-7c7d90f2dda6daec5a6aaf8f97aacc10ee4deb77.zip
op-kernel-dev-7c7d90f2dda6daec5a6aaf8f97aacc10ee4deb77.tar.gz
9p: Fix soft lockup in virtio transport
This fixes a poorly placed spinlock which could result in a soft lockup condition. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/9p/trans_virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 0f59022..7853c31 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -232,7 +232,6 @@ p9_virtio_rpc(struct p9_trans *t, struct p9_fcall *tc, struct p9_fcall **rc,
rdata = (char *)*rc+sizeof(struct p9_fcall);
- spin_lock_irqsave(&chan->lock, flags);
n = P9_NOTAG;
if (tc->id != P9_TVERSION) {
n = p9_idpool_get(chan->tagpool);
@@ -240,6 +239,7 @@ p9_virtio_rpc(struct p9_trans *t, struct p9_fcall *tc, struct p9_fcall **rc,
return -ENOMEM;
}
+ spin_lock_irqsave(&chan->lock, flags);
req = p9_lookup_tag(chan, n);
spin_unlock_irqrestore(&chan->lock, flags);
OpenPOWER on IntegriCloud