Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/marvell fix: pexih->ih_evcnt->ev_name pointed stack ...
details: https://anonhg.NetBSD.org/src/rev/48738e6f573e
branches: trunk
changeset: 339055:48738e6f573e
user: knakahara <knakahara%NetBSD.org@localhost>
date: Wed Jun 24 10:00:37 2015 +0000
description:
fix: pexih->ih_evcnt->ev_name pointed stack address wrongly.
diffstat:
sys/dev/marvell/mvpex.c | 8 ++++----
sys/dev/marvell/mvpexvar.h | 3 ++-
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (54 lines):
diff -r 7251cfeb6763 -r 48738e6f573e sys/dev/marvell/mvpex.c
--- a/sys/dev/marvell/mvpex.c Wed Jun 24 06:19:52 2015 +0000
+++ b/sys/dev/marvell/mvpex.c Wed Jun 24 10:00:37 2015 +0000
@@ -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 @@
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 @@
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();
diff -r 7251cfeb6763 -r 48738e6f573e sys/dev/marvell/mvpexvar.h
--- a/sys/dev/marvell/mvpexvar.h Wed Jun 24 06:19:52 2015 +0000
+++ b/sys/dev/marvell/mvpexvar.h Wed Jun 24 10:00:37 2015 +0000
@@ -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 @@
void *ih_intrtab;
+ char ih_evname[PCI_INTRSTR_LEN];
struct evcnt ih_evcnt;
};
Home |
Main Index |
Thread Index |
Old Index