Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci xhci_pci: avoid potential double free of interru...



details:   https://anonhg.NetBSD.org/src/rev/73248c174cc0
branches:  trunk
changeset: 1017002:73248c174cc0
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Wed Dec 09 14:21:09 2020 +0000

description:
xhci_pci: avoid potential double free of interrupt handles

Found by Kouichi Hashikawa in PR 55855.

diffstat:

 sys/dev/pci/xhci_pci.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 5e66d44ef22b -r 73248c174cc0 sys/dev/pci/xhci_pci.c
--- a/sys/dev/pci/xhci_pci.c    Wed Dec 09 11:35:44 2020 +0000
+++ b/sys/dev/pci/xhci_pci.c    Wed Dec 09 14:21:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci_pci.c,v 1.25 2020/10/27 13:50:57 skrll Exp $      */
+/*     $NetBSD: xhci_pci.c,v 1.26 2020/12/09 14:21:09 jakllsch Exp $   */
 /*     OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp   */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.25 2020/10/27 13:50:57 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.26 2020/12/09 14:21:09 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_xhci_pci.h"
@@ -222,7 +222,7 @@
            xhci_intr, sc, device_xname(sc->sc_dev));
        if (psc->sc_ih == NULL) {
                pci_intr_release(pc, psc->sc_pihp, 1);
-               psc->sc_ih = NULL;
+               psc->sc_pihp = NULL;
                aprint_error_dev(self, "couldn't establish interrupt");
                if (intrstr != NULL)
                        aprint_error(" at %s", intrstr);



Home | Main Index | Thread Index | Old Index