diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-20 19:26:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-20 19:26:42 -0400 |
commit | 516bd664153d76f5c814633cee6500e2ff8e861b (patch) | |
tree | f67a1c70b013961849d3491ef22596cd0b0d9af9 /drivers/vhost/net.c | |
parent | 844b9a8707f1fcf0482e0c52f44a555e799ccda6 (diff) | |
parent | 573201f36fd9c7c6d5218cdcd9948cee700b277d (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits)
bridge: Partially disable netpoll support
tcp: fix crash in tcp_xmit_retransmit_queue
IPv6: fix CoA check in RH2 input handler (mip6_rthdr_input())
ibmveth: lost IRQ while closing/opening device leads to service loss
rt2x00: Fix lockdep warning in rt2x00lib_probe_dev()
vhost: avoid pr_err on condition guest can trigger
ipmr: Don't leak memory if fib lookup fails.
vhost-net: avoid flush under lock
net: fix problem in reading sock TX queue
net/core: neighbour update Oops
net: skb_tx_hash() fix relative to skb_orphan_try()
rfs: call sock_rps_record_flow() in tcp_splice_read()
xfrm: do not assume that template resolving always returns xfrms
hostap_pci: set dev->base_addr during probe
axnet_cs: use spin_lock_irqsave in ax_interrupt
dsa: Fix Kconfig dependencies.
act_nat: not all of the ICMP packets need an IP header payload
r8169: incorrect identifier for a 8168dp
Phonet: fix skb leak in pipe endpoint accept()
Bluetooth: Update sec_level/auth_type for already existing connections
...
Diffstat (limited to 'drivers/vhost/net.c')
-rw-r--r-- | drivers/vhost/net.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 57a593c58cf4..d219070fed3d 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -177,8 +177,8 @@ static void handle_tx(struct vhost_net *net) | |||
177 | break; | 177 | break; |
178 | } | 178 | } |
179 | if (err != len) | 179 | if (err != len) |
180 | pr_err("Truncated TX packet: " | 180 | pr_debug("Truncated TX packet: " |
181 | " len %d != %zd\n", err, len); | 181 | " len %d != %zd\n", err, len); |
182 | vhost_add_used_and_signal(&net->dev, vq, head, 0); | 182 | vhost_add_used_and_signal(&net->dev, vq, head, 0); |
183 | total_len += len; | 183 | total_len += len; |
184 | if (unlikely(total_len >= VHOST_NET_WEIGHT)) { | 184 | if (unlikely(total_len >= VHOST_NET_WEIGHT)) { |
@@ -275,8 +275,8 @@ static void handle_rx(struct vhost_net *net) | |||
275 | } | 275 | } |
276 | /* TODO: Should check and handle checksum. */ | 276 | /* TODO: Should check and handle checksum. */ |
277 | if (err > len) { | 277 | if (err > len) { |
278 | pr_err("Discarded truncated rx packet: " | 278 | pr_debug("Discarded truncated rx packet: " |
279 | " len %d > %zd\n", err, len); | 279 | " len %d > %zd\n", err, len); |
280 | vhost_discard_vq_desc(vq); | 280 | vhost_discard_vq_desc(vq); |
281 | continue; | 281 | continue; |
282 | } | 282 | } |
@@ -534,11 +534,16 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) | |||
534 | rcu_assign_pointer(vq->private_data, sock); | 534 | rcu_assign_pointer(vq->private_data, sock); |
535 | vhost_net_enable_vq(n, vq); | 535 | vhost_net_enable_vq(n, vq); |
536 | done: | 536 | done: |
537 | mutex_unlock(&vq->mutex); | ||
538 | |||
537 | if (oldsock) { | 539 | if (oldsock) { |
538 | vhost_net_flush_vq(n, index); | 540 | vhost_net_flush_vq(n, index); |
539 | fput(oldsock->file); | 541 | fput(oldsock->file); |
540 | } | 542 | } |
541 | 543 | ||
544 | mutex_unlock(&n->dev.mutex); | ||
545 | return 0; | ||
546 | |||
542 | err_vq: | 547 | err_vq: |
543 | mutex_unlock(&vq->mutex); | 548 | mutex_unlock(&vq->mutex); |
544 | err: | 549 | err: |