Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/dev/pci Pull up following revision(s) (requested by o...



details:   https://anonhg.NetBSD.org/src/rev/1627e4696a73
branches:  netbsd-7
changeset: 798751:1627e4696a73
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Dec 29 17:01:01 2014 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #354):
        sys/dev/pci/if_vioif.c: revision 1.14
Reuse mbuf when retrying in vioif_start
Otherwise, the old mbuf will leak.

diffstat:

 sys/dev/pci/if_vioif.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 6b9dc4b743a6 -r 1627e4696a73 sys/dev/pci/if_vioif.c
--- a/sys/dev/pci/if_vioif.c    Mon Dec 29 16:35:51 2014 +0000
+++ b/sys/dev/pci/if_vioif.c    Mon Dec 29 17:01:01 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vioif.c,v 1.7 2014/07/22 02:21:50 ozaki-r Exp $     */
+/*     $NetBSD: if_vioif.c,v 1.7.2.1 2014/12/29 17:01:01 martin Exp $  */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.7 2014/07/22 02:21:50 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.7.2.1 2014/12/29 17:01:01 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -735,12 +735,13 @@
                if (m == NULL)
                        break;
 
+retry:
                r = virtio_enqueue_prep(vsc, vq, &slot);
                if (r == EAGAIN) {
                        ifp->if_flags |= IFF_OACTIVE;
                        vioif_tx_vq_done_locked(vq);
                        if (retry++ == 0)
-                               continue;
+                               goto retry;
                        else
                                break;
                }
@@ -763,7 +764,7 @@
                        ifp->if_flags |= IFF_OACTIVE;
                        vioif_tx_vq_done_locked(vq);
                        if (retry++ == 0)
-                               continue;
+                               goto retry;
                        else
                                break;
                }



Home | Main Index | Thread Index | Old Index