Module Name:    src
Committed By:   knakahara
Date:           Wed Jun 24 10:00:37 UTC 2015

Modified Files:
        src/sys/dev/marvell: mvpex.c mvpexvar.h

Log Message:
fix: pexih->ih_evcnt->ev_name pointed stack address wrongly.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/marvell/mvpex.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/marvell/mvpexvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/marvell/mvpex.c
diff -u src/sys/dev/marvell/mvpex.c:1.12 src/sys/dev/marvell/mvpex.c:1.13
--- src/sys/dev/marvell/mvpex.c:1.12	Sun Mar 30 23:25:20 2014
+++ src/sys/dev/marvell/mvpex.c	Wed Jun 24 10:00:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvpex.c,v 1.12 2014/03/30 23:25:20 christos Exp $	*/
+/*	$NetBSD: mvpex.c,v 1.13 2015/06/24 10:00:37 knakahara Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.12 2014/03/30 23:25:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.13 2015/06/24 10:00:37 knakahara Exp $");
 
 #include "opt_pci.h"
 #include "pci.h"
@@ -660,7 +660,6 @@ mvpex_intr_establish(void *v, pci_intr_h
 	struct mvpex_intrhand *pexih;
 	uint32_t mask;
 	int ih = pin - 1, s;
-	char buf[PCI_INTRSTR_LEN];
 
 	intrtab = &sc->sc_intrtab[ih];
 
@@ -674,8 +673,9 @@ mvpex_intr_establish(void *v, pci_intr_h
 	pexih->ih_arg = intrarg;
 	pexih->ih_type = ipl;
 	pexih->ih_intrtab = intrtab;
+	mvpex_intr_string(v, pin, pexih->ih_evname, sizeof(pexih->ih_evname));
 	evcnt_attach_dynamic(&pexih->ih_evcnt, EVCNT_TYPE_INTR, NULL, "mvpex",
-	    mvpex_intr_string(v, pin, buf, sizeof(buf)));
+	    pexih->ih_evname);
 
 	s = splhigh();
 

Index: src/sys/dev/marvell/mvpexvar.h
diff -u src/sys/dev/marvell/mvpexvar.h:1.5 src/sys/dev/marvell/mvpexvar.h:1.6
--- src/sys/dev/marvell/mvpexvar.h:1.5	Sun Mar 30 01:17:51 2014
+++ src/sys/dev/marvell/mvpexvar.h	Wed Jun 24 10:00:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvpexvar.h,v 1.5 2014/03/30 01:17:51 christos Exp $	*/
+/*	$NetBSD: mvpexvar.h,v 1.6 2015/06/24 10:00:37 knakahara Exp $	*/
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -38,6 +38,7 @@ struct mvpex_intrhand {
 
 	void *ih_intrtab;
 
+	char ih_evname[PCI_INTRSTR_LEN];
 	struct evcnt ih_evcnt;
 };
 

Reply via email to