Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci vioif_start() - do not call virtio_enqueue_abort...
details: https://anonhg.NetBSD.org/src/rev/8d9df81be5d5
branches: trunk
changeset: 349205:8d9df81be5d5
user: uwe <uwe%NetBSD.org@localhost>
date: Tue Nov 29 21:54:11 2016 +0000
description:
vioif_start() - do not call virtio_enqueue_abort() after error from
virtio_enqueue_reserve(), as it's already done by the latter, so we
ended up with a kind of "double free" that messed up out free list of
vq_entry's.
This is even documented in a "typical usage" comment in virtio.c (and
those quotes are not intended to be sarcastic).
PR 51132 - virtio net device stuck for UDP burst transmission
diffstat:
sys/dev/pci/if_vioif.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diffs (26 lines):
diff -r 643d7dc6f808 -r 8d9df81be5d5 sys/dev/pci/if_vioif.c
--- a/sys/dev/pci/if_vioif.c Tue Nov 29 21:31:45 2016 +0000
+++ b/sys/dev/pci/if_vioif.c Tue Nov 29 21:54:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vioif.c,v 1.26 2016/09/27 03:33:32 pgoyette Exp $ */
+/* $NetBSD: if_vioif.c,v 1.27 2016/11/29 21:54:11 uwe Exp $ */
/*
* Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.26 2016/09/27 03:33:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.27 2016/11/29 21:54:11 uwe Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -823,7 +823,6 @@
r = virtio_enqueue_reserve(vsc, vq, slot,
sc->sc_tx_dmamaps[slot]->dm_nsegs + 1);
if (r != 0) {
- virtio_enqueue_abort(vsc, vq, slot);
bus_dmamap_unload(vsc->sc_dmat,
sc->sc_tx_dmamaps[slot]);
ifp->if_flags |= IFF_OACTIVE;
Home |
Main Index |
Thread Index |
Old Index