Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix softint leak in ixl(4) when detaching
details: https://anonhg.NetBSD.org/src/rev/aaf5d4225492
branches: trunk
changeset: 466388:aaf5d4225492
user: yamaguchi <yamaguchi%NetBSD.org@localhost>
date: Fri Dec 20 01:18:53 2019 +0000
description:
Fix softint leak in ixl(4) when detaching
diffstat:
sys/dev/pci/if_ixl.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (35 lines):
diff -r dc0186b5b1b2 -r aaf5d4225492 sys/dev/pci/if_ixl.c
--- a/sys/dev/pci/if_ixl.c Fri Dec 20 01:12:51 2019 +0000
+++ b/sys/dev/pci/if_ixl.c Fri Dec 20 01:18:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ixl.c,v 1.5 2019/12/20 01:12:51 yamaguchi Exp $ */
+/* $NetBSD: if_ixl.c,v 1.6 2019/12/20 01:18:53 yamaguchi Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
@@ -2001,6 +2001,8 @@
qp->qp_si = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
ixl_handle_queue, qp);
+ if (qp->qp_si == NULL)
+ goto free;
qp->qp_txr = ixl_txr_alloc(sc, i);
if (qp->qp_txr == NULL)
@@ -2026,6 +2028,8 @@
ixl_txr_free(sc, qp->qp_txr);
if (qp->qp_rxr != NULL)
ixl_rxr_free(sc, qp->qp_rxr);
+ if (qp->qp_si != NULL)
+ softint_disestablish(qp->qp_si);
}
sz = sizeof(sc->sc_qps[0]) * sc->sc_nqueue_pairs_max;
@@ -2047,6 +2051,7 @@
qp = &sc->sc_qps[i];
ixl_txr_free(sc, qp->qp_txr);
ixl_rxr_free(sc, qp->qp_rxr);
+ softint_disestablish(qp->qp_si);
}
sz = sizeof(sc->sc_qps[0]) * sc->sc_nqueue_pairs_max;
Home |
Main Index |
Thread Index |
Old Index