Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
9p: Fix soft lockup in virtio transport
Browse files Browse the repository at this point in the history
This fixes a poorly placed spinlock which could result in a
soft lockup condition.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
  • Loading branch information
Eric Van Hensbergen committed Feb 7, 2008
1 parent c55703d commit 7c7d90f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/9p/trans_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@ 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);
if (n < 0)
return -ENOMEM;
}

spin_lock_irqsave(&chan->lock, flags);
req = p9_lookup_tag(chan, n);
spin_unlock_irqrestore(&chan->lock, flags);

Expand Down

0 comments on commit 7c7d90f

Please sign in to comment.