fanotify: info leak in copy_event_to_user()
[pandora-kernel.git] / drivers / net / virtio_net.c
index 6ee8410..43a6a11 100644 (file)
@@ -508,7 +508,7 @@ static int virtnet_poll(struct napi_struct *napi, int budget)
 {
        struct virtnet_info *vi = container_of(napi, struct virtnet_info, napi);
        void *buf;
-       unsigned int len, received = 0;
+       unsigned int r, len, received = 0;
 
 again:
        while (received < budget &&
@@ -525,8 +525,9 @@ again:
 
        /* Out of packets? */
        if (received < budget) {
+               r = virtqueue_enable_cb_prepare(vi->rvq);
                napi_complete(napi);
-               if (unlikely(!virtqueue_enable_cb(vi->rvq)) &&
+               if (unlikely(virtqueue_poll(vi->rvq, r)) &&
                    napi_schedule_prep(napi)) {
                        virtqueue_disable_cb(vi->rvq);
                        __napi_schedule(napi);