Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Jul 2010 02:56:00 +0000 (19:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Jul 2010 02:56:00 +0000 (19:56 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (35 commits)
  NET: SB1250: Initialize .owner
  vxge: show startup message with KERN_INFO
  ll_temac: Fix missing iounmaps
  bridge: Clear IPCB before possible entry into IP stack
  bridge br_multicast: BUG: unable to handle kernel NULL pointer dereference
  net: Fix definition of netif_vdbg() when VERBOSE_DEBUG is defined
  net/ne: fix memory leak in ne_drv_probe()
  xfrm: fix xfrm by MARK logic
  virtio_net: fix oom handling on tx
  virtio_net: do not reschedule rx refill forever
  s2io: resolve statistics issues
  linux/net.h: fix kernel-doc warnings
  net: decreasing real_num_tx_queues needs to flush qdisc
  sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock
  qlge: fix a eeh handler to not add a pending timer
  qlge: Replacing add_timer() to mod_timer()
  usbnet: Set parent device early for netdev_printk()
  net: Revert "rndis_host: Poll status channel before control channel"
  netfilter: ip6t_REJECT: fix a dst leak in ipv6 REJECT
  drivers: bluetooth: bluecard_cs.c: Fixed include error, changed to linux/io.h
  ...

1  2 
drivers/vhost/net.c

diff --combined drivers/vhost/net.c
index df5b6b971f2633954c3233ead3bb1b648532c507,2406377a6e5eac8b848b52e5e5d3d6a37bceb3b7..57a593c58cf418769537c06d4602910203f8e5e0
@@@ -98,7 -98,8 +98,8 @@@ static void tx_poll_start(struct vhost_
  static void handle_tx(struct vhost_net *net)
  {
        struct vhost_virtqueue *vq = &net->dev.vqs[VHOST_NET_VQ_TX];
-       unsigned head, out, in, s;
+       unsigned out, in, s;
+       int head;
        struct msghdr msg = {
                .msg_name = NULL,
                .msg_namelen = 0,
                                         ARRAY_SIZE(vq->iov),
                                         &out, &in,
                                         NULL, NULL);
+               /* On error, stop handling until the next kick. */
+               if (unlikely(head < 0))
+                       break;
                /* Nothing new?  Wait for eventfd to tell us they refilled. */
                if (head == vq->num) {
                        wmem = atomic_read(&sock->sk->sk_wmem_alloc);
  static void handle_rx(struct vhost_net *net)
  {
        struct vhost_virtqueue *vq = &net->dev.vqs[VHOST_NET_VQ_RX];
-       unsigned head, out, in, log, s;
+       unsigned out, in, log, s;
+       int head;
        struct vhost_log *vq_log;
        struct msghdr msg = {
                .msg_name = NULL,
                                         ARRAY_SIZE(vq->iov),
                                         &out, &in,
                                         vq_log, &log);
+               /* On error, stop handling until the next kick. */
+               if (unlikely(head < 0))
+                       break;
                /* OK, now we need to know about added descriptors. */
                if (head == vq->num) {
                        if (unlikely(vhost_enable_notify(vq))) {
@@@ -637,7 -645,7 +645,7 @@@ const static struct file_operations vho
  };
  
  static struct miscdevice vhost_net_misc = {
 -      VHOST_NET_MINOR,
 +      MISC_DYNAMIC_MINOR,
        "vhost-net",
        &vhost_net_fops,
  };